Spaces:
Sleeping
Sleeping
Upload README.md
Browse files
README.md
CHANGED
@@ -1,12 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
---
|
11 |
|
12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
# 👕 Fashion Attribute Predictor
|
3 |
+
|
4 |
+
Ein Gradio-basierter Hugging Face Space zur Vorhersage von Attributen aus Modebildern (z. B. T-Shirts, Pullover, etc.)
|
5 |
+
Das Modell sagt für jede Attributgruppe (z. B. Farbe, Material, Schnitt) **das wahrscheinlichste Merkmal** vorher – inklusive **Confidence-Score**.
|
6 |
+
|
7 |
---
|
8 |
+
|
9 |
+
## 🔍 Funktionen
|
10 |
+
|
11 |
+
- 📸 Unterstützung für Bild-Upload
|
12 |
+
- 🧠 Vorhersage von Attributen aus 228 Kategorien
|
13 |
+
- 📊 Strukturierte **JSON-Ausgabe** mit `label`, `score` und `confidence`
|
14 |
+
- ✅ Einfache Integration in Datenbanken, APIs oder Forschungsprojekte
|
15 |
+
|
16 |
---
|
17 |
|
18 |
+
## 📦 Ausgabeformat (Beispiel)
|
19 |
+
|
20 |
+
```json
|
21 |
+
{
|
22 |
+
"category": {
|
23 |
+
"label": "T-Shirts",
|
24 |
+
"score": 0.9123,
|
25 |
+
"confidence": "high"
|
26 |
+
},
|
27 |
+
"color": {
|
28 |
+
"label": "Red",
|
29 |
+
"score": 0.4871,
|
30 |
+
"confidence": "low"
|
31 |
+
}
|
32 |
+
}
|
33 |
+
```
|
34 |
+
|
35 |
+
- **score**: Modellwahrscheinlichkeit (0.0–1.0)
|
36 |
+
- **confidence**: `"high"` wenn Score ≥ 0.5, sonst `"low"`
|
37 |
+
|
38 |
+
---
|
39 |
+
|
40 |
+
## 📁 Dateien
|
41 |
+
|
42 |
+
| Datei | Beschreibung |
|
43 |
+
|-----------------------------|--------------|
|
44 |
+
| `app.py` | Haupt-Interface mit JSON-Ausgabe |
|
45 |
+
| `model_loader.py` | Lädt das trainierte ResNet50-Modell |
|
46 |
+
| `index_to_attr.py` | Mapping von Indizes zu Attributnamen |
|
47 |
+
| `model/AttrPredModel_StateDict.pth` | Vorgefertigte Modellgewichte |
|
48 |
+
|
49 |
+
---
|
50 |
+
|
51 |
+
## ⚙️ Modell-Details
|
52 |
+
|
53 |
+
- Backbone: `ResNet50`
|
54 |
+
- Trainingsdaten: iMaterialist (Fashion) Challenge 2018
|
55 |
+
- Vorhersageformat: Multi-Label (228 binäre Attribute)
|
56 |
+
- Eingabegröße: 512×512 RGB
|
57 |
+
- Normalisierung: mean=[0.6765, 0.6347, 0.6207], std=[0.3284, 0.3371, 0.3379]
|
58 |
+
|
59 |
+
---
|
60 |
+
|
61 |
+
## 📚 Lizenz & Nutzung
|
62 |
+
|
63 |
+
Nur für nicht-kommerzielle Forschungszwecke.
|
64 |
+
Modelldaten basieren auf öffentlich verfügbaren Wettbewerbsdaten von FGVC5/Kaggle.
|
65 |
+
|
66 |
+
---
|
67 |
+
|
68 |
+
## 🧑💻 Erstellt von
|
69 |
+
|
70 |
+
Andreas Jewtschuk
|
71 |
+
Masterarbeit – E-Commerce, Ernst-Abbe-Hochschule Jena
|
72 |
+
[2025]
|
73 |
+
|