This project is based on Mathias Eitz's paper "Sketch-Based Shape Retrieval".
The idea is quite simple, 3D models are complex and can not be given directly to any machine learning mecanisms. So, instead of using the whole model, we use different views of the model. Then we summarize the view with words using K-Means and run a nearest neighbor classifier on these bag-of-features.
There are two parts in the project, the online query is coded in the src directory, whereas the offline preparation is in the utils folder. Some of the codes are similar. The offline part consists of multiple modules governed by shell script.
This repository contains some modules that can be used in other jobs.
- K-Means with CUDA (CuBLAS, CuSPARSE, etc.)
- TF-IDF database for document searching
- Gabor filter
- Contour extractor
- PLY 3D model to 2D image with different angles
- OFF to PLY converter
To run this code, you will need:
- Data: images and 3D models
- VTK library
- OpenCV
- CUDA and Nvidia GPU
- C++ 11 compiler
Then create your own pipeline as follow:
- Create a folder named 'pipeline' as the same level of 'src'
- Put the model folder inside it
- Generate PLY models and views pictures with script inside the 'utils' (You will need to compile first the program inside 'utils')