Skip to content

amromeshref/StyleSync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StyleSync

Description:


Table of Contents

  1. How we did it?
  2. Classification Model
  3. Similarity Detection Model
  4. Database Description
  5. How to Install?

How we did it?

Our project mainly consists of two things:

  1. Classification Model which classifies the different types of clothes. We have specifically narrowed our focus to four primary classes: jeans, jackets, shoes, and shirts. Leveraging the efficiency of YOLO (You Only Look Once), this model adeptly categorizes input images into one of these classes.
  2. Similarity Detection Model which identifies clothing items with visual similarities to a specific input. We used the Siamese network, a specialized architecture designed for similarity learning. By utilizing this network, we enable the system to discern analogous clothing items based on visual features.
  • The workflow seamlessly integrates both models to deliver a comprehensive solution. Once the Classification Model determines the clothing type of an input image, the system seamlessly transitions to the Similarity Detection Model. This latter model then conducts a search within the corresponding directory of that clothing type in the database, identifying and presenting visually similar items, inclusive of images, corresponding prices, and the names of stores where these similar items can be found.

Classification Model

  • In the development of our Classification Model, we employed the YOLOv8 (You Only Look Once version 8) model, renowned for its efficiency in object detection tasks. The primary objective was to classify images into four distinct classes: jeans, jackets, shoes, and shirts. YOLOv8, with its real-time processing capabilities, allowed us to achieve this classification seamlessly.

  • YOLOv8 Model: YOLOv8 is a state-of-the-art object detection model that excels in real-time applications. Its ability to process images in a single forward pass, detecting and classifying objects with high accuracy, made it an ideal choice for our clothing classification task.

  • Training Process: We utilized a diverse dataset obtained from Roboflow, a platform that automates the annotation and labeling of images. This not only accelerated the training process but also ensured accurate and reliable annotations for our clothing items. The dataset from Roboflow included images of jeans, jackets, shoes, and shirts, covering a wide range of variations in styles and appearances.


Similarity Detection Model

  • We used the Siamese network, a specialized neural network architecture designed for tasks involving similarity and distance measurement. Siamese networks are particularly useful in scenarios where the focus is on discerning the similarity or dissimilarity between pairs of input samples.
  • For training the network, it is fed pairs of examples, with one being a positive pair (similar image) and the other a negative pair (dissimilar image). During training, the network adjusts its weights through backpropagation to maximize the similarity between similar images and minimize the similarity between dissimilar images.

Data collection for training the Siamese network


Database Description

  • The database consists of two directories: "images" and "info".
  • The "images" directory consists of other directories for each clothing type, and each type consists of some images.
  • The "info" directory contains text files for each image in the "images" directory. The text file has information about the store that sells this item as well as its price in dollars.

How to Install?

  1. Create a directory in your device.
  2. Click on "<> Code"
  1. Copy the url of this repository.
  1. Go to the directory you created and type this command to clone this repository:
    git clone https://github.com/amromeshref/StyleSync.git
  2. Open the "StyleSync" folder.
  3. Type the following command to install the requirements file using pip:
    pip install -r requirements.txt
  4. Download the siamese_model.h5 form: https://drive.google.com/file/d/1-0g55vgp-cH-fo_tBRV9jy2cRZ4RYXb9/view?usp=sharing
  5. copy it into the "data" directory.
  6. If you are a user and want to get similar clothes to a specific item, type the following command to run the app:
    python3 user.py
  7. If you are a store owner and want to upload your products to our database, type the following command to run the app:
    python3 store.py

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •