Skip to content

ozikazina/pova_2024

Repository files navigation

POVa 2024 Project - Content-Based Image Search

Installation

  1. Install the required packages:
pip install -r requirements.txt
  1. Create required directories:
mkdir -p models
mkdir -p images
mkdir -p indices

Usage

Setting up the Dataset

  1. 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

Running Benchmarks

  1. Performance benchmarks:
python benchmark.py --db_size 1000000 --search_size 20000 indices/clip.npz
  1. Memory usage analysis:
python benchmark_memory.py --db_size 1000000 indices/clip.npz
  1. Indexing method benchmarks:
# FAISS benchmarks
python benchmark_faiss.py indices/clip.npz

# HNSW benchmarks
python benchmark_hnsw.py indices/clip.npz

Running the Search Interface

Start the web interface:

python app.py

About

POVa 2024 Project - Image embedding

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages