Instructions to use timm/pvt_v2_b5.in1k with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- timm
How to use timm/pvt_v2_b5.in1k with timm:
import timm model = timm.create_model("hf-hub:timm/pvt_v2_b5.in1k", pretrained=True) - Transformers
How to use timm/pvt_v2_b5.in1k with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="timm/pvt_v2_b5.in1k") 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("timm/pvt_v2_b5.in1k") model = AutoModelForImageClassification.from_pretrained("timm/pvt_v2_b5.in1k", device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 134 Bytes
b18cbdb | 1 2 3 4 | version https://git-lfs.github.com/spec/v1
oid sha256:a53f87b6cb94d66869a7c9025e09d8f79a1dbca58e6d05511ca022f2f7db79d3
size 328208315
|