{"id":28219021,"url":"https://github.com/attarmau/styleclip","last_synced_at":"2026-05-08T13:08:36.083Z","repository":{"id":287993430,"uuid":"966480530","full_name":"attarmau/StyleCLIP","owner":"attarmau","description":"A mockup full stack app built with React, FastAPI, MongoDB, and Docker, powered by AWS Rekognition \u0026 CLIP for multi-tagging and clothing recommendations","archived":false,"fork":false,"pushed_at":"2025-06-06T09:12:40.000Z","size":360,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-06T10:24:51.521Z","etag":null,"topics":["clip","fastapi","mcp","recommender-system"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/attarmau.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-15T01:47:58.000Z","updated_at":"2025-06-06T09:12:42.000Z","dependencies_parsed_at":"2025-04-15T07:37:42.613Z","dependency_job_id":"6ca91f79-1f66-4b67-91e4-496656cf664f","html_url":"https://github.com/attarmau/StyleCLIP","commit_stats":null,"previous_names":["attarmau/mcp_recsys","attarmau/fastmcp_recsys","attarmau/styleclip"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/attarmau%2FStyleCLIP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/attarmau%2FStyleCLIP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/attarmau%2FStyleCLIP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/attarmau%2FStyleCLIP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/attarmau","download_url":"https://codeload.github.com/attarmau/StyleCLIP/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/attarmau%2FStyleCLIP/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259207072,"owners_count":22821586,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clip","fastapi","mcp","recommender-system"],"created_at":"2025-05-18T02:10:57.292Z","updated_at":"2026-05-08T13:08:36.070Z","avatar_url":"https://github.com/attarmau.png","language":"Python","funding_links":[],"categories":["Other Tools and Integrations"],"sub_categories":["How to Submit"],"readme":"# AWS_RecSys\nThis is a CLIP-Based Fashion Recommender with AWS. \n\n### 📌 Sample Components for UI\n1. Image upload\n2. Submit button\n3. Display clothing tags + recommendations\n\n# Mockup\nA user uploads a clothing image → YOLO detects clothing → CLIP encodes → Recommend similar\n\n\u003cimg width=\"463\" alt=\"Screenshot 2025-04-26 at 10 26 13 AM\" src=\"https://github.com/user-attachments/assets/93c0a75b-4ed1-4fa1-b25d-5137b8eb6af0\" /\u003e\n\n\n# Folder Structure\n```\n/project-root\n│\n├── /backend\n│   ├── Dockerfile            \n│   ├── /app\n│   ├── /aws\n│   │   │   └── rekognition_wrapper.py         # AWS Rekognition logic\n│   │   ├── /utils\n│   │   │   └── image_utils.py                 # Bounding box crop utils\n│   │   ├── /controllers\n│   │   │   └── clothing_detector.py           # Coordinates Rekognition + cropping\n│   │   ├── /tests\n│   │   │   ├── test_rekognition_wrapper.py\n│   │   │   └── test_clothing_tagging.py\n│   │   ├── server.py                    # FastAPI app code\n│   │   ├── /routes\n│   │   │   └── clothing_routes.py\n│   │   ├── /controllers\n│   │   │   ├── clothing_controller.py\n│   │   │   ├── clothing_tagging.py\n│   │   │   └── tag_extractor.py         # Pending: define core CLIP functionality\n│   │   ├── schemas/\n│   │   │   └── clothing_schemas.py\n│   │   ├── config/\n│   │   │   ├── tag_list_en.py           $ Tool for mapping: https://jsoncrack.com/editor\n│   │   │   ├── database.py       \n│   │   │   ├── settings.py       \n│   │   │   └── api_keys.py     \n│   │   └── requirements.txt      \n│   └── .env                      \n│                      \n├── /frontend \n│   ├── Dockerfile        \n│   ├── package.json              \n│   ├── package-lock.json         \n│   ├── /public\n│   │   └── index.html            \n│   ├── /src\n│   │   ├── /components            \n│   │   │   ├── ImageUpload.jsx    \n│   │   │   ├── DetectedTags.jsx   \n│   │   │   └── Recommendations.jsx \n│   │   ├── /utils\n│   │   │   └── api.js             \n│   │   ├── App.js                    # Main React component\n│   │   ├── index.js\n│   │   ├── index.css            \n│   │   ├── tailwind.config.js        \n│   │   └── postcss.config.js                    \n│   └── .env                                \n├── docker-compose.yml                     \n└── README.md \n```\n\n## Quick Start Guide\n### Step 1: Clone the GitHub Project\n### Step 2: Set Up the Python Environment\n```\npython -m venv venv\nsource venv/bin/activate  # On macOS or Linux\nvenv\\Scripts\\activate     # On Windows\n```\n### Step 3: Install Dependencies\n```\npip install -r requirements.txt\n```\n### Step 4: Start the FastAPI Server (Backend)\n```\nuvicorn backend.app.server:app --reload\n```\nOnce the server is running and the database is connected, you should see the following message in the console:\n```\nDatabase connected\nINFO:     Application startup complete.\n```\n\u003cimg width=\"750\" alt=\"Screenshot 2025-04-25 at 1 15 45 AM\" src=\"https://github.com/user-attachments/assets/7f3fc403-fb33-4107-a00c-61796a48ecec\" /\u003e\n\n### Step 5: Install Dependencies\nDatabase connected\nINFO:     Application startup complete.\n```\nnpm install\n```\n### Step 6: Start the Development Server (Frontend)\n```\nnpm start\n```\nOnce running, the server logs a confirmation and opens the app in your browser: [http://localhost:3000/](http://localhost:3000/)\n\n\u003cimg width=\"372\" alt=\"Screenshot 2025-04-25 at 9 08 50 PM\" src=\"https://github.com/user-attachments/assets/794a6dba-9fbb-40f1-9e57-c5c2e2af1013\" /\u003e\n\n# What’s completed so far:\n1. FastAPI server is up and running (24 Apr)\n2. Database connection is set up (24 Apr)\n3. Backend architecture is functional (24 Apr)\n4. Basic front-end UI for uploading picture (25 Apr)\n## 5. Mock Testing for AWS Rekognition -\u003e bounding box (15 May)\n```\nPYTHONPATH=. pytest backend/app/tests/test_rekognition_wrapper.py\n```\n\u003cimg width=\"1067\" alt=\"Screenshot 2025-05-20 at 4 58 14 PM\" src=\"https://github.com/user-attachments/assets/7a25a92d-2aca-42a8-abdd-194dd9d2e8a5\" /\u003e\n\n- Tested Rekognition integration logic independently using a mock → verified it correctly extracts bounding boxes only when labels match the garment set\n- Confirmed the folder structure and PYTHONPATH=. works smoothly with pytest from root\n\n## 6. Mock Testing for AWS Rekognition -\u003e CLIP (20 May)\n```\nPYTHONPATH=. pytest backend/app/tests/test_clothing_tagging.py\n```\n\u003cimg width=\"1062\" alt=\"Screenshot 2025-05-21 at 9 25 33 AM\" src=\"https://github.com/user-attachments/assets/6c64b658-3414-4115-9e20-520132605cab\" /\u003e\n\n- Detecting garments using AWS Rekognition \n\n- Cropping the image around detected bounding boxes\n\n- Tagging the cropped image using CLIP\n\n## 7. Mock Testing for full image tagging pipeline (Image bytes → AWS Rekognition (detect garments) → Crop images → CLIP (predict tags) + Error Handling (25 May)\n| **Negative Test Case**         | **Description**                                                                 |\n| -------------------------------| ------------------------------------------------------------------------------- |\n| No Detection Result            | AWS doesn't detect any garments — should return an empty list.                  |\n| Image Not Clothing             | CLIP returns vague or empty tags — verify fallback behavior.                    |\n| AWS Returns Exception          | Simulate `rekognition.detect_labels` throwing an error — check `try-except`.    |\n| Corrupted Image File           | Simulate a broken (non-JPEG) image — verify it raises an error or gives a hint. |\n\n```\nPYTHONPATH=. pytest backend/app/tests/test_clothing_tagging.py\n```\n\u003cimg width=\"1072\" alt=\"Screenshot 2025-05-21 at 11 19 47 AM\" src=\"https://github.com/user-attachments/assets/b41f07f4-7926-44a3-8b64-34fe3c6ef049\" /\u003e\n\n- detect_garments: simulates AWS Rekognition returning one bounding box: {\"Left\": 0.1, \"Top\": 0.1, \"Width\": 0.5, \"Height\": 0.5}\n- crop_by_bounding_box: simulates the cropping step returning a dummy \"cropped_image\" object\n- get_tags_from_clip: simulates CLIP returning a list of tags: [\"T-shirt\", \"Cotton\", \"Casual\"]\n\n## 8. Run Testing for CLIP Output (30 May)\n```\npython3 -m venv venv\npip install -r requirements.txt\npip install git+https://github.com/openai/CLIP.git\npython -m backend.app.tests.test_tag_extractor\n```\n\u003cimg width=\"1111\" alt=\"Screenshot 2025-06-06 at 5 12 13 PM\" src=\"https://github.com/user-attachments/assets/d0b3b288-20f8-482f-9d39-dcccf9a775ee\" /\u003e\n\nNext Step:\n1. Evaluate CLIP’s tagging accuracy on sample clothing images\n2. Fine-tune the tagging system for better recommendations\n3. Test the backend integration with real-time user data\n4. Set up monitoring for model performance\n5. Front-end demo\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fattarmau%2Fstyleclip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fattarmau%2Fstyleclip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fattarmau%2Fstyleclip/lists"}