--- title: Garment Attribute Predictor emoji: 👕 colorFrom: indigo colorTo: blue sdk: gradio sdk_version: 5.25.2 app_file: app.py pinned: true --- # 👕 Fashion Attribute Predictor Ein Gradio-basierter Hugging Face Space zur Vorhersage von Attributen aus Modebildern (z. B. T-Shirts, Pullover, etc.) Das Modell sagt für jede Attributgruppe (z. B. Farbe, Material, Schnitt) **das wahrscheinlichste Merkmal** vorher – inklusive **Confidence-Score**. --- ## 🔍 Funktionen - 📸 Unterstützung für Bild-Upload - 🧠 Vorhersage von Attributen aus 228 Kategorien - 📊 Strukturierte **JSON-Ausgabe** mit `label`, `score` und `confidence` - ✅ Einfache Integration in Datenbanken, APIs oder Forschungsprojekte --- ## 📦 Ausgabeformat (Beispiel) ```json { "category": { "label": "T-Shirts", "score": 0.9123, "confidence": "high" }, "color": { "label": "Red", "score": 0.4871, "confidence": "low" } } ``` - **score**: Modellwahrscheinlichkeit (0.0–1.0) - **confidence**: `"high"` wenn Score ≥ 0.5, sonst `"low"` --- ## 📁 Dateien | Datei | Beschreibung | |-----------------------------|--------------| | `app.py` | Haupt-Interface mit JSON-Ausgabe | | `model_loader.py` | Lädt das trainierte ResNet50-Modell | | `index_to_attr.py` | Mapping von Indizes zu Attributnamen | | `model/AttrPredModel_StateDict.pth` | Vorgefertigte Modellgewichte | --- ## ⚙️ Modell-Details - Backbone: `ResNet50` - Trainingsdaten: iMaterialist (Fashion) Challenge 2018 - Vorhersageformat: Multi-Label (228 binäre Attribute) - Eingabegröße: 512×512 RGB - Normalisierung: mean=[0.6765, 0.6347, 0.6207], std=[0.3284, 0.3371, 0.3379] --- ## 📚 Lizenz & Nutzung Nur für nicht-kommerzielle Forschungszwecke. Modelldaten basieren auf öffentlich verfügbaren Wettbewerbsdaten von FGVC5/Kaggle. --- ## 🧑‍💻 Erstellt von Andreas Jewtschuk Masterarbeit – E-Commerce, Ernst-Abbe-Hochschule Jena [2025]