NielsRogge / Transformers-Tutorials

This repository contains demos I made with the Transformers library by HuggingFace.
MIT License
8.48k stars 1.33k forks source link

feature_extractor attribute in the dataset class #327

Open junghyun-avikus opened 1 year ago

junghyun-avikus commented 1 year ago

I was following along with the YOLOS tutorial, and I saw input images are passed to feature_extractor in the init method. The actual model seems to accept actual images with 3 channels, (the model attribute of the Detr class) what does the feature_extractor do?

All the object detection models seem to use the feature_extractor, is it something that has to do with transformer?

NielsRogge commented 11 months ago

Hi,

The "feature extractors" have recently been renamed to "image processors". They prepare images (and optional) labels for a model.