How dhaan-ish/wizzers works
Project's Main Purpose and Components
• The README and file structure reveal that Stylist AI offers:
• A text-to-outfit generation model (using Hugging Face’s DiffusionPipeline).
• A human-identification model (image classification using TensorFlow/Keras).
• An outfit-recommendation system (combining semantic image search with CLIP embeddings and Langchain, plus a vector database).
• A virtual try-on module (clothing segmentation, pose estimation, and image composition).
• A fashion chatbot (powered by a fine-tuned Mistral 7B model with LLAMA Index and Langchain integration).
• In addition, the project includes a React-based frontend and a Flask-based backend.
Primary Components
• Frontend (React)
• This as a separate client-side component that handles user interactions, displays the UI (e.g., outfit recommendations, chatbot interface, virtual try-on outputs), and sends requests via API calls.
• Backend (Flask API)
• Acts as the application server that receives requests from the frontend and orchestrates calls to the individual models.
• It manages business logic, handles file uploads (e.g., images for virtual try-on), and channels responses back to the user.
• Machine Learning Modules (each as a distinct component):
• Text-To-Outfit Generation:
• Uses Hugging Face’s pretrained diffusion model to generate outfit images based on text prompts.
• Human-Identification:
• Implements a neural network built on TensorFlow/Keras to classify images as “human” or “non-human” (crucial for verifying the user's input for the try-on process).
• Outfit-Recommendation:
• Integrates semantic search with sparse (BM25) and dense (CLIP embeddings) retrieval, likely storing/retrieving fashion metadata from a vector database.
• Virtual Try-On:
• Combines clothing segmentation, pose estimation, and image composition to overlay clothing items onto user images.
• Chat-Bot:
• Uses the Mistral 7B model fine-tuned through custom data along with LLAMA Index and Langchain embeddings to process and respond to user messages.
• External Services & Resources
• A note for external integrations such as Hugging Face, possibly a vector database (if used for recommendation persistence), and any external libraries like Gradio or LLAMA Index that may be hosted or externally accessed.
Relationships and Interactions
• Each interaction from the frontend (text prompt for outfit generation, image upload for virtual try-on, selection for recommendation, or chat query) should be represented as an API call.
• Text-To-Outfit Generation module: receives text input, returns a generated outfit image.
• Human-Identification module: processes images, verifies human presence.
• Virtual Try-On module: combines segmentation and pose estimation data to produce a composite image.
• Chatbot module: processes conversation and returns style advice.
• Data flow between modules where applicable (for example, the human-identification results could be used to decide if an image is valid for the virtual try-on).
Architectural Patterns and Technologies
• Separation of concerns:
• The UI (React) is fully decoupled from the business logic (Flask) and the ML processing pipelines.
• Orchestration pattern: the backend acts as a central coordinator for multiple microservices (ML pipelines) even if they aren’t deployed as standalone services.
• Mention middleware concerns such as authentication, logging, and error handling as part of the backend component (if applicable).
• Use of notebooks for experimentation (Jupyter Notebooks in separate subdirectories) as supporting artifacts for model training and testing, which feed into the deployed models.