diff --git a/src/transformers/models/donut/processing_donut.py b/src/transformers/models/donut/processing_donut.py index 9a4ad36e731a..87f2dd34f904 100644 --- a/src/transformers/models/donut/processing_donut.py +++ b/src/transformers/models/donut/processing_donut.py @@ -27,13 +27,13 @@ class DonutProcessor(ProcessorMixin): Constructs a Donut processor which wraps a Donut image processor and an XLMRoBERTa tokenizer into a single processor. - [`DonutProcessor`] offers all the functionalities of [`DonutFeatureExtractor`] and + [`DonutProcessor`] offers all the functionalities of [`DonutImageProcessor`] and [`XLMRobertaTokenizer`/`XLMRobertaTokenizerFast`]. See the [`~DonutProcessor.__call__`] and [`~DonutProcessor.decode`] for more information. Args: - image_processor ([`DonutFeatureExtractor`]): - An instance of [`DonutFeatureExtractor`]. The image processor is a required input. + image_processor ([`DonutImageProcessor`]): + An instance of [`DonutImageProcessor`]. The image processor is a required input. tokenizer ([`XLMRobertaTokenizer`/`XLMRobertaTokenizerFast`]): An instance of [`XLMRobertaTokenizer`/`XLMRobertaTokenizerFast`]. The tokenizer is a required input. """ @@ -62,8 +62,8 @@ def __init__(self, image_processor=None, tokenizer=None, **kwargs): def __call__(self, *args, **kwargs): """ - When used in normal mode, this method forwards all its arguments to AutoFeatureExtractor's - [`~AutoFeatureExtractor.__call__`] and returns its output. If used in the context + When used in normal mode, this method forwards all its arguments to AutoImageProcessor's + [`~AutoImageProcessor.__call__`] and returns its output. If used in the context [`~DonutProcessor.as_target_processor`] this method forwards all its arguments to DonutTokenizer's [`~DonutTokenizer.__call__`]. Please refer to the doctsring of the above two methods for more information. """ diff --git a/src/transformers/models/flava/processing_flava.py b/src/transformers/models/flava/processing_flava.py index 82f0febf28ab..20562c84569e 100644 --- a/src/transformers/models/flava/processing_flava.py +++ b/src/transformers/models/flava/processing_flava.py @@ -29,15 +29,15 @@ class FlavaProcessor(ProcessorMixin): r""" Constructs a FLAVA processor which wraps a FLAVA image processor and a FLAVA tokenizer into a single processor. - [`FlavaProcessor`] offers all the functionalities of [`FlavaFeatureExtractor`] and [`BertTokenizerFast`]. See the + [`FlavaProcessor`] offers all the functionalities of [`FlavaImageProcessor`] and [`BertTokenizerFast`]. See the [`~FlavaProcessor.__call__`] and [`~FlavaProcessor.decode`] for more information. Args: - image_processor ([`FlavaFeatureExtractor`]): The image processor is a required input. + image_processor ([`FlavaImageProcessor`]): The image processor is a required input. tokenizer ([`BertTokenizerFast`]): The tokenizer is a required input. """ attributes = ["image_processor", "tokenizer"] - image_processor_class = "FlavaFeatureExtractor" + image_processor_class = "FlavaImageProcessor" tokenizer_class = ("BertTokenizer", "BertTokenizerFast") def __init__(self, image_processor=None, tokenizer=None, **kwargs): @@ -81,7 +81,7 @@ def __call__( **kwargs ): """ - This method uses [`FLAVAFeatureExtractor.__call__`] method to prepare image(s) for the model, and + This method uses [`FlavaImageProcessor.__call__`] method to prepare image(s) for the model, and [`BertTokenizerFast.__call__`] to prepare text for the model. Please refer to the docstring of the above two methods for more information. diff --git a/src/transformers/models/vilt/processing_vilt.py b/src/transformers/models/vilt/processing_vilt.py index 8012bd3d0ce4..2578724066be 100644 --- a/src/transformers/models/vilt/processing_vilt.py +++ b/src/transformers/models/vilt/processing_vilt.py @@ -28,17 +28,17 @@ class ViltProcessor(ProcessorMixin): r""" Constructs a ViLT processor which wraps a BERT tokenizer and ViLT image processor into a single processor. - [`ViltProcessor`] offers all the functionalities of [`ViltFeatureExtractor`] and [`BertTokenizerFast`]. See the + [`ViltProcessor`] offers all the functionalities of [`ViltImageProcessor`] and [`BertTokenizerFast`]. See the docstring of [`~ViltProcessor.__call__`] and [`~ViltProcessor.decode`] for more information. Args: - image_processor (`ViltFeatureExtractor`): - An instance of [`ViltFeatureExtractor`]. The image processor is a required input. + image_processor (`ViltImageProcessor`): + An instance of [`ViltImageProcessor`]. The image processor is a required input. tokenizer (`BertTokenizerFast`): An instance of ['BertTokenizerFast`]. The tokenizer is a required input. """ attributes = ["image_processor", "tokenizer"] - image_processor_class = "ViltFeatureExtractor" + image_processor_class = "ViltImageProcessor" tokenizer_class = ("BertTokenizer", "BertTokenizerFast") def __init__(self, image_processor=None, tokenizer=None, **kwargs): @@ -80,7 +80,7 @@ def __call__( **kwargs ) -> BatchEncoding: """ - This method uses [`ViltFeatureExtractor.__call__`] method to prepare image(s) for the model, and + This method uses [`ViltImageProcessor.__call__`] method to prepare image(s) for the model, and [`BertTokenizerFast.__call__`] to prepare text for the model. Please refer to the docstring of the above two methods for more information.