Instructions to use dima806/marvel_heroes_image_detection with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dima806/marvel_heroes_image_detection with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="dima806/marvel_heroes_image_detection") 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("dima806/marvel_heroes_image_detection") model = AutoModelForImageClassification.from_pretrained("dima806/marvel_heroes_image_detection") - Notebooks
- Google Colab
- Kaggle
Return Marvel hero based on image with about 88% accuracy.
See https://www.kaggle.com/code/dima806/marvel-heroes-image-detection-vit for more details.
Classification report:
precision recall f1-score support
captain america 0.8519 0.8519 0.8519 162
black widow 0.8634 0.8528 0.8580 163
spider-man 0.9571 0.9630 0.9600 162
thanos 0.8917 0.8589 0.8750 163
ironman 0.8614 0.8827 0.8720 162
hulk 0.8889 0.8395 0.8635 162
loki 0.8957 0.8957 0.8957 163
doctor strange 0.8629 0.9264 0.8935 163
accuracy 0.8838 1300
macro avg 0.8841 0.8838 0.8837 1300
weighted avg 0.8841 0.8838 0.8837 1300
- Downloads last month
- 7
Model tree for dima806/marvel_heroes_image_detection
Base model
google/vit-base-patch16-224-in21k