Visualization of generated dataset
About iShape dataset: https://ishape.github.io/
Source code of building iShape-Branch, Fence, Log, Hanger, and Wire.
We provide two methods to run this code:
- Docker: We are highly recommend this solution. All you need is installing docker and run a single command line.
- Install from scratch: A little bit complex. If you get any problem when install from scratch, you can also refer to Dockerfile which includes details installation instructions.
Build dataset by one command line:
mkdir synthetic_ishape_dataset
# Docker size of diyer22/ishape is about 15GB
docker run -v `pwd`/synthetic_ishape_dataset:/synthetic_ishape_dataset diyer22/ishape
Require:
- Ubuntu (tested on 18.04)
- Python >= 3.7
- Blender >= 2.90
Steps:
mkdir ishape_dataset && cd ishape_dataset
# prepare code and source asset
git clone [email protected]:iShape/build_synthetic_ishape.git
git clone [email protected]:iShape/source_asset.git
-
Prepare background:
python build_synthetic_ishape/tool/download_background_hdri.py
- Which will download hdr file from HDRI Haven to
build_synthetic_ishape/source_asset/shared/hdri
(about11GB
)
-
Synthesis dataset by Blender:
-
cd build_synthetic_ishape
-
You can build whole iShape synthetic dataset by:
python build_synthetic_ishape.py
-
Or build some sub-datsets like:
blender --background --python branch.py -- DIR ../synthetic_ishape_dataset/branch/train/ IMG_NUM 2000
-
Dataset file struct: tree synthetic_ishape_dataset/branch/train/ -L 1
synthetic_ishape_dataset/branch/train/
├── depth
├── image
├── instance_map
├── vis # Visualization
└── ycb_6d_pose
Visualization: Open synthetic_ishape_dataset/branch/train/vis/100.jpg
:
Generate COCO style dataset (optional):
python build_synthetic_ishape/tool/instance_map_to_coco.py \
--dirr synthetic_ishape_dataset/branch/train --mask_encoding rle # Or --mask_encoding poly
ls synthetic_ishape_dataset/branch/train/coco_format/
# instances_train2017.json
# train2017