




from __future__ import annotations

import unittest

from transformers import FunnelConfig, is_tf_available
from transformers.testing_utils import require_tf

from ...test_configuration_common import ConfigTester
from ...test_modeling_tf_common import TFModelTesterMixin, ids_tensor, random_attention_mask
from ...test_pipeline_mixin import PipelineTesterMixin


if is_tf_available():
			import tensorflow as tf

			from transformers import (
			    TFFunnelBaseModel,
			    TFFunnelForMaskedLM,
			    TFFunnelForMultipleChoice,
			    TFFunnelForPreTraining,
			    TFFunnelForQuestionAnswering,
			    TFFunnelForSequenceClassification,
			    TFFunnelForTokenClassification,
			    TFFunnelModel,
			)







class a :
						"""simple docstring"""

						def __init__( self :     Dict				,							lowerCamelCase__ :     Optional[int]				,							lowerCamelCase__ :     Optional[Any]=13				,							lowerCamelCase__ :     str=7				,							lowerCamelCase__ :     Tuple=True				,							lowerCamelCase__ :     str=True				,							lowerCamelCase__ :     Dict=True				,							lowerCamelCase__ :     Union[str, Any]=True				,							lowerCamelCase__ :     List[Any]=99				,							lowerCamelCase__ :     Optional[Any]=[1, 1, 2]				,							lowerCamelCase__ :     str=1				,							lowerCamelCase__ :     str=32				,							lowerCamelCase__ :     Any=4				,							lowerCamelCase__ :     Tuple=8				,							lowerCamelCase__ :     int=37				,							lowerCamelCase__ :     Optional[int]="gelu_new"				,							lowerCamelCase__ :     Union[str, Any]=0.1				,							lowerCamelCase__ :     Any=0.1				,							lowerCamelCase__ :     List[str]=0.0				,							lowerCamelCase__ :     Optional[Any]=512				,							lowerCamelCase__ :     int=3				,							lowerCamelCase__ :     List[str]=0.0_2				,							lowerCamelCase__ :     Optional[int]=3				,							lowerCamelCase__ :     List[str]=4				,							lowerCamelCase__ :     List[str]=None				,							lowerCamelCase__ :     Any=False				,							)    ->						List[str]:
													"""simple docstring"""


													__lowercase      =    parent
													__lowercase      =    batch_size
													__lowercase      =    seq_length
													__lowercase      =    is_training
													__lowercase      =    use_input_mask
													__lowercase      =    use_token_type_ids
													__lowercase      =    use_labels
													__lowercase      =    vocab_size
													__lowercase      =    block_sizes
													__lowercase      =    num_decoder_layers
													__lowercase      =    d_model
													__lowercase      =    n_head
													__lowercase      =    d_head
													__lowercase      =    d_inner
													__lowercase      =    hidden_act
													__lowercase      =    hidden_dropout
													__lowercase      =    attention_dropout
													__lowercase      =    activation_dropout
													__lowercase      =    max_position_embeddings
													__lowercase      =    type_vocab_size
													__lowercase      =    2
													__lowercase      =    num_labels
													__lowercase      =    num_choices
													__lowercase      =    scope
													__lowercase      =    initializer_std

													# Used in the tests to check the size of the first attention layer
													__lowercase      =    n_head
													# Used in the tests to check the size of the first hidden state
													__lowercase      =    self.d_model
													# Used in the tests to check the number of output hidden states/attentions
													__lowercase      =    sum(self.block_sizes				) + (0 if base else self.num_decoder_layers)
													# FunnelModel adds two hidden layers: input embeddings and the sum of the upsampled encoder hidden state with
													# the last hidden state of the first block (which is the first hidden state of the decoder).
													if not base:
																				__lowercase      =    self.num_hidden_layers + 2






						def     UpperCAmelCase_      ( self :     Optional[Any]				)    ->						Dict:
													"""simple docstring"""


													__lowercase      =    ids_tensor([self.batch_size, self.seq_length]				,							self.vocab_size				)

													__lowercase      =    None
													if self.use_input_mask:
																				__lowercase      =    random_attention_mask([self.batch_size, self.seq_length]				)

													__lowercase      =    None
													if self.use_token_type_ids:
																				__lowercase      =    ids_tensor([self.batch_size, self.seq_length]				,							self.type_vocab_size				)

													__lowercase      =    None
													__lowercase      =    None
													__lowercase      =    None
													if self.use_labels:
																				__lowercase      =    ids_tensor([self.batch_size]				,							self.type_sequence_label_size				)
																				__lowercase      =    ids_tensor([self.batch_size, self.seq_length]				,							self.num_labels				)
																				__lowercase      =    ids_tensor([self.batch_size]				,							self.num_choices				)

													__lowercase      =    FunnelConfig(
													    vocab_size=self.vocab_size				,							block_sizes=self.block_sizes				,							num_decoder_layers=self.num_decoder_layers				,							d_model=self.d_model				,							n_head=self.n_head				,							d_head=self.d_head				,							d_inner=self.d_inner				,							hidden_act=self.hidden_act				,							hidden_dropout=self.hidden_dropout				,							attention_dropout=self.attention_dropout				,							activation_dropout=self.activation_dropout				,							max_position_embeddings=self.max_position_embeddings				,							type_vocab_size=self.type_vocab_size				,							initializer_std=self.initializer_std				,							)

													return (
													    config,
													    input_ids,
													    token_type_ids,
													    input_mask,
													    sequence_labels,
													    token_labels,
													    choice_labels,
													)






						def     UpperCAmelCase_      ( self :     Dict				,							lowerCamelCase__ :     int				,							lowerCamelCase__ :     str				,							lowerCamelCase__ :     Optional[int]				,							lowerCamelCase__ :     Optional[Any]				,							lowerCamelCase__ :     int				,							lowerCamelCase__ :     int				,							lowerCamelCase__ :     Optional[Any]				,							)    ->						str:
													"""simple docstring"""


													__lowercase      =    TFFunnelModel(config=lowerCamelCase__				)
													__lowercase      =    {'''input_ids''': input_ids, '''attention_mask''': input_mask, '''token_type_ids''': token_type_ids}
													__lowercase      =    model(lowerCamelCase__				)

													__lowercase      =    [input_ids, input_mask]
													__lowercase      =    model(lowerCamelCase__				)

													__lowercase      =    model(lowerCamelCase__				)
													self.parent.assertEqual(result.last_hidden_state.shape				,							(self.batch_size, self.seq_length, self.d_model)				)

													__lowercase      =    False
													__lowercase      =    TFFunnelModel(config=lowerCamelCase__				)
													__lowercase      =    model(lowerCamelCase__				)
													self.parent.assertEqual(result.last_hidden_state.shape				,							(self.batch_size, self.seq_length, self.d_model)				)

													__lowercase      =    False
													__lowercase      =    TFFunnelModel(config=lowerCamelCase__				)
													__lowercase      =    model(lowerCamelCase__				)
													self.parent.assertEqual(result.last_hidden_state.shape				,							(self.batch_size, self.seq_length, self.d_model)				)






						def     UpperCAmelCase_      ( self :     Tuple				,							lowerCamelCase__ :     int				,							lowerCamelCase__ :     List[str]				,							lowerCamelCase__ :     List[str]				,							lowerCamelCase__ :     str				,							lowerCamelCase__ :     Any				,							lowerCamelCase__ :     Any				,							lowerCamelCase__ :     Optional[int]				,							)    ->						Dict:
													"""simple docstring"""


													__lowercase      =    TFFunnelBaseModel(config=lowerCamelCase__				)
													__lowercase      =    {'''input_ids''': input_ids, '''attention_mask''': input_mask, '''token_type_ids''': token_type_ids}
													__lowercase      =    model(lowerCamelCase__				)

													__lowercase      =    [input_ids, input_mask]
													__lowercase      =    model(lowerCamelCase__				)

													__lowercase      =    model(lowerCamelCase__				)
													self.parent.assertEqual(result.last_hidden_state.shape				,							(self.batch_size, 2, self.d_model)				)

													__lowercase      =    False
													__lowercase      =    TFFunnelBaseModel(config=lowerCamelCase__				)
													__lowercase      =    model(lowerCamelCase__				)
													self.parent.assertEqual(result.last_hidden_state.shape				,							(self.batch_size, 3, self.d_model)				)

													__lowercase      =    False
													__lowercase      =    TFFunnelBaseModel(config=lowerCamelCase__				)
													__lowercase      =    model(lowerCamelCase__				)
													self.parent.assertEqual(result.last_hidden_state.shape				,							(self.batch_size, 2, self.d_model)				)






						def     UpperCAmelCase_      ( self :     int				,							lowerCamelCase__ :     Union[str, Any]				,							lowerCamelCase__ :     Dict				,							lowerCamelCase__ :     str				,							lowerCamelCase__ :     Any				,							lowerCamelCase__ :     Optional[int]				,							lowerCamelCase__ :     Tuple				,							lowerCamelCase__ :     List[str]				,							)    ->						Optional[Any]:
													"""simple docstring"""


													__lowercase      =    TFFunnelForPreTraining(config=lowerCamelCase__				)
													__lowercase      =    {'''input_ids''': input_ids, '''attention_mask''': input_mask, '''token_type_ids''': token_type_ids}
													__lowercase      =    model(lowerCamelCase__				)
													self.parent.assertEqual(result.logits.shape				,							(self.batch_size, self.seq_length)				)






						def     UpperCAmelCase_      ( self :     Tuple				,							lowerCamelCase__ :     Union[str, Any]				,							lowerCamelCase__ :     List[str]				,							lowerCamelCase__ :     Any				,							lowerCamelCase__ :     Dict				,							lowerCamelCase__ :     List[str]				,							lowerCamelCase__ :     str				,							lowerCamelCase__ :     Dict				,							)    ->						List[Any]:
													"""simple docstring"""


													__lowercase      =    TFFunnelForMaskedLM(config=lowerCamelCase__				)
													__lowercase      =    {'''input_ids''': input_ids, '''attention_mask''': input_mask, '''token_type_ids''': token_type_ids}
													__lowercase      =    model(lowerCamelCase__				)
													self.parent.assertEqual(result.logits.shape				,							(self.batch_size, self.seq_length, self.vocab_size)				)






						def     UpperCAmelCase_      ( self :     str				,							lowerCamelCase__ :     Any				,							lowerCamelCase__ :     Optional[int]				,							lowerCamelCase__ :     Union[str, Any]				,							lowerCamelCase__ :     Optional[Any]				,							lowerCamelCase__ :     Tuple				,							lowerCamelCase__ :     Optional[int]				,							lowerCamelCase__ :     int				,							)    ->						Dict:
													"""simple docstring"""


													__lowercase      =    self.num_labels
													__lowercase      =    TFFunnelForSequenceClassification(config=lowerCamelCase__				)
													__lowercase      =    {'''input_ids''': input_ids, '''attention_mask''': input_mask, '''token_type_ids''': token_type_ids}
													__lowercase      =    model(lowerCamelCase__				)
													self.parent.assertEqual(result.logits.shape				,							(self.batch_size, self.num_labels)				)






						def     UpperCAmelCase_      ( self :     Any				,							lowerCamelCase__ :     Any				,							lowerCamelCase__ :     List[str]				,							lowerCamelCase__ :     Any				,							lowerCamelCase__ :     Optional[int]				,							lowerCamelCase__ :     int				,							lowerCamelCase__ :     Any				,							lowerCamelCase__ :     Optional[int]				,							)    ->						List[Any]:
													"""simple docstring"""


													__lowercase      =    self.num_choices
													__lowercase      =    TFFunnelForMultipleChoice(config=lowerCamelCase__				)
													__lowercase      =    tf.tile(tf.expand_dims(lowerCamelCase__				,							1				)				,							(1, self.num_choices, 1)				)
													__lowercase      =    tf.tile(tf.expand_dims(lowerCamelCase__				,							1				)				,							(1, self.num_choices, 1)				)
													__lowercase      =    tf.tile(tf.expand_dims(lowerCamelCase__				,							1				)				,							(1, self.num_choices, 1)				)
													__lowercase      =    {
													    '''input_ids''': multiple_choice_inputs_ids,
													    '''attention_mask''': multiple_choice_input_mask,
													    '''token_type_ids''': multiple_choice_token_type_ids,
													}
													__lowercase      =    model(lowerCamelCase__				)
													self.parent.assertEqual(result.logits.shape				,							(self.batch_size, self.num_choices)				)






						def     UpperCAmelCase_      ( self :     Optional[Any]				,							lowerCamelCase__ :     Dict				,							lowerCamelCase__ :     List[str]				,							lowerCamelCase__ :     Tuple				,							lowerCamelCase__ :     Tuple				,							lowerCamelCase__ :     Any				,							lowerCamelCase__ :     Optional[Any]				,							lowerCamelCase__ :     Dict				,							)    ->						Any:
													"""simple docstring"""


													__lowercase      =    self.num_labels
													__lowercase      =    TFFunnelForTokenClassification(config=lowerCamelCase__				)
													__lowercase      =    {'''input_ids''': input_ids, '''attention_mask''': input_mask, '''token_type_ids''': token_type_ids}
													__lowercase      =    model(lowerCamelCase__				)
													self.parent.assertEqual(result.logits.shape				,							(self.batch_size, self.seq_length, self.num_labels)				)






						def     UpperCAmelCase_      ( self :     Tuple				,							lowerCamelCase__ :     Optional[Any]				,							lowerCamelCase__ :     List[Any]				,							lowerCamelCase__ :     Dict				,							lowerCamelCase__ :     Optional[int]				,							lowerCamelCase__ :     Union[str, Any]				,							lowerCamelCase__ :     int				,							lowerCamelCase__ :     List[Any]				,							)    ->						Any:
													"""simple docstring"""


													__lowercase      =    TFFunnelForQuestionAnswering(config=lowerCamelCase__				)
													__lowercase      =    {'''input_ids''': input_ids, '''attention_mask''': input_mask, '''token_type_ids''': token_type_ids}
													__lowercase      =    model(lowerCamelCase__				)
													self.parent.assertEqual(result.start_logits.shape				,							(self.batch_size, self.seq_length)				)
													self.parent.assertEqual(result.end_logits.shape				,							(self.batch_size, self.seq_length)				)






						def     UpperCAmelCase_      ( self :     List[Any]				)    ->						Union[str, Any]:
													"""simple docstring"""


													__lowercase      =    self.prepare_config_and_inputs()
													(
													    (
													    __lowercase
													)     ,     (
													    __lowercase
													)     ,     (
													    __lowercase
													)     ,     (
													    __lowercase
													)     ,     (
													    __lowercase
													)     ,     (
													    __lowercase
													)     ,     (
													    __lowercase
													)     ,     
													)      =    config_and_inputs
													__lowercase      =    {'''input_ids''': input_ids, '''token_type_ids''': token_type_ids, '''attention_mask''': input_mask}
													return config, inputs_dict







@require_tf
class a (     __SCREAMING_SNAKE_CASE       ,						__SCREAMING_SNAKE_CASE       ,						unittest.TestCase  ):
						"""simple docstring"""

						UpperCamelCase_	:       Tuple       	=		(
						    (
						        TFFunnelModel,
						        TFFunnelForMaskedLM,
						        TFFunnelForPreTraining,
						        TFFunnelForQuestionAnswering,
						        TFFunnelForTokenClassification,
						    )
						    if is_tf_available()
						    else ()
						)
						UpperCamelCase_	:       Union[str, Any]       	=		(
						    {
						        'feature-extraction': (TFFunnelBaseModel, TFFunnelModel),
						        'fill-mask': TFFunnelForMaskedLM,
						        'question-answering': TFFunnelForQuestionAnswering,
						        'text-classification': TFFunnelForSequenceClassification,
						        'token-classification': TFFunnelForTokenClassification,
						        'zero-shot': TFFunnelForSequenceClassification,
						    }
						    if is_tf_available()
						    else {}
						)
						UpperCamelCase_	:       int       	=		False
						UpperCamelCase_	:       Optional[int]       	=		False






						def     UpperCAmelCase_      ( self :     Optional[int]				)    ->						Union[str, Any]:
													"""simple docstring"""


													__lowercase      =    TFFunnelModelTester(self				)
													__lowercase      =    ConfigTester(self				,							config_class=lowerCamelCase__				)






						def     UpperCAmelCase_      ( self :     Any				)    ->						Any:
													"""simple docstring"""


													self.config_tester.run_common_tests()






						def     UpperCAmelCase_      ( self :     int				)    ->						List[str]:
													"""simple docstring"""


													__lowercase      =    self.model_tester.prepare_config_and_inputs()
													self.model_tester.create_and_check_model(*lowerCamelCase__				)






						def     UpperCAmelCase_      ( self :     Union[str, Any]				)    ->						Dict:
													"""simple docstring"""


													__lowercase      =    self.model_tester.prepare_config_and_inputs()
													self.model_tester.create_and_check_for_pretraining(*lowerCamelCase__				)






						def     UpperCAmelCase_      ( self :     Union[str, Any]				)    ->						Tuple:
													"""simple docstring"""


													__lowercase      =    self.model_tester.prepare_config_and_inputs()
													self.model_tester.create_and_check_for_masked_lm(*lowerCamelCase__				)






						def     UpperCAmelCase_      ( self :     List[str]				)    ->						List[str]:
													"""simple docstring"""


													__lowercase      =    self.model_tester.prepare_config_and_inputs()
													self.model_tester.create_and_check_for_token_classification(*lowerCamelCase__				)






						def     UpperCAmelCase_      ( self :     List[str]				)    ->						str:
													"""simple docstring"""


													__lowercase      =    self.model_tester.prepare_config_and_inputs()
													self.model_tester.create_and_check_for_question_answering(*lowerCamelCase__				)







