Instructions to use ustc-community/dfine-xlarge-coco with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ustc-community/dfine-xlarge-coco with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("object-detection", model="ustc-community/dfine-xlarge-coco")# Load model directly from transformers import AutoTokenizer, AutoModelForObjectDetection tokenizer = AutoTokenizer.from_pretrained("ustc-community/dfine-xlarge-coco") model = AutoModelForObjectDetection.from_pretrained("ustc-community/dfine-xlarge-coco") - Notebooks
- Google Colab
- Kaggle
transformers library in python doesnt seem to support DFine
#1
by fdarvas - opened
Python 3.10.12 (main, Sep 11 2024, 15:47:36) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
from transformers import DFineForObjectDetection, AutoImageProcessor
ImportError: cannot import name 'DFineForObjectDetection' from 'transformers' (/usr/local/lib/python3.10/dist-packages/transformers/init.py)
installed transformers library is 4.51.1 , which seems to be the latest
Hi, yes, it is not finished yet and waiting for final approval and merge https://github.com/huggingface/transformers/pull/36261