Helper scripts for sketch-based 3D shape experiments.
Useful for rendering and pre-processing SHREC13, SHREC14 and PART-SHREC14 datasets.
SHREC 2013 [website]
SHREC 2014 [website]
Run meta.py to create pandas dataframes for both datasets. There will be 2 dataframes per dataset: one for the sketches, one for the CAD models. Each entry in the dataframe consist of the filename path, the label and the split.
Run w2v.py to get the word vector for all class names.
Word vectors are stored in a dictionary in a .npz
file.
It requires the gensim library:
conda install -c anaconda gensim
- Download Blender 2.79 [link]
- Use the Blender script from the MVCNN project [link]
- Render 2D projections with BlenderPhong
Following the MVCNN paper,
render 12 views by placing the camera every 30 degrees, with an elevation of 30 degrees from the ground floor.
This requires to modify the original phong.py
script.
Check this fork for more info.
It also requires the python blender package:
conda install -c kitsune.one python-blender=2.79
Once everything is installed, run render.sh to render the 2D views for all CAD models.
Run resize_sk.py. Sketches will be resized to 256x256.
Run resize_cad.py. Images of 1024x1024 will be cropped with a margin of 100px, and resized to 256x256.
If you find these scripts useful, please consider citing our paper:
@article{
Thong2020OpenSearch,
title={Open Cross-Domain Visual Search},
author={Thong, William and Mettes, Pascal and Snoek, Cees G.M.},
journal={CVIU},
year={2020},
url={https://arxiv.org/abs/1911.08621}
}