Skip to content

An AI-powered web application that allows users to virtually try on clothing by overlaying garment images on user images. Built with computer vision techniques, this project enables users to see how clothes fit without the need for a physical try-on, transforming online shopping experiences.

License

Notifications You must be signed in to change notification settings

astromanu007/AI_VIRTUAL_CLOTH_TRY_ONS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI-Powered Virtual Try-On for Clothing 👚👖🤖

Overview 🚀👗👕

This project is an AI-driven virtual try-on system that enables users to visualize how different garments look on them without physically trying them on. Using a combination of object detection, body pose estimation, and image overlay, this project provides a realistic virtual fitting experience that can be integrated with e-commerce platforms for online shopping.

Features ✨🛠️

Real-time virtual try-on for various garments 🧥👗 Body pose estimation using MediaPipe for accurate garment alignment 🧍‍♂️💃 Personalized fit recommendations based on user body measurements 📏👕 Distance estimation and size adjustments for realistic garment overlay 📐📸 Integration with e-commerce platforms for easy purchasing options 🛒💳 Prerequisites 📋💻 Before running the project, make sure you have the following installed:

🐍 Python 3.7+

##Required Packages: Install the necessary Python packages by running the following command:

bash Copy code pip install numpy opencv-python mediapipe flask torch torchvision How to Run 🏃‍♂️💻 Step 1: Clone or Download the Project 📁📥 Download or clone the project repository to your local machine:

bash Copy code git clone https://github.com/your-username/AI-Virtual-Try-On Navigate to the project directory:

bash Copy code cd AI-Virtual-Try-On Step 2: Set Up the Model Files 📂🔗 This project requires several pre-trained models to run various features:

SMPL-X Model: For accurate 3D body modeling. Pix2Pix (cGAN) Model: For garment overlay simulation. Fully Connected Neural Network (FCNN): For personalized fit recommendations. Ensure these files are stored in the models/ directory as specified in the project structure.

Step 3: Running the Application 🖥️🚀 To start the virtual try-on system, run the following command:

bash Copy code python app.py Navigate to http://127.0.0.1:5000 in your web browser to access the application.

Command-Line Arguments

--model: Path to the trained garment overlay model. --prototxt: Path to the Caffe deploy prototxt file (for object detection). --confidence: Minimum probability to filter weak detections (default is 0.5).

Using the Application 🎥🖱️

Webcam Access: If enabled, the app can use your webcam to capture real-time images. Image Uploads: Upload images of both the user (model) and the garment to be tried on.

Key Interactions:

Click "Try On" to start the virtual try-on. Press q to quit the application if using live detection.

Project Details 📊📈

Technology Stack Used 💻🔧

Pix2Pix (cGAN) for garment overlay simulation 👗📦 MediaPipe Pose for human pose estimation 🧍‍♀️🤸‍♂️ SMPL-X Model for realistic 3D body modeling 📏🧑‍🎤 OpenCV for image processing 📷🖼️ Flask for web application framework 🌐🖥️ PyTorch for machine learning tasks 🔥💻

Main Functionalities of the Script:

Garment Overlay Simulation: Uses Pix2Pix (cGAN) to overlay garments onto the user's model image. Pose Estimation: MediaPipe Pose identifies key body landmarks for accurate garment alignment. Size Recommendation: Recommends the most suitable garment size based on user body measurements. Real-Time Processing: Displays results in real time, allowing users to try different garments quickly.

Troubleshooting 🛠️🔧

Model Files Missing: Ensure that the necessary model files are downloaded and located in the models/ directory. Webcam Not Detected: Verify that your webcam is connected and accessible by your browser or device. Dependency Issues: Run pip install -r requirements.txt to ensure all dependencies are installed. Example Output 📸🖼️ Upon running the script, you will see:

The user's uploaded model image with the garment overlay applied. Key landmarks on the body for alignment. Size recommendations based on body measurements.

Additional Notes 📝🔍

Performance: Real-time performance depends on your device’s computational power. Future Enhancements: Plans include adding more robust body and garment segmentation for improved overlay accuracy and compatibility with additional clothing styles. Focal Length Calibration: Modify the focal length in estimate_distance() for more accurate distance estimations, if necessary.

License 📜

This project is licensed under the MIT License. See the LICENSE file for details.

Created by 👨‍💻

Manish Dhatrak Email: [email protected] LinkedIn Profile

Contact 📧💬

For any questions or issues, please feel free to reach out. 🤝

Email: [email protected] GitHub: GitHub Profile

About

An AI-powered web application that allows users to virtually try on clothing by overlaying garment images on user images. Built with computer vision techniques, this project enables users to see how clothes fit without the need for a physical try-on, transforming online shopping experiences.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published