Skip to content

Feedback #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 112 commits into
base: feedback
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
a741dc0
Setting up GitHub Classroom Feedback
github-classroom[bot] Feb 5, 2021
7f04c16
Update GitHub Classroom Feedback
github-classroom[bot] Feb 5, 2021
aa8562d
Setting up GitHub Classroom Feedback
github-classroom[bot] Feb 5, 2021
f5cb47e
Project proposal
shubham1810 Feb 15, 2021
009c08c
added data loader
Madhvi19 Mar 16, 2021
3736837
Merge pull request #2 from Computer-Vision-IIITH-2021/madhvi
saiamrit Mar 16, 2021
20bcddc
Very minor change to add number of points from colab
shubham1810 Mar 27, 2021
caaa604
changes to dataloader to support sampling of points in the point cloud
shubham1810 Mar 27, 2021
42c6b3d
Create README.md
shubham1810 Mar 27, 2021
cb3e5c4
update
Shanthika Mar 27, 2021
592871c
convert data items to torch tensors
shubham1810 Mar 27, 2021
20628c6
convert data items to torch tensors
shubham1810 Mar 27, 2021
2d9e0da
Added resnet
Madhvi19 Mar 28, 2021
1567f2c
Merge pull request #3 from Computer-Vision-IIITH-2021/madhvi
saiamrit Mar 28, 2021
d4ae642
Data preprocessing scripts and repository outline
shubham1810 Mar 28, 2021
0ee1194
Updates with new data loader for hdf5 files
shubham1810 Mar 28, 2021
7268d95
Fix some error in dataloader
shubham1810 Mar 28, 2021
a96a771
Merge branch 'main' of https://github.com/Computer-Vision-IIITH-2021/…
shubham1810 Mar 28, 2021
23f4737
Addition of EfficientNet architectures for image encoder
shubham1810 Mar 28, 2021
b2b8a86
modified transforms
saiamrit Mar 28, 2021
fc0eb04
Add the presentation for the mid-term evaluation
shubham1810 Mar 28, 2021
071a68c
Merge branch 'main' of https://github.com/Computer-Vision-IIITH-2021/…
shubham1810 Mar 28, 2021
450234b
added configurations and dataloader
Madhvi19 Mar 31, 2021
5371b66
integrated res encoder and res decoder blocks
Madhvi19 Mar 31, 2021
5133ed7
Add a decoder model
shubham1810 Apr 1, 2021
b534024
added res decoder
Madhvi19 Apr 1, 2021
08d8d5a
added final occ net
Madhvi19 Apr 1, 2021
092b658
data update
saiamrit Apr 2, 2021
852fc36
move notebook and fix data process
saiamrit Apr 2, 2021
418aa22
added cbn decoder
Madhvi19 Apr 3, 2021
a9f7278
Complete decoder module for FC
shubham1810 Apr 3, 2021
ea3568b
update
Shanthika Apr 4, 2021
8344843
visualization update
Madhvi19 Apr 4, 2021
fa9ac97
updates to configuration variables
saiamrit Apr 4, 2021
be30b6c
dataloader update
Shanthika Apr 4, 2021
461d68f
import fixes. model selection generic
saiamrit Apr 4, 2021
f7de90d
gnn update
Shanthika Apr 4, 2021
9b1780d
Extract network layers
Madhvi19 Apr 4, 2021
d6b5d83
TSNE viz
Madhvi19 Apr 4, 2021
0167232
Visualizing embedings
Madhvi19 Apr 5, 2021
595ea7e
Visualizing embedings
Madhvi19 Apr 5, 2021
33f2451
Visualizing embedings of resnet18
Madhvi19 Apr 7, 2021
b96255c
Visualizing embedings of resnet50
Madhvi19 Apr 7, 2021
562bab1
fix decoders. Genereic encoder decoder in config
saiamrit Apr 7, 2021
8c890b8
Add the occupancy network model architecture
shubham1810 Apr 8, 2021
3d27e7d
camera matrix update
saiamrit Apr 8, 2021
49c311f
Add a configuration class for experiment handling
shubham1810 Apr 8, 2021
43ccf05
pointcloud viz added
saiamrit Apr 9, 2021
810d9b6
Metric analysis
saiamrit Apr 9, 2021
6f3310a
Visualizing embedings of resnet101
Madhvi19 Apr 9, 2021
1d42fb6
pushed notebook
Madhvi19 Apr 9, 2021
60b60b4
projection functionality added
saiamrit Apr 9, 2021
a327b72
Training example
saiamrit Apr 9, 2021
2647f40
Update training parameters for proper checkpoints and epochs. Trainin…
shubham1810 Apr 5, 2021
c232e33
improved visualization
saiamrit Apr 10, 2021
c03966b
Add Pytorch lightning wrapper and trainer methods
shubham1810 Apr 10, 2021
258579f
visualization orientation improved
saiamrit Apr 12, 2021
30a3f23
debugging
saiamrit Apr 12, 2021
999d279
code structured
saiamrit Apr 12, 2021
bd3a50a
prepare for main training loop
shubham1810 Apr 13, 2021
6088fee
Main training in the train.py script
shubham1810 Apr 13, 2021
1e23d8f
train update
Shanthika Apr 14, 2021
150a81a
Update data processing script to accomodate splits
shubham1810 Apr 17, 2021
abecb03
update
Shanthika Apr 2, 2021
d64339b
update
Shanthika Apr 4, 2021
7341eca
update
Shanthika Apr 7, 2021
85480ea
update
Shanthika Apr 10, 2021
191b0f8
update
Shanthika Apr 13, 2021
39f8cd8
update
Shanthika Apr 15, 2021
08dd20b
update
Shanthika Apr 16, 2021
8814be9
train update
Shanthika Apr 18, 2021
23af89d
Updates to checkpoint
shubham1810 Apr 19, 2021
414114a
added iou functionality
Madhvi19 Apr 20, 2021
d855879
Update to dataloader for balanced subset
shubham1810 Apr 20, 2021
0b6d615
added distance functionality
Madhvi19 Apr 20, 2021
b3bd816
Add a configuration class for experiment handling
Shanthika Apr 8, 2021
1e0589f
Add Pytorch lightning wrapper and trainer methods
shubham1810 Apr 10, 2021
5829ada
prepare for main training loop
shubham1810 Apr 13, 2021
ad90bb1
Main training in the train.py script
shubham1810 Apr 13, 2021
bf6795e
Update data processing script to accomodate splits
Shanthika Apr 17, 2021
5c2466f
Merge branch 'shubham' of https://github.com/Computer-Vision-IIITH-20…
Shanthika Apr 20, 2021
d24acaa
Merge branch 'main' into shubham
Shanthika Apr 20, 2021
174803f
Merge pull request #4 from Computer-Vision-IIITH-2021/shubham
Shanthika Apr 20, 2021
a4abc3f
arg update
Shanthika Apr 12, 2021
b786e96
decoder model prepared
Madhvi19 Apr 21, 2021
efbe9f6
added fc resnet blocks
Madhvi19 Mar 31, 2021
88410fd
Merge branch 'main' into madhvi
Shanthika Apr 21, 2021
c9a8310
Merge pull request #5 from Computer-Vision-IIITH-2021/madhvi
Shanthika Apr 21, 2021
1468a53
pykdtree added and metrics
Madhvi19 Apr 14, 2021
e71e267
added pykdtree
Madhvi19 Apr 20, 2021
3f120a8
README update
saiamrit Apr 21, 2021
0384f47
README update
saiamrit Apr 21, 2021
43cc987
camera matrix analysis
saiamrit Apr 8, 2021
19d4b61
Prepare final meshes
shubham1810 Apr 21, 2021
1ca9cb3
code debuging
Madhvi19 Apr 22, 2021
8da0e00
metrics core structuring
Madhvi19 Apr 22, 2021
2ba380e
rearranged pykdtree
Madhvi19 Apr 21, 2021
5ac2b4b
update
Shanthika Apr 22, 2021
30fa291
update
Shanthika Apr 24, 2021
4a779f5
update
Shanthika Apr 24, 2021
0b835f5
update
Shanthika Apr 23, 2021
1c59a02
Merge branch 'main' into shan
shubham1810 Apr 24, 2021
163b840
Merge branch 'shan' into main
shubham1810 Apr 24, 2021
9f5ef16
Fix the utilities for mesh libraries
shubham1810 Apr 24, 2021
fad7f83
Update model and training with balanced data
shubham1810 Apr 17, 2021
82bb453
Update README.md
saiamrit Apr 25, 2021
b9b092e
Complete running
shubham1810 Apr 25, 2021
4debc37
Very Minor Updates
shubham1810 Apr 25, 2021
8009843
Merge pull request #8 from Computer-Vision-IIITH-2021/sai
shubham1810 Apr 25, 2021
3bf9830
Merge branch 'main' of https://github.com/Computer-Vision-IIITH-2021/…
shubham1810 Apr 25, 2021
4f1a3fc
Update README
shubham1810 Apr 25, 2021
ef493a6
Final presentation file
shubham1810 Apr 25, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*.pyc
*.ipynb_checkpoints*
*__pycache__*
*.off
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "src/src/pykdtree"]
path = src/src/pykdtree
url = https://github.com/storpipfugl/pykdtree.git
133 changes: 133 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
# Occupancy Networks for Single View Reconstruction

