-
Notifications
You must be signed in to change notification settings - Fork 534
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix GEOmetrics Image Recon example (#68)
* Fix GeoMetrics example Signed-off-by: Jean-Francois Lafleche <jlafleche@nvidia.com> * Code style fixes Signed-off-by: Jean-Francois Lafleche <jlafleche@nvidia.com> * Improve readability of realin func Signed-off-by: Jean-Francois Lafleche <jlafleche@nvidia.com> * Style cleanup Signed-off-by: Jean-Francois Lafleche <jlafleche@nvidia.com>
- Loading branch information
1 parent
1622437
commit dcacac5
Showing
15 changed files
with
1,189 additions
and
1,604 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,54 @@ | ||
# Example: GeoMetrics | ||
This example allows you to train and test the GEOMetrice algorithm for signle image 3D object reconstruction. For details on the algorithms see: "GEOMetrics: Exploiting Geometric Structure for Graph-Encoded Objects" : https://arxiv.org/abs/1901.11461 | ||
This example includes training and testing of the GEOMetrics algorithm for | ||
single image 3D object reconstruction. For details on the algorithms see: | ||
"GEOMetrics: Exploiting Geometric Structure for Graph-Encoded Objects": | ||
https://arxiv.org/abs/1901.11461 | ||
|
||
Training on a single class takes several days using an NVIDIA RTX 2080Ti | ||
GPU. To obtain more visually pleasing results at the expense of F-Score, | ||
increase the regularizer weights (laplace, edge). | ||
|
||
Note: `cache-dir` specifies the location to which intermediate asset | ||
representations will be stored. | ||
|
||
|
||
### Training the network: | ||
|
||
To train the system call | ||
``` | ||
python train.py | ||
#### Option 1 : No latent embedding loss (faster to train) | ||
```bash | ||
python train.py --shapenet-root <path/to/ShapeNet> \ | ||
--shapenet-images-root <path/to/ShapeNetImages> \ | ||
--categories <category list> \ | ||
--cache-dir cache/ | ||
``` | ||
|
||
|
||
To train the system with the latent encoding loss call first: | ||
#### Option 2 : With latent embedding loss (better results) | ||
```bash | ||
python train_auto_encoder.py --shapenet-root <path/to/ShapeNet> \ | ||
--cache-dir cache/ | ||
``` | ||
python train_auto_encoder.py | ||
``` | ||
This will train the mesh encoder. Then call the follwoing to train the image reconstruction algorithm: | ||
``` | ||
python train.py -latent_loss | ||
This will train the mesh encoder. Then call the following to train the image | ||
reconstruction algorithm: | ||
```bash | ||
python train.py --shapenet-root <path/to/ShapeNet> \ | ||
--shapenet-images-root <path/to/ShapeNetImages> \ | ||
--categories <category list> \ | ||
--cache-dir cache/ --latent_loss | ||
``` | ||
|
||
### Evaluating the network: | ||
|
||
To evaluate a trained model | ||
To evaluate the auto-encoder | ||
```bash | ||
python eval_auto_encoder.py --shapenet-root <path/to/ShapeNet> \ | ||
--categories <category list> \ | ||
--cache-dir cache/ | ||
``` | ||
python eval.py | ||
To evaluate a trained model | ||
(Note, in the Trimesh window, tap `c` to disable backface culling) | ||
```bash | ||
python eval.py --shapenet-root <path/to/ShapeNet> \ | ||
--shapenet-images-root <path/to/ShapeNetImages> \ | ||
--categories <category list> \ | ||
--cache-dir cache/ | ||
``` | ||
|
||
|
||
|
||
|
Oops, something went wrong.