Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Embedding Galaxy

Embedding Galaxy Preview Image

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.

Setup

  1. Clone the repo and install dependencies:

    uv sync
  2. Create a .env file with your Google API key:

    GOOGLE_API_KEY=your_key_here

    Works great with free rate limits from Google AI Studio.

  3. Run the server:

    uv run python main.py
  4. Open http://localhost:8000

Embedding Galaxy Full Site Image

Usage

  • 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

How it works

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.

About

3D image explorer that uses Google Gemini's embedding model to map images into semantic space.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages