- Install the required packages:
pip install -r requirements.txt
- Create required directories:
mkdir -p models
mkdir -p images
mkdir -p indices
- Prepare the COCO dataset with embeddings using the chosen model:
python create_indices.py --use-coco -m CLIP
The -m
flag specifies which model to use. Available options are:
- CLIP (default ViT-B/32)
- CLIP_L (ViT-L/14)
- DINOv2
- ResNet
- ViT
- dh_vit - DeepHash ViT
- dh_resnet - DeepHash ResNet
- Performance benchmarks:
python benchmark.py --db_size 1000000 --search_size 20000 indices/clip.npz
- Memory usage analysis:
python benchmark_memory.py --db_size 1000000 indices/clip.npz
- Indexing method benchmarks:
# FAISS benchmarks
python benchmark_faiss.py indices/clip.npz
# HNSW benchmarks
python benchmark_hnsw.py indices/clip.npz
Start the web interface:
python app.py