Back to Cocoindex

Image Search with ColPali (v1)

examples/image_search_colpali/README.md

1.0.31.0 KB
Original Source

Image Search with ColPali (v1)

This example builds an image search index using the ColPali embedding model and stores vectors in Qdrant. It supports both CLI queries and a FastAPI backend for the included frontend.

We appreciate a star ⭐ at CocoIndex Github if this is helpful.

Setup

docker run -d -p 6334:6334 -p 6333:6333 qdrant/qdrant

Run (CLI)

Install dependencies:

pip install -e .

Build/update the index:

cocoindex update main.py

Query:

python main.py query "a red car"

Run (API)

python -m uvicorn api:app --reload --host 0.0.0.0 --port 8000

Frontend

cd frontend
npm install
npm run dev

Go to http://localhost:5173 to search.