@require_tf
class a (     __SCREAMING_SNAKE_CASE       ,						unittest.TestCase  ):
						"""simple docstring"""

						UpperCamelCase_	:       Optional[Any]       	=		(
						    (TFFunnelBaseModel, TFFunnelForMultipleChoice, TFFunnelForSequenceClassification) if is_tf_available() else ()
						)
						UpperCamelCase_	:       List[str]       	=		False
						UpperCamelCase_	:       str       	=		False






						def     UpperCAmelCase_      ( self :     Optional[Any]				)    ->						Dict:
													"""simple docstring"""


													__lowercase      =    TFFunnelModelTester(self				,							base=lowerCamelCase__				)
													__lowercase      =    ConfigTester(self				,							config_class=lowerCamelCase__				)






						def     UpperCAmelCase_      ( self :     str				)    ->						Dict:
													"""simple docstring"""


													self.config_tester.run_common_tests()






						def     UpperCAmelCase_      ( self :     Any				)    ->						Any:
													"""simple docstring"""


													__lowercase      =    self.model_tester.prepare_config_and_inputs()
													self.model_tester.create_and_check_base_model(*lowerCamelCase__				)






						def     UpperCAmelCase_      ( self :     List[str]				)    ->						Any:
													"""simple docstring"""


													__lowercase      =    self.model_tester.prepare_config_and_inputs()
													self.model_tester.create_and_check_for_sequence_classification(*lowerCamelCase__				)






						def     UpperCAmelCase_      ( self :     Tuple				)    ->						str:
													"""simple docstring"""


													__lowercase      =    self.model_tester.prepare_config_and_inputs()
													self.model_tester.create_and_check_for_multiple_choice(*lowerCamelCase__				)












