Giter Club home page Giter Club logo

contrastcad's Introduction

ContrastCAD

Official python implementation for the paper: Contrastive Learning-based Representation Learning for Computer-Aided Design Models

(Updated 04-30-2024) Now you can use Docker to train & test our model, without installing all the dependencies locally, by running: docker run --gpus all -it --rm fmsjung/contrastcad

Training Example

You can start training ContrastCAD with desired number of epoch by running below command (-g 0 is for GPU id):

python train_cl.py --exp_name contrastcad -g 0

If you would like to use out RRE data augmentation, simply attach some arguments as below:

python train_cl.py --exp_name contrastcad -g 0 --augment --dataset_augment_type rre

Once your ContrastCAD is done training, you may train latent-GAN as latent generative model for your ContrastCAD:

# encode data
python test_cl.py --exp_name contrastcad --mode enc --ckpt {epoch-number-here} -g 0

# train lgan
python lgan.py --exp_name contrastcad --ae_ckpt {epoch-number-here} -g 0

Evaluation Example

To evaluate the reconstruction performance:

# reconstruct data
python test_cl.py --exp_name contrastcad --mode rec --ckpt {epoch-number-here} -g 0

# evaluate
cd evaluation
# for accuracy
python evaluate_ae_acc.py --src ../proj_log/contrastcad/results/test_{epoch_number-here}
# for CD and invalid rate
python evaluate_ae_cd.py --src ../proj_log/contrastcad/results/test_{epoch_number-here} --parallel

If you would like to use our pretrained checkpoints, simply replace exp_name arguemtn with pretrained such as :

python test_cl.py --exp_name pretrained --mode rec --ckpt {epoch-number-here} -g 0

Dataset

For dataset, please refer to DeepCAD repository. Download dataset and unzip them into data directory (or whatever directory name you specify).

Citation

@ARTICLE{10559801,
  author={Jung, Minseop and Kim, Minseong and Kim, Jibum},
  journal={IEEE Access}, 
  title={ContrastCAD: Contrastive Learning-Based Representation Learning for Computer-Aided Design Models}, 
  year={2024},
  volume={12},
  number={},
  pages={84830-84842},
  keywords={Solid modeling;Shape measurement;Computational modeling;Data models;Training;Three-dimensional displays;Transformers;Design automation;Contrastive learning;CAD model;transformer autoencoder;CAD generation},
  doi={10.1109/ACCESS.2024.3415816}}


contrastcad's People

Contributors

cm8908 avatar

Stargazers

 avatar  avatar  avatar  avatar Anush Bharathi avatar Jeff Carpenter avatar Angus Stewart avatar Masaki Inaba avatar

Watchers

 avatar  avatar alex.gitanerie avatar

contrastcad's Issues

Missing files

Hi!

Thanks for your paper, it is very interesting!

I was trying to run the repo, but it appears that some files are missing.
Indeed, in trainer/trainerCL.py can be found the following imports:

from .base import BaseTrainer
from .cl_loss import *
from .scheduler import GradualWarmupScheduler

However, base.py, cl_loss.py and scheduler.py seems to be missing from the trainer folder. Could you provide them as well?

It would also be great if you could upload a requirements file as well to simplify the process of running this repo :)

Thanks a lot!

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.