Welcome to the Fashion Recommendation and Virtual Try-On System! This repository houses a state-of-the-art application that combines advanced machine learning techniques and an intuitive user interface to recommend fashion items and enable virtual try-ons. Whether you're a fashion enthusiast or a data science buff, this project showcases the intersection of AI, computer vision, and style.
- ResNet50 is used to extract meaningful features from images, ensuring accurate and efficient similarity detection.
- Nearest Neighbors algorithm suggests the top 5 most visually similar items.
- Visualizations like t-SNE provide deeper insights into embeddings and feature relationships.
- Integrates with the KlingAI API to enable virtual try-on functionality.
- Users upload an apparel image, and the system seamlessly combines it with the user's image.
- The process includes real-time task management, image retrieval, and enhancement.
- Feature Extraction and Normalization: The fashion images are processed through the ResNet50 model to extract meaningful features, which are then normalized using L2 normalization to ensure uniformity for similarity comparison.
- Nearest Neighbors Visualization: The top 5 most visually similar items are retrieved using the Nearest Neighbors algorithm, helping visualize how closely related different fashion items are based on their features.
- Product Details Exploration: The recommendation system not only suggests similar items but also allows users to explore product details such as the brand, category, and additional style information, providing a comprehensive view of the recommended items alongside their images.
- Frontend: Built with Streamlit for an interactive and user-friendly experience.
- Backend: Utilizes TensorFlow, Keras, and Sklearn for feature extraction, recommendation, and performance evaluation.
- API Integration: Powered by KlingAI API for advanced virtual try-on capabilities.
- Visualization Tools: TensorBoard and Matplotlib for insights into model performance and data trends.
- Image Processing: Leverages ResNet50 to extract robust features from uploaded images.
- Recommendation Generation: Uses Nearest Neighbors to find visually similar fashion items.
- Virtual Try-On: Encodes images, communicates with KlingAI API, and retrieves augmented outputs.
- Install the following Python libraries:
pip install streamlit tensorflow scikit-learn matplotlib pillow requests pyjwt
- Clone this repository:
git clone https://github.com/syedanida/FashionRecommender-and-VirtualTryOn.git
- Ensure the following files are in the repository:
image_features_embedding.pkl
: Pre-computed feature embeddings.img_files.pkl
: Metadata of fashion images.
- Navigate to the project directory:
cd FashionRecommender-and-VirtualTryOn
- Run app.py:
python run.py
- Start the Streamlit app:
streamlit run app.py
- Open the application in your browser at
http://localhost:8501
.
https://www.kaggle.com/datasets/paramaggarwal/fashion-product-images-small https://www.kaggle.com/datasets/paramaggarwal/fashion-product-images-dataset
- Upload a fashion item image.
- The model extracts features using ResNet50 and compares them against the pre-computed embeddings.
- The top 5 visually similar items are displayed with images and links.
- Upload your photo and a garment image.
- The system sends the images to the KlingAI API for processing.
- The combined output is returned and displayed in real-time.
- Confusion Matrix
- Highlights true positives and negatives, showcasing model accuracy.
- ROC Curve
- AUC = 0.95, demonstrating excellent model performance.
- TSNE Plot
- Visualizes ResNet50 embeddings for meaningful clustering of apparel items.
- TensorBoard Metrics
- Tracks training loss and validation accuracy to guide optimization.
- Model Performance: Achieved high accuracy with minimal misclassification.
- Key Features: SHAP analysis confirms that attributes like color, material, and style drive effective recommendations.
- Scalability: Modular architecture supports adding new models or APIs seamlessly.
- Seasonal Recommendations: Suggest outfits based on seasons and current trends.
- Outfit Planning: Integrate tools for assembling complete looks.
- Multimodal Enhancements: Incorporate textual descriptions and user preferences for personalized results.
- KlingAI for the API integration.
- Streamlit for the intuitive frontend framework.
- TensorFlow and Keras for powering the deep learning models.
Enjoy exploring and contributing to the Fashion Recommendation and Virtual Try-On System!