Acces to Oneformer

Hi,
how i can access to oneformer with hugging face ?

from transformers import OneFormerForUniversalSegmentation

ImportError: cannot import name ‘OneFormerForUniversalSegmentation’ from ‘transformers’ (/usr/local/lib/python3.8/dist-packages/transformers/init.py)

thanks

hi @alanoix
Thanks for the issue!
You need to install transformers from source:

pip uninstall transformers
pip install git+https://github.com/huggingface/transformers.git@main
1 Like