MCPcopy Index your code
hub / github.com/edward1997104/Neural-Template

github.com/edward1997104/Neural-Template @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
135 symbols 355 edges 21 files 3 documented · 2% updated 3y ago★ 445 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Neural-Template

Neural Template: Topology-aware Reconstruction and Disentangled Generation of 3D Meshes (CVPR 2022)

gallery

Environments

You can create and activate a conda environment for this project using the following commands:

conda env create -f environment.yml
conda activate NeuralTemplate

Dataset

For the dataset, we use the dataset provided by IM-NET for training and evaluation. We provide another zip file (link) which should be unzipped in data before any training or inference.

Training

There are altogether three commands for three training phases (Continuous training, Discrete training, Image encoder training).

For the continuous phase, you can train the model by using the following command:

python train/implicit_trainer.py --resume_path ./configs/config_continuous.py

For the discrete phase, you should first specify the network_resume_path variable in the configs/config_discrete.py as the model path in the previous phase. Then, you can run the following command:

python train/implicit_trainer.py --resume_path ./configs/config_discrete.py

Lastly, for the Image encoder training, you should specify the auto_encoder_config_path and auto_encoder_resume_path in config_image.py similarly, and run the following command to start training:

python train/image_trainer.py --resume_path ./configs/config_image.py

Testing

We provide the pre-trained models used in the paper for reproducing the results. You can unzip the file (link) in the pretrain folder.

For the evaluation of the autoencoder, you can use this command:

python utils/mesh_visualization.py

For the evaluation of the single view reconstruction task, you can use this command:

python utils/image_mesh_visualization.py

If you need test your own trained model, you change the testing_folder variable in these two python files.

Note:

you need to set PYTHONPATH=<project root directory> before running any above commands.

Citation

If you find our work useful in your research, please consider citing:

@inproceedings{hui2022template,
    title = {Neural Template: Topology-aware Reconstruction and Disentangled Generation of 3D Meshes},
    author = {Ka-Hei Hui* and Ruihui Li* and Jingyu Hu and Chi-Wing Fu(* joint first authors)},
    booktitle={IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
    year={2022}
}

Core symbols most depended-on inside this repo

file_path
called by 13
utils/debugger.py
get_graph_feature
called by 4
models/encoder/dgcnn.py
process_state_dict
called by 3
train/implicit_trainer.py
write_ply_polygon
called by 2
utils/other_utils.py
normalize_v3
called by 2
utils/other_utils.py
set_autoencoder
called by 2
models/network.py
save_bsp_deform
called by 2
models/network.py
forward_flow
called by 2
models/decoder/flow.py

Shape

Method 80
Class 28
Function 27

Languages

Python100%

Modules by API surface

models/decoder/ode_layers/diffeq_layers.py22 symbols
utils/other_utils.py17 symbols
models/network.py17 symbols
models/decoder/ode_layers/cnf_layer.py9 symbols
data/data.py9 symbols
models/encoder/dgcnn.py8 symbols
models/decoder/bsp.py8 symbols
train/implicit_trainer.py7 symbols
models/decoder/flow.py7 symbols
models/encoder/image.py6 symbols
models/encoder/cnn_3d.py6 symbols
utils/debugger.py5 symbols

For agents

$ claude mcp add Neural-Template \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact