attarmauStyleCLIP
Built by Metorial, the integration platform for agentic AI.
attarmauStyleCLIP
Server Summary
Upload clothing images
Detect clothing using YOLO
Encode images with CLIP
Recommend similar clothing items
Generate clothing tag suggestions
Provide a user-friendly interface
Real-time data updates
Efficient data handling with MongoDB
This is a CLIP-Based Fashion Recommender with MCP.
A user uploads a clothing image β YOLO detects clothing β CLIP encodes β Recommend similar
/project-root
β
βββ /backend
β βββ Dockerfile
β βββ /app
β βββ /aws
β β β βββ rekognition_wrapper.py # AWS Rekognition logic
β β βββ /utils
β β β βββ image_utils.py # Bounding box crop utils
β β βββ /controllers
β β β βββ clothing_detector.py # Coordinates Rekognition + cropping
β β βββ /tests
β β β βββ test_rekognition_wrapper.py
β β β βββ test_clothing_tagging.py
β β βββ server.py # FastAPI app code
β β βββ /routes
β β β βββ clothing_routes.py
β β βββ /controllers
β β β βββ clothing_controller.py
β β β βββ clothing_tagging.py
β β β βββ tag_extractor.py # Pending: define core CLIP functionality
β β βββ schemas/
β β β βββ clothing_schemas.py
β β βββ config/
β β β βββ tag_list_en.py $ Tool for mapping: https://jsoncrack.com/editor
β β β βββ database.py
β β β βββ settings.py
β β β βββ api_keys.py
β β βββ requirements.txt
β βββ .env
β
βββ /frontend
β βββ Dockerfile
β βββ package.json
β βββ package-lock.json
β βββ /public
β β βββ index.html
β βββ /src
β β βββ /components
β β β βββ ImageUpload.jsx
β β β βββ DetectedTags.jsx
β β β βββ Recommendations.jsx
β β βββ /utils
β β β βββ api.js
β β βββ App.js # Main React component
β β βββ index.js
β β βββ index.css
β β βββ tailwind.config.js
β β βββ postcss.config.js
β βββ .env
βββ docker-compose.yml
βββ README.md
python -m venv venv
source venv/bin/activate # On macOS or Linux
venv\Scripts\activate # On Windows
pip install -r requirements.txt
uvicorn backend.app.server:app --reload
Once the server is running and the database is connected, you should see the following message in the console:
Database connected
INFO: Application startup complete.
Database connected INFO: Application startup complete.
npm install
npm start
Once running, the server logs a confirmation and opens the app in your browser: http://localhost:3000/
PYTHONPATH=. pytest backend/app/tests/test_rekognition_wrapper.py
PYTHONPATH=. pytest backend/app/tests/test_clothing_tagging.py
Detecting garments using AWS Rekognition
Cropping the image around detected bounding boxes
Tagging the cropped image using CLIP
Negative Test Case | Description |
---|---|
No Detection Result | AWS doesn't detect any garments β should return an empty list. |
Image Not Clothing | CLIP returns vague or empty tags β verify fallback behavior. |
AWS Returns Exception | Simulate rekognition.detect_labels throwing an error β check try-except . |
Corrupted Image File | Simulate a broken (non-JPEG) image β verify it raises an error or gives a hint. |
PYTHONPATH=. pytest backend/app/tests/test_clothing_tagging.py
python3 -m venv venv
pip install -r requirements.txt
pip install git+https://github.com/openai/CLIP.git
python -m backend.app.tests.test_tag_extractor
Next Step: