How ahmetnasri/retrieval-pipeline works
This is a GPU-accelerated image retrieval API. A client submits an image to FastAPI, which can add embeddings or run searches; the documented full workflow uses two global-retrieval phases, then local-feature verification, with optional rotation handling. The vector database owns embedding and Qdrant operations, while separate modules implement embedding and local-feature extraction. The README documents the overall stages, but parts of the API and retrieval implementation were not sampled, so some stage links rely on that documentation.
Main entry points: app.py FastAPI endpoints · retrieve.py Retrieval coordinator · main.py API runner · main_decision_maker.py Feature preparation
Components 15
API and configuration
- FastAPI endpoints
src/app.py - API runner
src/main.py - Runtime settings
src/helpers/config.py
Global retrieval
- Retrieval coordinator
src/retrieve.py - Phase 1 search
src/retrieve.py - Phase 2 refinement
src/retrieve.py - SSCD embeddings
src/lightweight_model.py
Local matching
- Feature preparation
src/main_decision_maker.py - SuperPoint extractor
src/superpoint_modified.py - Local matching
src/retrieve.py
Retrieval state
- Qdrant vectors
- Feature files
Other components
- Image client
- LightGlue matcher
- Ranked results
Connections 17
- Image client → FastAPI endpoints: submits image
README.md - API runner → FastAPI endpoints: runs
src/main.py - API runner → Runtime settings: loads
src/main.py - FastAPI endpoints → Runtime settings: imports
src/app.py - FastAPI endpoints → Retrieval coordinator: invokes
src/app.py - Retrieval coordinator → SSCD embeddings: uses model
src/retrieve.py - Retrieval coordinator → Feature preparation: creates
src/retrieve.py - Retrieval coordinator → Qdrant vectors: searches and writes
src/retrieve.py - FastAPI endpoints → Phase 1 search: queries phase 1
README.md - FastAPI endpoints → Phase 2 refinement: refines candidates
README.md - FastAPI endpoints → Local matching: verifies candidates
README.md - FastAPI endpoints → Ranked results: returns scores
README.md - Retrieval coordinator → Local matching: matches features
src/retrieve.py - Feature preparation → SuperPoint extractor: uses extractor
src/main_decision_maker.py - Local matching → LightGlue matcher: matches features
src/retrieve.py - Local matching → Feature files: reads candidates
src/retrieve.py - FastAPI endpoints → Local matching: optionally rotates
README.md