MuhammadLab
Computer VisionBrowser-basedMobileNet embeddingsCosine similarityImage retrievalStudent lab

Image Similarity and Embedding Explorer

Upload two or more images, extract MobileNet feature embeddings, and compare visual similarity with cosine similarity scores.

This page teaches how computer vision systems convert images into embedding vectors before comparing them for retrieval. Instead of class labels, the model produces features that can be used for duplicate detection, reverse-image search, clustering, and ranking similar images.

What an embedding is

An embedding is a feature vector that summarizes an image in a numerical form. Similar images tend to produce vectors that point in similar directions in embedding space.

How similarity is measured

This page extracts MobileNet features before the final classifier layer, then compares image vectors with cosine similarity. Higher cosine similarity means the images activate similar visual features.

Why this matters

Image embeddings power duplicate detection, reverse-image search, clustering, and retrieval systems. Students can use this lab to see how image search logic works without needing a server.

Model: Loading TensorFlow.js and MobileNet embeddings...
Images: 0
Loading MobileNet embeddings...

Similarity Matrix

Upload at least two images and run the embedding extractor to generate the similarity matrix.

Top Match

The strongest match will appear after embeddings are extracted.

Ranked Pairs

Ranked image pairs will appear once the similarity matrix is available.

Teaching Notes

  • Feature extraction removes the final class decision and keeps the visual representation learned by the network.
  • Cosine similarity compares vector direction, which is useful when students care about pattern similarity rather than raw pixel equality.
  • This is the same basic logic behind image retrieval, duplicate detection, visual search, and nearest-neighbor matching.
  • High similarity does not always mean identical objects. Backgrounds, color palettes, textures, and framing can also influence the embedding.