Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
84 changes: 8 additions & 76 deletions baseline method/AtlasNet/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
## AtlasNet [[Project Page]](http://imagine.enpc.fr/~groueixt/atlasnet/) [[Paper]](https://arxiv.org/abs/1802.05384) [[Talk]](http://imagine.enpc.fr/~groueixt/atlasnet/atlasnet_slides_spotlight_CVPR.pptx)
This code is based on the original AtlasNet implementation. The following readme has details linking the original AtlasNet implementation as well as how to run the models for the Cluster3d dataset. The license from the original implementation has been included in the folder.

Original repository: [AtlasNet](https://github.com/ThibaultGROUEIX/AtlasNet)

**AtlasNet: A Papier-Mâché Approach to Learning 3D Surface Generation** <br>
Thibault Groueix, Matthew Fisher, Vladimir G. Kim , Bryan C. Russell, Mathieu Aubry <br>
In [CVPR, 2018](http://cvpr2018.thecvf.com/).

:rocket: New branch : [AtlasNet + Shape Reconstruction by Learning Differentiable Surface Representations](https://github.com/ThibaultGROUEIX/AtlasNet/tree/jacobian_regularization)

<img src="doc/pictures/chair.png" alt="chair.png" width="35%" /> <img src="doc/pictures/chair.gif" alt="chair.gif" width="32%" />





### Install
Expand All @@ -34,77 +30,13 @@ pip install --user --requirement requirements.txt # pip dependencies
# Copy/Paste the snippet in a terminal
python auxiliary/ChamferDistancePytorch/chamfer3D/setup.py install #MIT
cd auxiliary
git clone https://github.com/ThibaultGROUEIX/metro_sources.git
cd metro_sources; python setup.py --build # build metro distance #GPL3
cd ../..
```



### Usage

* **[Demo](./doc/demo.md)** : ```python train.py --demo```
* **[Training](./doc/training.md)** : ```python train.py --shapenet13``` *Monitor on http://localhost:8890/*
* <details><summary> Latest Refacto 12-2019 </summary>
- [x] Factorize Single View Reconstruction and autoencoder in same class <br>
- [x] Factorise Square and Sphere template in same class<br>
- [x] Add latent vector as bias after first layer(30% speedup) <br>
- [x] Remove last th in decoder <br>
- [x] Make large .pth tensor with all pointclouds in cache(drop the nasty Chunk_reader) <br>
- [x] Make-it multi-gpu <br>
- [x] Add netvision visualization of the results <br>
- [x] Rewrite main script object-oriented <br>
- [x] Check that everything works in latest pytorch version <br>
- [x] Add more layer by default and flag for the number of layers and hidden neurons <br>
- [x] Add a flag to generate a mesh directly <br>
- [x] Add a python setup install <br>
- [x] Make sure GPU are used at 100% <br>
- [x] Add f-score in Chamfer + report f-score <br>
- [x] Get rid of shapenet_v2 data and use v1! <br>
- [x] Fix path issues no more sys.path.append <br>
- [x] Preprocess shapenet 55 and add it in dataloader <br>
- [x] Make minimal dependencies <br>
</details>

##### Usage:

Run `train.py` with arguments specified in `auxiliary/argument_parser`.
The dataset loaded is modified to be the Cluster3d dataset in the following files:
- [trainer_dataset.py](https://github.com/cluster3d/cluster3d.github.io/blob/main/baseline%20method/AtlasNet/dataset/trainer_dataset.py)
- [dataset_abc2.py](https://github.com/cluster3d/cluster3d.github.io/blob/main/baseline%20method/AtlasNet/dataset/dataset_abc2.py)

### Quantitative Results


| Method | Chamfer (*1) | Fscore (*2) | [Metro](https://github.com/ThibaultGROUEIX/AtlasNet/issues/34) (*3) | Total Train time (min) |
| ---------------------- | ---- | ---- | ----- |------- |
| Autoencoder 25 Squares | 1.35 | 82.3% | 6.82 | 731 |
| Autoencoder 1 Sphere | 1.35 | 83.3% | 6.94 | 548 |
| SingleView 25 Squares | 3.78 | 63.1% | 8.94 | 1422 |
| SingleView 1 Sphere | 3.76 | 64.4% | 9.01 | 1297 |


* (*1) x1000. Computed between 2500 ground truth points and 2500 reconstructed points.
* (*2) The threshold is 0.001
* (*3) x100. Metro is ran on unormalized point clouds (which explains a difference with the paper's numbers)


### Related projects

* [Learning Elementary Structures](https://github.com/TheoDEPRELLE/AtlasNetV2)
* [3D-CODED](https://github.com/ThibaultGROUEIX/3D-CODED)
* [Cycle Consistent Deformations](https://github.com/ThibaultGROUEIX/CycleConsistentDeformation)
* [Atlasnet code V2.2](https://github.com/ThibaultGROUEIX/AtlasNet/tree/V2.2) (more linear, script like, may be easier to understand at first)





### Citing this work

```
@inproceedings{groueix2018,
title={{AtlasNet: A Papier-M\^ach\'e Approach to Learning 3D Surface Generation}},
author={Groueix, Thibault and Fisher, Matthew and Kim, Vladimir G. and Russell, Bryan and Aubry, Mathieu},
booktitle={Proceedings IEEE Conf. on Computer Vision and Pattern Recognition (CVPR)},
year={2018}
}
```
<p align="center">
<img src="doc/pictures/plane.gif">
</p>
4 changes: 1 addition & 3 deletions baseline method/AtlasNet/auxiliary/argument_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
from easydict import EasyDict
from os.path import exists, join

"""
Author : Thibault Groueix 01.11.2019
"""



def parser():
Expand Down
1 change: 0 additions & 1 deletion baseline method/AtlasNet/auxiliary/html_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
def main(trainer, outHtml=None):
"""
Create a report for the completed experiment.
Author : Thibault Groueix 01.11.2019
"""

if outHtml is None:
Expand Down
1 change: 0 additions & 1 deletion baseline method/AtlasNet/auxiliary/init_html_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
def main():
"""
Create a master webpage to summurize results of all experiments.
Author : Thibault Groueix 01.11.2019
"""
webpage = HtmlGenerator(path="master.html")

Expand Down
1 change: 0 additions & 1 deletion baseline method/AtlasNet/auxiliary/meter.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ def update(self, val, n=1):

class Logs(object):
"""
Author : Thibault Groueix 01.11.2019
"""

def __init__(self, curves=[]):
Expand Down
1 change: 0 additions & 1 deletion baseline method/AtlasNet/auxiliary/my_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


"""
Author : Thibault Groueix 01.11.2019
"""

def grey_print(x):
Expand Down
4 changes: 1 addition & 3 deletions baseline method/AtlasNet/auxiliary/visualization.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
import sys
import time

"""
Author : Thibault Groueix 01.11.2019
"""



def is_port_in_use(port):
Expand Down
Binary file not shown.
Loading