Image Classification
Transformers
Safetensors
timm
timm_wrapper
vision
Generated from Trainer
Eval Results (legacy)
Instructions to use omaralshareef/beans-image-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use omaralshareef/beans-image-classifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="omaralshareef/beans-image-classifier") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# pip install -U transformers accelerate # Load model directly from transformers import AutoImageProcessor, AutoModelForImageClassification processor = AutoImageProcessor.from_pretrained("omaralshareef/beans-image-classifier") model = AutoModelForImageClassification.from_pretrained("omaralshareef/beans-image-classifier", device_map="auto") - timm
How to use omaralshareef/beans-image-classifier with timm:
import timm model = timm.create_model("hf-hub:omaralshareef/beans-image-classifier", pretrained=True) - Notebooks
- Google Colab
- Kaggle
Download config.json from omaralshareef/beans-image-classifier: direct link, hf CLI and curl.
- Browser
- Download file 1.14 kB
-
https://huggingface.co/omaralshareef/beans-image-classifier/resolve/main/config.json
- Command line
-
hf download hf://omaralshareef/beans-image-classifier/config.json
-
curl -L -o config.json https://huggingface.co/omaralshareef/beans-image-classifier/resolve/main/config.json
1.14 kB
| { | |
| "architecture": "mobilenetv3_small_100", | |
| "architectures": [ | |
| "TimmWrapperForImageClassification" | |
| ], | |
| "do_pooling": true, | |
| "dtype": "float32", | |
| "initializer_range": 0.02, | |
| "label_names": [ | |
| "angular_leaf_spot", | |
| "bean_rust", | |
| "healthy" | |
| ], | |
| "model_args": null, | |
| "model_type": "timm_wrapper", | |
| "num_classes": 3, | |
| "num_features": 1024, | |
| "pretrained_cfg": { | |
| "classifier": "classifier", | |
| "crop_mode": "center", | |
| "crop_pct": 0.875, | |
| "custom_load": false, | |
| "first_conv": "conv_stem", | |
| "fixed_input_size": false, | |
| "input_size": [ | |
| 3, | |
| 224, | |
| 224 | |
| ], | |
| "interpolation": "bicubic", | |
| "mean": [ | |
| 0.485, | |
| 0.456, | |
| 0.406 | |
| ], | |
| "pool_size": [ | |
| 7, | |
| 7 | |
| ], | |
| "std": [ | |
| 0.229, | |
| 0.224, | |
| 0.225 | |
| ], | |
| "tag": "lamb_in1k" | |
| }, | |
| "problem_type": "single_label_classification", | |
| "transformers_version": "5.16.1", | |
| "use_cache": false, | |
| "id2label": { | |
| "0": "angular_leaf_spot", | |
| "1": "bean_rust", | |
| "2": "healthy" | |
| }, | |
| "label2id": { | |
| "angular_leaf_spot": 0, | |
| "bean_rust": 1, | |
| "healthy": 2 | |
| }, | |
| "num_labels": 3 | |
| } | |