Instructions to use OpenGVLab/pvt_v2_b2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OpenGVLab/pvt_v2_b2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="OpenGVLab/pvt_v2_b2") 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("OpenGVLab/pvt_v2_b2") model = AutoModelForImageClassification.from_pretrained("OpenGVLab/pvt_v2_b2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit History
-
Fixed "out_indices" and "out_features" in config (#1)
Verified signature- Fixed "out_indices" and "out_features" in config (0e9c4387342c1ee8162a5094391bfe3415084bb9) - Added first encoder layer to "out_indices" and "out_features" (a2781b1145f03a7e2b2bd2f3b8d20df87f65a627) - Fixed model name/path in config (5395c47fefbb326e0a0fb29e8832fdbc6a7bb2e9) Co-authored-by: Nate <FoamoftheSea@users.noreply.huggingface.co>b4eb98c
-
Update README.md
Verified signaturee787234 -
Upload folder using huggingface_hub
Verified signaturefb44b0d -
initial commit
Verified signatureb691362