Skip to content

TrendLens: Choose a trending hashtag, select from the fetched images, and get exact similar clothing recommendations. Enhance your style with the latest trends, Developed for Myntra!

Notifications You must be signed in to change notification settings

MrCasler/TrendLensmyntra

 
 

Repository files navigation

TrendLens

Objective:

TrendLens aims to enhance the shopping experience by integrating advanced web scraping and machine learning technologies. It automates the process of identifying trending clothing items from social media, analyzes them, and recommends similar products available on Myntra, thus increasing user engagement and boosting sales.

Project PPT

Github Version (SELECT VIEW RAW , DOWNLOAD AND SEE) : https://github.com/Riya79hp/TrendLensmyntra/blob/main/TrendLens.pptx

Demo Video

Github Version (SELECT VIEW RAW , DOWNLOAD AND SEE) : https://github.com/Riya79hp/TrendLensmyntra/blob/main/Demo%20Video.mp4

Tech stack explanation video

Key Technologies:

Web Scraping & Automation:

  • Selenium: Automates the login and scraping process on Instagram, Twitter, and Facebook to collect trending hashtags and images related to clothing.
  • Instagram To fetch images from trending tags
  • Google Images To fetch images that are trending for the tag

Image Processing & Analysis:

  • TensorFlow & OpenCV: Utilizes Convolutional Neural Networks (CNN) models to analyze the scraped images.
  • ResNet-50: A powerful CNN model used to process and identify features in the images, enhancing the accuracy of the recommendations.

Backend:

  • Flask: Serves as the backend framework to handle data processing and communication between the frontend and the machine learning models.

Frontend:

  • React.js: Provides an intuitive user interface where users can choose trending hashtags, select from the fetched images, and receive personalized clothing recommendations.

Implement Yourself

Run Features extract File (Extractfeaturesfromdataset.ipynb)

Run server (pt.ipbny)

Run Frontend (npm start)

Search any query

Get the results in displayed

click on reccommend like this

Get recommended exact similar clothes

Workflow:

Data Collection:

Selenium scripts log in to social media platforms and scrape trending hashtags and related images. The process ensures that data collection is completed in under 60 seconds, providing real-time trends.

Image Analysis:

Myntra's images are fed into TensorFlow's CNN models, specifically ResNet-50, to extract features and identify patterns. OpenCV assists in processing these images to ensure they are in the correct format and quality for analysis.

Recommendation System:

The processed images are compared against User Selected image to find visually similar clothing items. The recommendation algorithm matches the style, color, and other features of the trending images with items available on Myntra, achieving an accuracy improvement of 75%.

User Interface:

The React.js frontend allows users to interact seamlessly with the application. Users can choose a trending hashtag, view the fetched images, and select an image to receive clothing recommendations. The interface dynamically updates to provide personalized and relevant suggestions, enhancing the shopping experience.

Working Flowchart

LINK :https://www.canva.com/design/DAGKqp3y8ac/qOpRdE4a5BPrFb-Phlc2pg/edit

Working:

Gathering Tags ✅ (Attack No-1)

Barbie movie trending(Movie centric)

Zendaya fashion trending (celeb centric)

Personal Noise watch trending (personal centric)

Personal Black Saree trending(personal centric)

Using RESNET(CNN) on Myntra's Dataset ✅ (Attack No-2)

Using CNN on user selected image and performing KNN to find the nearest vectors ✅ (Attack No-3)

Black bodycon recommendation trending from #zendayafashion

Coffee coloured shouldercut bodycon trending from #zendayafashion

Steel strap noise watch trending from #noisewatch

Pink and white check from from #barbiemovie

Heeramandi movie lehenga is at your eyesight #heeramandimovie

Black saree trending from #blacksaree

Key Benefits:

Real-Time Trends:

Keeps the product recommendations aligned with the latest social media trends.

Enhanced Accuracy:

Uses advanced CNN models to ensure that recommendations closely match the trending items.

User Engagement:

Provides a seamless and interactive experience, increasing user satisfaction and engagement.

Revenue Boost:

By showcasing trending items and recommending similar products, the project drives sales and contributes to Myntra's revenue growth.

Prerequisites

  • Python (latest version recommended)
  • Git

Setup Instructions

Step 1: Clone the Repository
Clone the repository to your local machine:
git clone https://github.com/Riya79hp/TrendLensmyntra.git
Jupyter notebook code lies in src of the folder
cd frontend

Step 2: Set Up a Virtual Environment
Create and activate a virtual environment to manage dependencies:
On Windows:
sh
python -m venv myvenv
myvenv\Scripts\activate
On macOS and Linux:
sh
python3 -m venv myvenv
source myvenv/bin/activate


Step 3: Install Dependencies
Install all required packages using pip:
sh
pip install flask
pip install flask-cors
pip install opencv-python
pip install pillow
pip install requests
pip install selenium
pip install scikit-learn
pip install tensorflow
pip install tqdm


Step 4: Install Additional Tools
Install Jupyter Notebook:
sh
pip install jupyter notebook

Step 5: Run the Application
To run the Flask application, use the following command:
sh
pyhton pt.ipynb


Additional Notes
Ensure you have a suitable version of ChromeDriver installed for Selenium.
Download it from here.
For TensorFlow, additional libraries may be required depending on your setup (e.g., CUDA for GPU support).

Import Statements
Here are the necessary imports for your project:

import os
import time
import requests
import tensorflow as tf
from tensorflow.keras.preprocessing import image
from tensorflow.keras.layers import GlobalMaxPooling2D
from tensorflow.keras.applications.resnet50 import ResNet50, preprocess_input
import numpy as np
from numpy.linalg import norm
from tqdm import tqdm
import pickle
from flask import Flask, jsonify, request, send_from_directory
from flask_cors import CORS
from selenium import webdriver
from selenium.webdriver import ChromeOptions, Keys
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait
from selenium.common.exceptions import StaleElementReferenceException, TimeoutException, NoSuchElementException
from sklearn.neighbors import NearestNeighbors
import cv2
import base64
import re
from PIL import Image
from io import BytesIO

Made with ❤️ By HERCODE For Myntra

Riya Kumari

Khushi Chaudhary

About

TrendLens: Choose a trending hashtag, select from the fetched images, and get exact similar clothing recommendations. Enhance your style with the latest trends, Developed for Myntra!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 99.6%
  • Other 0.4%