Instructions to use Thastp/efficientnet_b0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Thastp/efficientnet_b0 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="Thastp/efficientnet_b0", trust_remote_code=True) 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("Thastp/efficientnet_b0", trust_remote_code=True) model = AutoModelForImageClassification.from_pretrained("Thastp/efficientnet_b0", trust_remote_code=True) - Notebooks
- Google Colab
- Kaggle
Upload processor
Browse files
image_processing_efficientnet.py
CHANGED
|
@@ -13,6 +13,7 @@ class EfficientNetImageProcessor(BaseImageProcessor):
|
|
| 13 |
):
|
| 14 |
super().__init__(**kwargs)
|
| 15 |
|
|
|
|
| 16 |
self.config = resolve_data_config({}, model=create_model(model_name, pretrained=False))
|
| 17 |
|
| 18 |
|
|
|
|
| 13 |
):
|
| 14 |
super().__init__(**kwargs)
|
| 15 |
|
| 16 |
+
self.model_name = model_name
|
| 17 |
self.config = resolve_data_config({}, model=create_model(model_name, pretrained=False))
|
| 18 |
|
| 19 |
|
preprocessor_config.json
CHANGED
|
@@ -22,5 +22,6 @@
|
|
| 22 |
0.225
|
| 23 |
]
|
| 24 |
},
|
| 25 |
-
"image_processor_type": "EfficientNetImageProcessor"
|
|
|
|
| 26 |
}
|
|
|
|
| 22 |
0.225
|
| 23 |
]
|
| 24 |
},
|
| 25 |
+
"image_processor_type": "EfficientNetImageProcessor",
|
| 26 |
+
"model_name": "efficientnet_b0"
|
| 27 |
}
|