Mangakensaku is a simple yet powerful FastAPI-based application that takes a text query and retrieves the most relevant manga panels. It was built primarily to understand how FAISS works for similarity search over image embeddings.
- 🔍 Search manga panels using natural language queries
- 🖼️ Retrieve semantically similar images using CLIP embeddings
- ⚡ Fast approximate nearest neighbor search powered by FAISS
- ✅ Normalized embeddings +
IndexFlatIP
for best performance
- FastAPI for API framework
- FAISS for efficient similarity search
- CLIP for text & image embeddings
- Python for the backend logic
- A query is embedded using the CLIP model.
- The embedding is normalized to unit length.
- FAISS retrieves top-k most relevant images using
IndexFlatIP
. - Relevant manga panel URLs or paths are returned.
Note: FAISS
IndexFlatIP
works best with normalized embeddings because it uses inner product (which becomes cosine similarity when vectors are normalized).
git clone https://github.com/yourusername/mangakensaku.git
cd mangakensaku
pip install -r requirements.txt
uvicorn app.main:app --host 0.0.0.0 --port 10000
https://panelsdesu.com/