This repository contains the source code for the ECCV 2022 paper Cross-Modal 3D Shape Generation and Manipulation. Our implementation is based on DualSDF.
Note: (07/18/2022) This codebase has not yet been systematically tested. We're working in progress. Stay tuned!
conda env create -f environment.yml
source activate edit3d
python train.py ./config/airplane_train.yaml --logdir /path/to/save/output
Download Pretrained models: ShapeNet Chairs, ShapeNet Airplanes
./examples contains data samples that were used for the following applications of our model.
python edit_via_sketch.py ./config/airplane_demo.yaml --pretrained path/to/pretrained/model --outdir path/to/output --imagelist path/to/target-images --epoch 5 --trial 1 --category airplane
python edit_via_scribble.py ./config/airplane_demo.yaml --pretrained path/to/pretrained/model --outdir path/to/output --imagelist path/to/target-images --epoch 5 --trial 1 --category airplane --partid 3
Note: --partid
indicates the list of semantic parts where the scribbles are drawn.
python reconstruct_from_sketch.py ./config/airplane_demo.yaml --pretrained path/to/pretrained/model --outdir path/to/output --impath path/to/target-image --epoch 501 --trial 10
Note: add --mask --mask-level 0.5
to get partial view of the input image
python reconstruct_from_rgb.py ./config/airplane_demo.yaml --pretrained path/to/pretrained/model --outdir path/to/output --impath path/to/target-image --epoch 501 --trial 10
Note: add --mask --mask-level 0.5
to get partial view of the input image
- Train MineGAN with pretrained MM-VADs
python few_shot_adaptation.py ./config/airplane_demo.yaml --mode train --pretrained path/to/pretrained-mm-vads --outf path/to/output--niter 200 --nimgs 10 --code shape/or/color --dataset dataset/path
- Sample from the adapted MM-VADs
python few_shot_adaptation.py ./config/airplane_demo.yaml --mode test --pretrained path/to/pretrained-mineGAN --outf path/to/output --code shape/or/color
- Download pretrained MineGAN:
These models are trained with 10 RGB examples per category: Armchairs, Side chairs, Pink chairs
@inproceedings{Cheng2022-edit3d,
author = {Zezhou Cheng and Menglei Chai and Jian Ren and Hsin-Ying Lee and Kyle Olszewski and Zeng Huang and Subhransu Maji and Sergey Tulyakov},
title = {Cross-Modal 3D Shape Generation and Manipulation},
booktitle = {European Conference on Computer Vision (ECCV) },
year = {2022}
}