# Group 2 .......

Project Topic -- ......

## Installation

### Preparation of Dataset

We start by developing the dataset of a single dancer downloaded from the [PKU-DyMV Humans Single Dancer Dataset](https://huggingface.co/datasets/zxyun/PKU-DyMVHumans/blob/main/part1/1080_Dance_Dunhuang_Single_f14.tar). We download the dataset, extract the camera data (images, intrinsics and extrinsics) from the per_view and the cams folder of the dataset. We take the cameras from camera 20 to camera 28 in consideration. We then prepare the dataset by firstly downsampling the data and then converting it into the hexplane's D-Nerf type format. We run two scripts for the final dataset, firstly ``` downsampling_script.py``` (this file is available here: https://drive.google.com/drive/folders/1J1OCMZc8BLoZqPddH9-D4O7YEWbcV59n?usp=sharing) and then with the dataset generated and updated paths, then to the ```convert_to_hexplane.py```. After this the dataset is generated which can be put in the hexplane dataset and the dnerf_slim.yaml file can be updated with the dataset path. We have also did some changes to the dnerf_slim.yaml file for our usecase. The file is also attached to the repository. The results by the hexplane can be checked in the logs folder. It will contain img_test_all and img_path_all under the name of the experiment as mentioned in the yaml configuration file. You can check img_test_all for the test results.


### Setting up Hexplane
For setting up the hexplane, we are using the conda environment as per given instructions in the hexplane's official [Github Repo](https://github.com/Caoang327/HexPlane?tab=readme-ov-file). We clone the repo, run the following commands

```bash
# create conda environment
    conda create --name hexplane python=3.8
    
    # activate env
    conda activate hexplane
    conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1  cudatoolkit=11.6 -c pytorch -c conda-forge

    # pip install 
    pip install -r requirements.txt
    python setup.py develop

python main.py config=dnerf_slim.yaml

```
Hexplane's official repository is tuned to D-Nerf dataset only, hence there are changes done to the hexplane's file `` dnerf_dataset.py ``. The changed file for this file is also attached in this repo for your reference. Replace this file to avoid the Runtime errors produced in the Hexplane repository runs. Also there might be some errors while running Hexplane repository the first time. You might also need to install other relevant dependenices related to the project. and through the code 
```
python main.py config=dnerf_slim.yaml
```
you can run the hexplane repository for a specific dataset and specific params as mentioned in the config file. 


### PSNR value interpretation
The following values are printed inside the conda environment with the running of the script. ```PSNR: , SSIM: , MS-SSIM: , LPIPS_a: , LPIPS_v: ```




