Skip to content

Kinara2020/FITFIND

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

👁️ FitFind — AI-Powered Visual Fashion Search Engine

Stop searching with words. Search with your eyes.

FitFind is an intelligent visual fashion search engine that lets users upload any clothing image and instantly finds visually similar products from a database of 44,000+ fashion items using deep learning and vector similarity search.

✨ Features

  • 🔍 Visual Search — Upload any fashion image, get 5 visually similar items instantly
  • 👗 Explore — Browse 44,000+ fashion products with category filters
  • 📊 Analytics Dashboard — Real-time search analytics powered by PostgreSQL
  • For Businesses — REST API documentation for e-commerce integration
  • 🖱️ Product Popup — Click any product to see full details and find similar items
  • 🌙 Dark Theme — Clean, modern dark purple UI

🧠 How It Works

User uploads image ↓ ResNet50 extracts 2048-dimensional feature vector ↓ FAISS searches 44,419 product vectors ↓ Top 5 most similar products returned ↓ PostgreSQL fetches full product details ↓ Results displayed with similarity scores


🛠️ Tech Stack

AI / Machine Learning

Tool Purpose
ResNet50 (PyTorch) Visual feature extraction
FAISS Vector similarity search
OpenCV + Pillow Image preprocessing

Backend

Tool Purpose
Python Core language
Flask REST API framework
PostgreSQL Product database
SQLAlchemy ORM

Frontend

Tool Purpose
React UI framework
React Router Navigation
Axios API calls
Recharts Analytics charts
TailwindCSS Styling

Data

Tool Purpose
Pandas + NumPy Data processing
Kaggle Fashion Dataset 44,000+ product images

📁 Project Structure

fitfind/ │ ├── backend/ │ ├── app.py # Flask REST API │ ├── feature_extractor.py # ResNet50 feature extraction │ ├── similarity_search.py # FAISS similarity search │ ├── build_index.py # Build FAISS index │ └── database/ │ ├── db_connect.py # PostgreSQL connection │ ├── schema.sql # Database schema │ └── load_data.py # Load dataset to DB │ ├── frontend/ │ └── fashionlens-ui/ # React application │ └── src/ │ ├── pages/ │ │ ├── SearchPage.js │ │ ├── ExplorePage.js │ │ ├── AnalyticsPage.js │ │ └── ApiPage.js │ ├── components/ │ │ └── Navbar.js │ └── services/ │ └── api.js │ ├── data/ │ ├── images/ # 44,000+ product images │ └── fashion_dataset.csv # Product metadata │ ├── models/ │ ├── fashion_index.faiss # FAISS vector index │ └── valid_ids.pkl # Product ID mapping │ └── requirements.txt


⚙️ Setup & Installation

Prerequisites

  • Python 3.10+
  • Node.js 18+
  • PostgreSQL 16+

1. Clone Repository

git clone https://github.com/Kinara2020/fitfind.git
cd fitfind/fashionlens


2. Install Python Dependencies

pip install -r requirements.txt


3. Download Dataset

Download from Kaggle:
👉 Fashion Product Images (Small)

Place files in:

	•	Images → data/images/
	•	CSV → data/fashion_dataset.csv

4. Setup PostgreSQL

Create database and run schema:

CREATE DATABASE fashionlens;


Then run backend/database/schema.sql in pgAdmin.

5. Load Data

python backend/database/load_data.py


6. Build FAISS Index

python backend/build_index.py


⚠️ This takes 30-40 minutes for 44,000 images.

7. Run Backend

python backend/app.py


Flask API runs on http://localhost:5000

8. Run Frontend

cd frontend/fashionlens-ui
npm install
npm start


React app runs on http://localhost:3000

🔌 API Endpoints



|Method|Endpoint           |Description                       |
|------|-------------------|----------------------------------|
|POST  |`/api/search`      |Upload image, get similar products|
|GET   |`/api/products`    |Browse products with filters      |
|GET   |`/api/products/:id`|Get single product details        |
|GET   |`/api/categories`  |Get all categories                |
|GET   |`/api/analytics`   |Search analytics                  |
|GET   |`/images/:filename`|Serve product images              |

Sample Request

import requests

with open("shirt.jpg", "rb") as img:
    response = requests.post(
        "http://localhost:5000/api/search",
        files={"image": img}
    )

results = response.json()
print(results)


Sample Response

{
  "results": [
    {
      "product_id": 15970,
      "name": "Navy Blue Casual Shirt",
      "category": "Apparel",
      "color": "Navy Blue",
      "similarity_score": 0.94,
      "image_url": "/images/15970.jpg"
    }
  ],
  "time_taken_ms": 120,
  "search_id": 42
}


🗄️ Database Schema

customers    → user profiles
products     → 44,000 fashion items
searches     → search history and logs
analytics    → daily search statistics


📊 Performance



|Metric            |Value  |
|------------------|-------|
|Products Indexed  |44,419 |
|Feature Dimensions|2048   |
|Search Speed      |< 500ms|
|Top-5 Accuracy    |~94%   |
|Dataset Size      |~600MB |

🎯 Use Cases

	•	E-commerce Platforms — Visual search for product discovery
	•	Fashion Apps — Find similar styles from any photo
	•	Retail Stores — Match customer reference photos to inventory

🔮 Future Improvements

	•	Deploy on cloud with GPU support
	•	Add Indian fashion dataset (sarees, kurtas, lehengas)
	•	Integrate real e-commerce buy links
	•	Mobile app (React Native)
	•	User authentication and saved searches
	•	Real-time price comparison.

About

AI-powered visual fashion search engine built with ResNet50, FAISS, Flask, React & PostgreSQL. Upload any clothing image and find visually similar styles from 44,000+ products instantly.Find your best fitted one and also you can use the api key.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages