





import warnings

from ...processing_utils import ProcessorMixin
from ...tokenization_utils_base import BatchEncoding



class       __lowerCAmelCase (    lowercase__  ):
			lowerCamelCase_  :  List[str]     =   ["""image_processor""", """tokenizer"""]
			lowerCamelCase_  :  Dict     =   """VideoMAEImageProcessor"""
			lowerCamelCase_  :  List[Any]     =   ("""CLIPTokenizer""", """CLIPTokenizerFast""")






			def __init__(self      ,							__magic_name__=None      ,							__magic_name__=None      ,							**__magic_name__					)  ->     int:


							'''simple docstring'''



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

							snake_case_			    =						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__(_A      ,							_A					)
							snake_case_			    =						self.image_processor






			def __call__(self      ,							__magic_name__=None      ,							__magic_name__=None      ,							__magic_name__=None      ,							**__magic_name__					)  ->     str:


							'''simple docstring'''



							if text is None and videos is None:
											raise ValueError('''You have to specify either text or videos. Both cannot be none.'''					)

							if text is not None:
											snake_case_			    =						self.tokenizer(_A      ,							return_tensors=_A      ,							**_A					)

							if videos is not None:
											snake_case_			    =						self.image_processor(_A      ,							return_tensors=_A      ,							**_A					)

							if text is not None and videos is not None:
											snake_case_			    =						image_features.pixel_values
											return encoding
							elif text is not None:
											return encoding
							else:
											return BatchEncoding(data=dict(**_A					)      ,							tensor_type=_A					)






			def     lowerCamelCase						(self      ,							*__magic_name__      ,							**__magic_name__					)  ->     int:


							'''simple docstring'''



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






			def     lowerCamelCase						(self      ,							*__magic_name__      ,							**__magic_name__					)  ->     Dict:


							'''simple docstring'''



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






			@property
			def     lowerCamelCase						(self					)  ->     Any:


							'''simple docstring'''



							return ["input_ids", "attention_mask", "position_ids", "pixel_values"]






			@property
			def     lowerCamelCase						(self					)  ->     Optional[Any]:


							'''simple docstring'''



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






			@property
			def     lowerCamelCase						(self					)  ->     Optional[Any]:


							'''simple docstring'''



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







import warnings

from ...utils import logging
from .image_processing_mobilenet_va import MobileNetVaImageProcessor


lowerCAmelCase_												=       logging.get_logger(__name__)



class       __lowerCAmelCase (    _a  ):






			def __init__(self      ,							*__magic_name__      ,							**__magic_name__					)  ->     None:


							'''simple docstring'''



							warnings.warn(
							    '''The class MobileNetV2FeatureExtractor is deprecated and will be removed in version 5 of Transformers.'''
							    ''' Please use MobileNetV2ImageProcessor instead.'''      ,							__magic_name__      ,							)
							super().__init__(*__magic_name__      ,							**__magic_name__					)
