0% found this document useful (0 votes)
5 views

Reverse Image Search Report

Uploaded by

visheshmamoria04
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Reverse Image Search Report

Uploaded by

visheshmamoria04
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

PROJECT REPORT

REVERSE IMAGE SEARCH USING IMAGE


EMBEDDINGS

TEAM MEMBERS:
ADHIRAJ RATHORE (2022BCA003)
VARUN PARMAR (2022BCA054)
VISHESH MAMORIA (2022BCA057)

SUBMITTED TO:
DR. ARPAN GUPTA

COURSE NAME AND CODE:


APPLIED COMPUTER VISION & CS1234
1. ABSTRACT:

In this project, we use reverse image search to identify visually similar images based
on an input image. We extract features from the input image using a pre-trained
CNN model, ResNet50; our system generates a high-dimensional vector for each
image. The similarity search is performed using a Nearest Neighbours Algorithm,
and the recommendations are shown in an interactive interface using Streamlit. This
system demonstrates the application of state-of-the-art techniques in computer
vision to real-world problems in the fashion industry.

2. Introduction

Background:

Recommendation systems are integral to e-commerce platforms, helping users


discover relevant products. Traditional systems rely on metadata or user
preferences. However, image-based recommendation systems leverage visual
features, making them particularly effective for fashion, where aesthetics play a
significant role.

Objective:

To create a recommendation system that identifies visually similar image items


based on an input image.

Scope:

The prototype focuses on processing and recommending general fashion items like
shirts, dresses, and jackets. The system is designed for scalability to accommodate
larger datasets and more categories.

3. LITERATURE REVIEW:

Existing Systems:

 Metadata-based systems focus on attributes like colour, size, and brand.


 Collaborative filtering and content-based filtering dominate traditional
recommendation systems.

Deep Learning in Recommendations:


 Deep learning models like ResNet50 provide fast feature extraction with
higher accuracy.
 Feature embeddings allow for precise visual similarity comparisons.

Significance of This System:

 Provides recommendations without requiring metadata.


 Highly adaptable to new data due to its reliance on image features.

4. Methodology

4.1 Dataset Preparation

 Data Source: A famous dataset ImageNet containing images of clothing


items.
 Preprocessing Steps:
o All images are resized to 224x224 pixels.
o Pixel values are normalized to match the input requirements of the
ResNet50 model.

4.2 Feature Extraction

 Model Used: Pre-trained ResNet50 from TensorFlow/Keras.


 Process:
o Removed fully connected layers to retain only convolutional layers.
o Generated feature embeddings for each image.
o Normalized the embeddings using L2 normalization for uniformity.

4.3 Recommendation System

 Similarity Search: Used Nearest Neighbours (brute force with Euclidean


distance).
 Steps:
1. Extract features from the uploaded image.
2. Compare them with precomputed embeddings.
3. Retrieve the top 5 most similar images.

4.4 User Interface

 Framework: Streamlit.
 Features:
o Image upload functionality.
o Display of recommendations in a grid format.
o Simple and user-friendly interface.
5. IMPLEMENTATIONS:

Libraries and Tools:

 TensorFlow/Keras: For deep learning and ResNet50 model.


 Scikit-learn: For Nearest Neighbors algorithm.
 Streamlit: For the user interface.
 Pillow, NumPy, OpenCV: For image processing.

Key Code Snippets:

1. Feature Extraction:

def extract_features(img_path, model):

img = image.load_img(img_path, target_size=(224, 224))

img_array = image.img_to_array(img)

preprocessed_img = preprocess_input(np.expand_dims(img_array, axis=0))

result = model.predict(preprocessed_img).flatten()

return result / norm(result)

2. Recommendation Logic:

def recommend(features, feature_list):

neighbors = NearestNeighbors(n_neighbors=6, algorithm='brute',


metric='euclidean')

neighbors.fit(feature_list)

distances, indices = neighbors.kneighbors([features])

return indices
6. Results:

 Input Image: An uploaded image of a shirt.


 Recommendations:
o Displayed 5 visually similar images from the dataset.
 User Experience:
o Smooth and accurate recommendations.
o Real-time response for uploads.

7. CONCLUSION:

The Fashion Recommender System effectively demonstrates the use of deep


learning for image-based recommendations. Its interactive interface and precise
recommendations address the gap in the visual search for fashion. Future
enhancements can include integrating user preferences and expanding the dataset

You might also like