Skip to content

anniedoris/GenCAD-Code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Summary of Datasets

Our datasets can be accessed using Huggingface or the Downloadable links below.

CADCODER/GenCAD-Code: A dataset of 163k images of CAD models pair with CadQuery Python code. This dataset is dervied from the DeepCAD dataset.

    Huggingface

CADCODER/real_photo_test: A dataset of 400 images of 3D printed CAD objects from the test subset of the DeepCAD dataset.

    Huggingface

Generating our Datasets

We provide the scripts we used to create our datasets below, in case you'd like to adapt them to your own needs.

Generating GenCAD-Code:

  1. Download the DeepCAD vectors from this link in the deepcad_derived directory and unzip.

  2. Create the necessary environment using:

conda env create -f environment.yml
  1. With the environment activated, run the following to convert the .h5 vector files into Python CadQuery files. It should take ~2 minutes for all files to generate.
python scripts/h5tocadquery.py
  1. Download the rendered CAD images from the GenCAD dataset using this link. Download the zip in deepcad_derived/data directory and unzip. TODO: provide actual script to generate these images.

  2. Merge all the components of the dataset and upload it to huggingface using the following:

python scripts/gencadcode_to_hf.py

Generating Real Photo Test Data:

First, load HEICs into the real_photo_test_set/heics directory. Then, run the following to convert HEICs into PNGs:

python scripts/process_heic.py --heic_dir real_photo_test_set/heics --save_dir real_photo_test_set/pngs

Next, run the script to push the dataset to huggingface:

python scripts/upload_realphoto_to_hf.py

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages