Instructions to use OpenGVLab/pvt_v2_b1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OpenGVLab/pvt_v2_b1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="OpenGVLab/pvt_v2_b1") 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_b1") model = AutoModelForImageClassification.from_pretrained("OpenGVLab/pvt_v2_b1", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit History
-
Correct "out_indices" and "out_features" fields in config (#1)
Verified signature- Correct "out_indices" and "out_features" fields in config (662667f586346f628498f3228f8279ada26d7c51) - Added first encoder layer to "out_indices" and "out_features" (5130c2cb9f811092bd8e2c425914cff39b79e9f9) - Fixed model name/path in config. (e73ee63169474eb70eb8f03a977a7f6c79558ea7) Co-authored-by: Nate <FoamoftheSea@users.noreply.huggingface.co>8f1b815
-
Update README.md
Verified signature31bb879 -
Upload folder using huggingface_hub
Verified signature0a8de6c -
initial commit
Verified signature68fdfc6