Giter Club home page Giter Club logo

capri-net's Introduction

CAPRI-Net

Codes for CAPRI-Net(CAPRI-Net: Learning Compact CAD Shapes with Adaptive Primitive Assembly), Please see project page.

Please leave your questions in issue page.

Dependencies

Requirements:

Please use environment.yml to install conda environment.

Tested environment: please check environment.yml file

News

Sep 22, 2022. Update additional files for testing pre-trained model. Note the pre-trained results are much worse than fine-tuned results.

Aug 11, 2022. More processed data and pre-trained weights of shapenet are provided.

Datasets and Pre-trained weights

Point sampling methods are adopted from IM-Net and If-Net

Please download ABC processed data from here and pre-trained weights from here.

The config file spec.json needs to placed in the folder of each experiment.

Usage

Pre-training the network:

python train.py -e {experiment_name} -g {gpu_id} -p 0

Fine-tuning the network. For voxel input

python fine-tuning.py -e {experiment_name} -g {gpu_id} --test --voxel --start {start_index} --end {end_index}

For point cloud input, please change --voxel to --surface, for example:

python fine-tuning.py -e {experiment_name} -g {gpu_id} --test --surface --start 0 --end 1

Testing fine-tuned model for each shape, example is below:

python test.py -e {experiment_name} -g {gpu_id} -p 2 -c best_stage2 --test --voxel --start 0 --end 1 

If you want to get the CSG output as Figure 3 of our paper, please add --csg to above command.

Testing for pre-trained model, example is below:

python test_pretrain.py -e {experiment_name} -g {gpu_id} -p 0 -c initial --test --voxel --start 0 --end 1 --mc_threshold 0.5

Citation

If you use this code, please cite the following paper.

@InProceedings{Yu_2022_CVPR,
    author    = {Yu, Fenggen and Chen, Zhiqin and Li, Manyi and Sanghi, Aditya and Shayani, Hooman and Mahdavi-Amiri, Ali and Zhang, Hao},
    title     = {CAPRI-Net: Learning Compact CAD Shapes With Adaptive Primitive Assembly},
    booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
    month     = {June},
    year      = {2022},
    pages     = {11768-11778}
}

Code Reference

The framework of this repository is adopted from DeepSDF

capri-net's People

Contributors

fenggenyu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.