Instructions to use SoulPerforms/Butterfly_image_classification_resnet18 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SoulPerforms/Butterfly_image_classification_resnet18 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="SoulPerforms/Butterfly_image_classification_resnet18") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("SoulPerforms/Butterfly_image_classification_resnet18", dtype="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -16,10 +16,10 @@ Epoch: 28 Train Loss: 0.17 Train Accuracy: 0.96 Test Accuracy: 0.90
|
|
| 16 |
to use this model you have to:
|
| 17 |
|
| 18 |
1. download the model
|
| 19 |
-
2.
|
| 20 |
3. model = models.resnet18(pretrained=True)
|
| 21 |
-
4.
|
| 22 |
5. checkpoint = torch.load('butterfly_resnet_checkpoint.model')
|
| 23 |
7. model_for_predict.load_state_dict(checkpoint)
|
| 24 |
-
8.
|
| 25 |
9. model_for_predict.eval())
|
|
|
|
| 16 |
to use this model you have to:
|
| 17 |
|
| 18 |
1. download the model
|
| 19 |
+
2. load pretrained model resnet18
|
| 20 |
3. model = models.resnet18(pretrained=True)
|
| 21 |
+
4. load checkpoint from your local
|
| 22 |
5. checkpoint = torch.load('butterfly_resnet_checkpoint.model')
|
| 23 |
7. model_for_predict.load_state_dict(checkpoint)
|
| 24 |
+
8. predict the images
|
| 25 |
9. model_for_predict.eval())
|