Instructions to use shauray/ViTPose with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use shauray/ViTPose with Transformers:
# Load model directly from transformers import AutoImageProcessor, ViTPoseForPoseEstimation processor = AutoImageProcessor.from_pretrained("shauray/ViTPose") model = ViTPoseForPoseEstimation.from_pretrained("shauray/ViTPose") - Notebooks
- Google Colab
- Kaggle
Can't load the model using the transformers libary
#1
by haddagart - opened
I tried to load the model using provided command in Use in Tranformers
# Load model directly
from transformers import ViTPoseForPoseEstimation
model = ViTPoseForPoseEstimation.from_pretrained("shauray/ViTPose")
Apparently the ViTPoseForPoseEstimation package isn't available in the transformers library. Here's a snippet of the error I am getting:
Traceback (most recent call last):
File "/home/haddagart/Codes/huggingface/vitpose/app.py", line 2, in <module>
from transformers import pipeline, ViTPoseForPoseEstimation
ImportError: cannot import name 'ViTPoseForPoseEstimation' from 'transformers' (/home/haddagart/Codes/huggingface/vitpose/venv/lib/python3.10/site-packages/transformers/__init__.py)
@haddagart I was a little tight on time back then so this PR was transferred to someone else, you can probably ask people at hugging face on their forums on this