Instructions to use SamaGalagoda/threadcraft-garment-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SamaGalagoda/threadcraft-garment-classifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="SamaGalagoda/threadcraft-garment-classifier") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# Load model directly from transformers import AutoImageProcessor, AutoModelForImageClassification processor = AutoImageProcessor.from_pretrained("SamaGalagoda/threadcraft-garment-classifier") model = AutoModelForImageClassification.from_pretrained("SamaGalagoda/threadcraft-garment-classifier", device_map="auto") - Notebooks
- Google Colab
- Kaggle
| { | |
| "architectures": [ | |
| "ViTForImageClassification" | |
| ], | |
| "attention_probs_dropout_prob": 0.0, | |
| "dtype": "float32", | |
| "encoder_stride": 16, | |
| "hidden_act": "gelu", | |
| "hidden_dropout_prob": 0.0, | |
| "hidden_size": 768, | |
| "id2label": { | |
| "0": "Bra", | |
| "1": "Briefs", | |
| "2": "Capris", | |
| "3": "Dresses", | |
| "4": "Dupatta", | |
| "5": "Innerwear Vests", | |
| "6": "Jackets", | |
| "7": "Jeans", | |
| "8": "Kurtas", | |
| "9": "Kurtis", | |
| "10": "Leggings", | |
| "11": "Night suits", | |
| "12": "Nightdress", | |
| "13": "Sarees", | |
| "14": "Shirts", | |
| "15": "Shorts", | |
| "16": "Skirts", | |
| "17": "Sweaters", | |
| "18": "Sweatshirts", | |
| "19": "Tops", | |
| "20": "Track Pants", | |
| "21": "Trousers", | |
| "22": "Trunk", | |
| "23": "Tshirts", | |
| "24": "Tunics" | |
| }, | |
| "image_size": 224, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 3072, | |
| "label2id": { | |
| "Bra": 0, | |
| "Briefs": 1, | |
| "Capris": 2, | |
| "Dresses": 3, | |
| "Dupatta": 4, | |
| "Innerwear Vests": 5, | |
| "Jackets": 6, | |
| "Jeans": 7, | |
| "Kurtas": 8, | |
| "Kurtis": 9, | |
| "Leggings": 10, | |
| "Night suits": 11, | |
| "Nightdress": 12, | |
| "Sarees": 13, | |
| "Shirts": 14, | |
| "Shorts": 15, | |
| "Skirts": 16, | |
| "Sweaters": 17, | |
| "Sweatshirts": 18, | |
| "Tops": 19, | |
| "Track Pants": 20, | |
| "Trousers": 21, | |
| "Trunk": 22, | |
| "Tshirts": 23, | |
| "Tunics": 24 | |
| }, | |
| "layer_norm_eps": 1e-12, | |
| "model_type": "vit", | |
| "num_attention_heads": 12, | |
| "num_channels": 3, | |
| "num_hidden_layers": 12, | |
| "patch_size": 16, | |
| "pooler_act": "tanh", | |
| "pooler_output_size": 768, | |
| "problem_type": "single_label_classification", | |
| "qkv_bias": true, | |
| "transformers_version": "5.15.0", | |
| "use_cache": false | |
| } | |