Instructions to use OpenGVLab/pvt_v2_b3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OpenGVLab/pvt_v2_b3 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="OpenGVLab/pvt_v2_b3") 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("OpenGVLab/pvt_v2_b3") model = AutoModelForImageClassification.from_pretrained("OpenGVLab/pvt_v2_b3") - Inference
- Notebooks
- Google Colab
- Kaggle
Added first encoder layer to "out_indices" and "out_features"
Browse filesThis will lead to better results when using PVTv2 as a backbone with default settings in a model like Deformable DETR.
- config.json +2 -0
config.json
CHANGED
|
@@ -1,11 +1,13 @@
|
|
| 1 |
{
|
| 2 |
"_name_or_path": "FoamoftheSea/pvt_v2_b1",
|
| 3 |
"out_features": [
|
|
|
|
| 4 |
"stage2",
|
| 5 |
"stage3",
|
| 6 |
"stage4"
|
| 7 |
],
|
| 8 |
"out_indices": [
|
|
|
|
| 9 |
1,
|
| 10 |
2,
|
| 11 |
3
|
|
|
|
| 1 |
{
|
| 2 |
"_name_or_path": "FoamoftheSea/pvt_v2_b1",
|
| 3 |
"out_features": [
|
| 4 |
+
"stage1",
|
| 5 |
"stage2",
|
| 6 |
"stage3",
|
| 7 |
"stage4"
|
| 8 |
],
|
| 9 |
"out_indices": [
|
| 10 |
+
0,
|
| 11 |
1,
|
| 12 |
2,
|
| 13 |
3
|