Update `preprocessor_config.json` and `config.json`
#2
by
alvarobartt
HF staff
- opened
Description
This PR adds the processor_config.json
and updates the config.json
to include the model_type="dinov2"
so that the model can be used within the pipeline("image-feature-extraction", ...)
from π€ Transformers, not sure who to link for review but maybe
@rwightman
may know if this is the right PR, I've tried already and seems to be working fine.
See the linked code below:
import requests
from PIL import Image
from transformers import pipeline
pipe = pipeline(
"image-feature-extraction",
model="bioptimus/H-optimus-0",
image_processor="bioptimus/H-optimus-0",
revision="25ce2c7450a358dc4e135177f9ac80cde6302880",
device="cuda",
)
image_url = "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/cats.png"
image = Image.open(requests.get(image_url, stream=True).raw).convert("RGB")
outputs = pipe([image])
alvarobartt
changed pull request title from
Create preprocessor_config.json
to [WIP] Create preprocessor_config.json
alvarobartt
changed pull request title from
[WIP] Create preprocessor_config.json
to Update `preprocessor_config.json` and `config.json`
This comment has been hidden
Sorry for the misunderstanding. apparently timm models are not fully compatible with transformers
pipeline models, so closing this PR!
alvarobartt
changed pull request status to
closed