Compositional Sketch Search
Official repository for ICIP 2021 Paper: Compositional Sketch Search
Requirements
Install and activate conda environment
conda env create -f env.yml
conda activate compsketch
cd src
If you're having trouble with installation, try changing faiss-gpu
to faiss-cpu
in env.yml
.
Indexing
Either download faiss index for OpenImages or Unsplash indexes here and place them in indexes/
or index your own dataset like so:
python indexing.py --root PathToImages --name IndexName
Searching
Run the streamlit app
streamlit run streamlit_app.py
If you are using a custom dataset:
- Pick 'Custom' in the Dataset selection box.
- Pick index file in the second selection box.
- Paste the same dataset root you used during indexing.
Sketch objects, using one colour per object. Press "Search" to see results!
Troubleshooting
On a Mac, I had to run this command to make it work
export KMP_DUPLICATE_LIB_OK=TRUE