A 3D image explorer that uses Google Gemini's embedding model to map images into semantic space. Upload images and watch them arrange themselves in a galaxy based on visual and semantic similarity. Similar images cluster together, connected by edges.
-
Clone the repo and install dependencies:
uv sync
-
Create a
.envfile with your Google API key:GOOGLE_API_KEY=your_key_here
Works great with free rate limits from Google AI Studio.
-
Run the server:
uv run python main.py
- Upload: drag and drop images onto the page, or use the upload button (PNG/JPEG)
- Navigate: drag to look around, scroll to fly forward/back, WASD + Space/Shift to move
- Inspect: click any image node to see its similarity connections
- Tune: adjust the connection threshold and node size sliders in the sidebar
Each uploaded image is embedded using gemini-embedding-2-preview (3072 dimensions). On every page load the embeddings are PCA-reduced to 3D coordinates and cosine similarity is computed between all pairs. Images with similarity above 0.65 are connected by lines.

