Stored memories
Beautiful sunset at the beach
0.87
Snowy mountain peaks in winter
0.79
City skyline at night with lights
0.82
How it works
01
Upload
Photo + optional note + GPS sent to POST /memory. Image saved to local filesystem with a timestamp filename.
02
Embed
CLIP encodes both the image and the text note into 512-dimensional vectors in a shared semantic space.
03
Store
Embeddings serialised as BLOBs in SQLite alongside timestamp, GPS coordinates, and image path.
04
Retrieve
Query encoded with CLIP. Cosine similarity computed against all stored embeddings. Best match returned with score.
API endpoints
POST
/memory
Store a new memory. Generates CLIP embeddings for the image and text note, persists to SQLite with GPS.
photo · required
note · optional
lat · optional
lon · optional
POST
/search
Search by natural language. Encodes query with CLIP, computes cosine similarity against all stored embeddings, returns best match.
query · required
GET
/
Returns API info and available endpoints.
Stack
Python
FastAPI
CLIP vit-base-patch32
PyTorch
SQLite
NumPy
Pillow
Uvicorn