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