__Team__: Noisy Pixels

__Team Members__:<br>
Shubham Dokania _(2020701016)_<br>
Shanthika Shankar Naik _(2020701013)_ <br>
Sai Amrit Patnaik _(2020701026)_ <br>
Madhvi Panchal _(2019201061)_ <br>

__Assigned TA__: Meher Shashwat Nigam <br><br>

This project is undertaken as a part of the Computer Vision coursework at IIIT Hyderabad in Spring semester 2021. The paper implemented in this project is: [Occupancy Networks: Learning 3D Reconstruction in Function Space](https://openaccess.thecvf.com/content_CVPR_2019/papers/Mescheder_Occupancy_Networks_Learning_3D_Reconstruction_in_Function_Space_CVPR_2019_paper.pdf) by _Mescheder et. al._

The approach focuses on implicit learning of 3D surface as a continuous decision boundary of a non-linear classifier. Occupancy networks implicitly represent the 3D surface as the continuous decision boundary of a deep neural network classifier. The details of the implementation have been outlined in the project report and the proposal document which can be found [here](./resources/proposal.pdf).

The following sections outline how to run the demo and some examples of the expected output from running the mentioned scripts.

Code structure:
```
- resources
- propossal.pdf
- mid_eval.pdf
- src
- dataset
- __init__.py
- dataloader.py
- models
- __init__.py
- encoder.py
- decoder.py
- viz
- visualization.py
- train.py
- test.py
- run.py
- demo.py
- README.md
- proposal.pdf
```

In the above structure, the source code for the whole implementation can be found in the `src` directory. The scripts each contain a description of the functions/classes implemented and provide a wrapper to experiment with the flow of the program.

Metrics Functionality uses pykdtree library. pykdtree is a kd-tree implementation for fast nearest neighbour search in Python.The implementation is based on scipy.spatial.cKDTree and libANN by combining the best features from both and focus on implementation efficiency.


Dataset
---

Download the dataset for shapenet from: [here](https://s3.eu-central-1.amazonaws.com/avg-projects/occupancy_networks/data/dataset_small_v1.1.zip)

Then to process the dataset, use the script as: `python3 src/dataset/data_process.py --dataroot <unzipped dataset path> --output <your data output path>`

This script will process the dataset and prepare it in the form of HDF5 files for each object separately. This will also apply the point encoding on the dataset.

Setup
---

To setup the required libraries for mesh processing, run the following command:
```
python3 setup.py build_ext --inplace
```

The following also need to be installed to run the code properly:
```
pip3 install --user pytorch-lightning efficientnet-pytorch pykdtree
```

Training
---

To train the model, use the following command:
```
$ python3 src/train.py --help
usage: train.py [-h] [--cdim CDIM] [--hdim HDIM] [--pdim PDIM] [--data_root DATA_ROOT] [--batch_size BATCH_SIZE] [--output_path OUTPUT_PATH] [--exp_name EXP_NAME] [--encoder ENCODER] [--decoder DECODER]

Argument parser for training the model

optional arguments:
-h, --help show this help message and exit
--cdim CDIM feature dimension
--hdim HDIM hidden size for decoder
--pdim PDIM points input size for decoder
--data_root DATA_ROOT
location of the parsed and processed dataset
--batch_size BATCH_SIZE
Training batch size
--output_path OUTPUT_PATH
Model saving and checkpoint paths
--exp_name EXP_NAME Name of the experiment. Artifacts will be created with this name
--encoder ENCODER Name of the Encoder architecture to use
--decoder DECODER Name of the decoder architecture to use
```

Fill the values accordingly for the configuration and the model shall start training. We can also make use of mixed precision training via pytorch lightning. To do this, edit the `src/trainer.py` script.

To view the training progress, run tensorboard in your experiment directory `tensorboard --logdir=<experiment directory>`


Evaluation
----
To run evaluation on the test set (selective objects: roughly 500 for now. Change it in the script for more), use the following script:

```
$ python3 run_evals.py --help
usage: run_evals.py [-h] [--cdim CDIM] [--hdim HDIM] [--pdim PDIM] [--data_root DATA_ROOT] [--batch_size BATCH_SIZE] [--output_path OUTPUT_PATH] [--exp_name EXP_NAME] [--encoder ENCODER] [--decoder DECODER]
[--checkpoint CHECKPOINT]

Argument parser for training the model

optional arguments:
-h, --help show this help message and exit
--cdim CDIM feature dimension
--hdim HDIM hidden size for decoder
--pdim PDIM points input size for decoder
--data_root DATA_ROOT
location of the parsed and processed dataset
--batch_size BATCH_SIZE
Training batch size
--output_path OUTPUT_PATH
Model saving and checkpoint paths
--exp_name EXP_NAME Name of the experiment. Artifacts will be created with this name
--encoder ENCODER Name of the Encoder architecture to use
--decoder DECODER Name of the decoder architecture to use
--checkpoint CHECKPOINT
Checkpoint Path
```


Visualization
---

To generate 3D models and meshes, use `jupyter` notebook or lab environment, and run `check_model.ipynb`. Keep the config flags same as evaluation and tweak the save path to see results.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading