← all repositories
matsui528/sis

Image search in 2 Python scripts, no GPU required

A dead-simple visual search engine that extracts VGG16 features and serves them over Flask, built to teach rather than scale.

sis
Velocity · 7d
+0.2
★ / day
Trend
steady
star history

What it does Drop a folder of JPGs into static/img, run offline.py to extract 4096-dimensional VGG16 fc6 features, then run server.py to get a Flask web interface. Upload a query image and the server brute-forces the nearest neighbors by linear scan. No GPU needed; tested on Ubuntu 18.04 and WSL2.

The interesting bit The whole system is intentionally primitive — linear scan, no indexing, no approximate nearest neighbors — because it was built for a CVPR 2020 tutorial on implementing retrieval from scratch. The pedagogical value is the point; the performance is not.

Key highlights

  • Two-script architecture: offline.py for feature extraction, server.py for serving
  • Uses Keras VGG16 with ImageNet weights; first run downloads weights automatically
  • Includes AWS EC2 deployment notes (open port 5000, use m5.large or similar)
  • Suggests uWSGI + nginx or AWS AppRunner for “advanced” deployment
  • Live demo and tutorial slides/video available

Caveats

  • Linear scan means search slows linearly with database size; no ANN in sight
  • Only .jpg files supported; format flexibility unclear
  • Flask’s built-in server is not production-ready; the README nudges you toward uWSGI/nginx

Verdict Grab this if you’re teaching or learning image retrieval basics and want something you can read in an afternoon. Skip it if you need a production search backend — this is a learning skeleton, not a skeleton you should ship.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.