Skip to content

flatneuron/Image-Identification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Image-Identification

Project Report (Google Doc)

This repository provides two approaches for image identification:

  • Exact Image Search
  • Similar Image Search using Machine Learning

📒 Notebooks


Approach Summaries

1. Exact Image Search

This notebook demonstrates how to efficiently check if an exact match of a given image exists in a database. The approach involves:

  • Generating a set of random images (as bit arrays).
  • Hashing each image using its byte representation to create a unique identifier.
  • Building an index (Python dictionary) mapping image hashes for fast lookup.
  • Measuring the time and memory required for generating images, building the index, and querying for an exact match.
  • Visualizing performance metrics (generation time, indexing time, query time, and memory usage) as the dataset size increases.

This method is highly efficient for exact matches but does not support finding similar (but not identical) images.

2. Similar Image Search (Machine Learning Approach)

This notebook implements a deep learning-based pipeline for finding visually similar images:

  • Downloads the COCO-128 dataset using Roboflow.
  • Applies SimCLR-style data augmentations to generate different views of each image.
  • Defines a custom dataset and a modified ResNet-18 model to produce 128-dimensional embeddings for each image.
  • Trains the model using the InfoNCE loss to learn meaningful image representations.
  • Computes embeddings for all images and builds a FAISS index for efficient nearest neighbor search.
  • Provides a search function to retrieve the top-k most similar images to a query image, and visualizes the results.

This approach enables robust similarity search, even for images that are not exactly the same but share visual features.


📄 Report

A detailed report describing the methodology, experiments, and results can be found here: Project Report (Google Doc)


License

This project is licensed under the MIT License.

About

This repo explains and gives working implementation for exact image search and similar image search.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published