import warnings
from typing import List

import numpy as np

from ...processing_utils import ProcessorMixin
from ...tokenization_utils_base import BatchEncoding
from ...utils import is_flax_available, is_tf_available, is_torch_available







class a (     __SCREAMING_SNAKE_CASE  ):
						"""simple docstring"""

						UpperCamelCase_	:       int       	=		['image_processor', 'tokenizer']
						UpperCamelCase_	:       Dict       	=		'OwlViTImageProcessor'
						UpperCamelCase_	:       List[str]       	=		('CLIPTokenizer', 'CLIPTokenizerFast')






						def __init__( self :     str				,							lowerCamelCase__ :     Any=None				,							lowerCamelCase__ :     List[Any]=None				,							**lowerCamelCase__ :     Union[str, Any]				)    ->						Tuple:
													"""simple docstring"""


													__lowercase      =    None
													if "feature_extractor" in kwargs:
																				warnings.warn(
																				    '''The `feature_extractor` argument is deprecated and will be removed in v5, use `image_processor`'''
																				    ''' instead.'''				,							lowerCamelCase__				,							)
																				__lowercase      =    kwargs.pop('''feature_extractor'''				)

													__lowercase      =    image_processor if image_processor is not None else feature_extractor
													if image_processor is None:
																				raise ValueError('''You need to specify an `image_processor`.'''				)
													if tokenizer is None:
																				raise ValueError('''You need to specify a `tokenizer`.'''				)

													super().__init__(lowerCamelCase__				,							lowerCamelCase__				)






						def __call__( self :     List[Any]				,							lowerCamelCase__ :     List[str]=None				,							lowerCamelCase__ :     int=None				,							lowerCamelCase__ :     Any=None				,							lowerCamelCase__ :     str="max_length"				,							lowerCamelCase__ :     Union[str, Any]="np"				,							**lowerCamelCase__ :     Dict				)    ->						Union[str, Any]:
													"""simple docstring"""


													if text is None and query_images is None and images is None:
																				raise ValueError(
																				    '''You have to specify at least one text or query image or image. All three cannot be none.'''				)

													if text is not None:
																				if isinstance(lowerCamelCase__				,							lowerCamelCase__				) or (isinstance(lowerCamelCase__				,							lowerCamelCase__				) and not isinstance(text[0]				,							lowerCamelCase__				)):
																											__lowercase      =    [self.tokenizer(lowerCamelCase__				,							padding=lowerCamelCase__				,							return_tensors=lowerCamelCase__				,							**lowerCamelCase__				)]

																				elif isinstance(lowerCamelCase__				,							lowerCamelCase__				) and isinstance(text[0]				,							lowerCamelCase__				):
																											__lowercase      =    []

																											# Maximum number of queries across batch
																											__lowercase      =    max([len(lowerCamelCase__				) for t in text]				)

																											# Pad all batch samples to max number of text queries
																											for t in text:
																																		if len(lowerCamelCase__				) != max_num_queries:
																																									__lowercase      =    t + [''' '''] * (max_num_queries - len(lowerCamelCase__				))

																																		__lowercase      =    self.tokenizer(lowerCamelCase__				,							padding=lowerCamelCase__				,							return_tensors=lowerCamelCase__				,							**lowerCamelCase__				)
																																		encodings.append(lowerCamelCase__				)
																				else:
																											raise TypeError('''Input text should be a string, a list of strings or a nested list of strings'''				)

																				if return_tensors == "np":
																											__lowercase      =    np.concatenate([encoding['''input_ids'''] for encoding in encodings]				,							axis=0				)
																											__lowercase      =    np.concatenate([encoding['''attention_mask'''] for encoding in encodings]				,							axis=0				)

																				elif return_tensors == "jax" and is_flax_available():
																											import jax.numpy as jnp

																											__lowercase      =    jnp.concatenate([encoding['''input_ids'''] for encoding in encodings]				,							axis=0				)
																											__lowercase      =    jnp.concatenate([encoding['''attention_mask'''] for encoding in encodings]				,							axis=0				)

																				elif return_tensors == "pt" and is_torch_available():
																											import torch

																											__lowercase      =    torch.cat([encoding['''input_ids'''] for encoding in encodings]				,							dim=0				)
																											__lowercase      =    torch.cat([encoding['''attention_mask'''] for encoding in encodings]				,							dim=0				)

																				elif return_tensors == "tf" and is_tf_available():
																											import tensorflow as tf

																											__lowercase      =    tf.stack([encoding['''input_ids'''] for encoding in encodings]				,							axis=0				)
																											__lowercase      =    tf.stack([encoding['''attention_mask'''] for encoding in encodings]				,							axis=0				)

																				else:
																											raise ValueError('''Target return tensor type could not be returned'''				)

																				__lowercase      =    BatchEncoding()
																				__lowercase      =    input_ids
																				__lowercase      =    attention_mask

													if query_images is not None:
																				__lowercase      =    BatchEncoding()
																				__lowercase      =    self.image_processor(
																				    lowerCamelCase__				,							return_tensors=lowerCamelCase__				,							**lowerCamelCase__				).pixel_values
																				__lowercase      =    query_pixel_values

													if images is not None:
																				__lowercase      =    self.image_processor(lowerCamelCase__				,							return_tensors=lowerCamelCase__				,							**lowerCamelCase__				)

													if text is not None and images is not None:
																				__lowercase      =    image_features.pixel_values
																				return encoding
													elif query_images is not None and images is not None:
																				__lowercase      =    image_features.pixel_values
																				return encoding
													elif text is not None or query_images is not None:
																				return encoding
													else:
																				return BatchEncoding(data=dict(**lowerCamelCase__				)				,							tensor_type=lowerCamelCase__				)






						def     UpperCAmelCase_      ( self :     int				,							*lowerCamelCase__ :     str				,							**lowerCamelCase__ :     Optional[int]				)    ->						Tuple:
													"""simple docstring"""


													return self.image_processor.post_process(*lowerCamelCase__				,							**lowerCamelCase__				)






						def     UpperCAmelCase_      ( self :     Optional[int]				,							*lowerCamelCase__ :     Tuple				,							**lowerCamelCase__ :     Tuple				)    ->						Union[str, Any]:
													"""simple docstring"""


													return self.image_processor.post_process_object_detection(*lowerCamelCase__				,							**lowerCamelCase__				)






						def     UpperCAmelCase_      ( self :     List[str]				,							*lowerCamelCase__ :     List[str]				,							**lowerCamelCase__ :     Optional[Any]				)    ->						List[Any]:
													"""simple docstring"""


													return self.image_processor.post_process_image_guided_detection(*lowerCamelCase__				,							**lowerCamelCase__				)






						def     UpperCAmelCase_      ( self :     Optional[int]				,							*lowerCamelCase__ :     str				,							**lowerCamelCase__ :     Union[str, Any]				)    ->						Optional[Any]:
													"""simple docstring"""


													return self.tokenizer.batch_decode(*lowerCamelCase__				,							**lowerCamelCase__				)






						def     UpperCAmelCase_      ( self :     str				,							*lowerCamelCase__ :     Optional[int]				,							**lowerCamelCase__ :     Union[str, Any]				)    ->						List[str]:
													"""simple docstring"""


													return self.tokenizer.decode(*lowerCamelCase__				,							**lowerCamelCase__				)






						@property
						def     UpperCAmelCase_      ( self :     Tuple				)    ->						List[str]:
													"""simple docstring"""


													warnings.warn(
													    '''`feature_extractor_class` is deprecated and will be removed in v5. Use `image_processor_class` instead.'''				,							lowerCamelCase__				,							)
													return self.image_processor_class






						@property
						def     UpperCAmelCase_      ( self :     str				)    ->						Any:
													"""simple docstring"""


													warnings.warn(
													    '''`feature_extractor` is deprecated and will be removed in v5. Use `image_processor` instead.'''				,							lowerCamelCase__				,							)
													return self.image_processor






