Downloads · 30 days
5
14% of all-time downloads
SamaGalagoda/threadcraft-garment-classifier
threadcraft-garment-classifier is a image classification model from SamaGalagoda. Use it when you need a label for an image. It is set up for transformers. The card lists the license as mit.
Fine-tuned google/vit-base-patch16-224-in21k that predicts garment type from a clothing image.
Downloads · 30 days
5
14% of all-time downloads
All-time downloads
37
Public
Parameters
85.8M
2.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.pt687 MB · 50%
From the Hugging Face model README
Fine-tuned google/vit-base-patch16-224-in21k that predicts garment type from a clothing image.
Built for ThreadCraft, an AI-powered custom clothing design and ordering platform, as a final-year BSc Software Engineering project. In the product it runs on customer-uploaded reference photos at the design wizard's Step 2, to suggest which cloth type the customer is describing.
Suggesting a garment category from a reference image, as an assistive default that the customer can override — not as an authoritative classification.
| Metric | Score |
|---|---|
| Accuracy | 0.6875 |
| Macro F1 | 0.3482 |
| Weighted F1 | 0.6517 |
Macro F1 is the headline number. Accuracy is inflated by the dominant classes; macro F1 weights every garment type equally and so reflects performance on the rarer ones.
Classes (25): Bra, Briefs, Capris, Dresses, Dupatta, Innerwear Vests, Jackets, Jeans, Kurtas, Kurtis, Leggings, Night suits, Nightdress, Sarees, Shirts, Shorts, Skirts, Sweaters, Sweatshirts, Tops, Track Pants, Trousers, Trunk, Tshirts, Tunics
| Base model | google/vit-base-patch16-224-in21k |
| Dataset | SamaGalagoda/threadcraft-garments-cleaned |
| Train / Val / Test | 16,536 / 2,067 / 2,067 |
| Epochs | 4 |
| Batch size | 64 per device |
| Learning rate | 0.0003 |
| Precision | fp16 |
| Hardware | Kaggle T4 x2 |
| Model selection | best validation macro-F1 |
classification_report.txt.from transformers import pipeline
clf = pipeline("image-classification", model="SamaGalagoda/threadcraft-garment-classifier")
clf("reference_photo.jpg")
Aggarwal, P. (2019). Fashion Product Images Dataset. Kaggle.
Accessed via the ashraq/fashion-product-images-small mirror on the Hugging Face Hub.