[ViTPose] Convert more checkpoints (#35638)

* Convert more checkpoints

* Update docs, convert huge variant

* Update model name

* Update src/transformers/models/vitpose/modeling_vitpose.py

Co-authored-by: Pavel Iakubovskii <qubvel@gmail.com>

* Remove print statements

* Update docs/source/en/model_doc/vitpose.md

Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>

* Link to collection

---------

Co-authored-by: Pavel Iakubovskii <qubvel@gmail.com>
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
This commit is contained in:
NielsRogge
2025-01-20 11:29:47 +01:00
committed by GitHub
parent 332fa024d6
commit 872dfbdd46
6 changed files with 172 additions and 69 deletions

View File

@@ -239,9 +239,7 @@ class VitPoseModelIntegrationTest(unittest.TestCase):
@slow
def test_inference_pose_estimation(self):
image_processor = self.default_image_processor
model = VitPoseForPoseEstimation.from_pretrained("usyd-community/vitpose-base-simple")
model.to(torch_device)
model.eval()
model = VitPoseForPoseEstimation.from_pretrained("usyd-community/vitpose-base-simple", device_map=torch_device)
image = prepare_img()
boxes = [[[412.8, 157.61, 53.05, 138.01], [384.43, 172.21, 15.12, 35.74]]]
@@ -284,9 +282,7 @@ class VitPoseModelIntegrationTest(unittest.TestCase):
@slow
def test_batched_inference(self):
image_processor = self.default_image_processor
model = VitPoseForPoseEstimation.from_pretrained("usyd-community/vitpose-base-simple")
model.to(torch_device)
model.eval()
model = VitPoseForPoseEstimation.from_pretrained("usyd-community/vitpose-base-simple", device_map=torch_device)
image = prepare_img()
boxes = [