



'''simple docstring'''

import json
import pathlib
import unittest

import numpy as np

from transformers.testing_utils import require_torch, require_vision, slow
from transformers.utils import is_torch_available, is_vision_available

from ...test_image_processing_common import ImageProcessingSavingTestMixin, prepare_image_inputs


if is_torch_available():
	import torch

if is_vision_available():
	from PIL import Image

	from transformers import ConditionalDetrImageProcessor


class 	a__     (				unittest.TestCase	):


	def __init__(self : Optional[Any],					__UpperCAmelCase : List[str],					__UpperCAmelCase : Union[str, Any]=7,					__UpperCAmelCase : Optional[Any]=3,					__UpperCAmelCase : int=30,					__UpperCAmelCase : List[Any]=400,					__UpperCAmelCase : Union[str, Any]=True,					__UpperCAmelCase : Optional[Any]=None,					__UpperCAmelCase : Union[str, Any]=True,					__UpperCAmelCase : Union[str, Any]=[0.5, 0.5, 0.5],					__UpperCAmelCase : Dict=[0.5, 0.5, 0.5],					__UpperCAmelCase : str=True,					__UpperCAmelCase : List[Any]=1 / 255,					__UpperCAmelCase : Union[str, Any]=True,					)     ->			List[str]:

					"""simple docstring"""

					SCREAMING_SNAKE_CASE  :						Optional[int]      					= size if size is not None else {'''shortest_edge''': 18, '''longest_edge''': 1333}
					SCREAMING_SNAKE_CASE  :						int      					= parent
					SCREAMING_SNAKE_CASE  :						str      					= batch_size
					SCREAMING_SNAKE_CASE  :						int      					= num_channels
					SCREAMING_SNAKE_CASE  :						Dict      					= min_resolution
					SCREAMING_SNAKE_CASE  :						Union[str, Any]      					= max_resolution
					SCREAMING_SNAKE_CASE  :						Union[str, Any]      					= do_resize
					SCREAMING_SNAKE_CASE  :						Optional[int]      					= size
					SCREAMING_SNAKE_CASE  :						Union[str, Any]      					= do_normalize
					SCREAMING_SNAKE_CASE  :						str      					= image_mean
					SCREAMING_SNAKE_CASE  :						Tuple      					= image_std
					SCREAMING_SNAKE_CASE  :						Optional[Any]      					= do_rescale
					SCREAMING_SNAKE_CASE  :						List[str]      					= rescale_factor
					SCREAMING_SNAKE_CASE  :						int      					= do_pad


	def 				lowercase__  (self : List[str]      )     ->			Dict:

					"""simple docstring"""

					return {
					    "do_resize": self.do_resize,
					    "size": self.size,
					    "do_normalize": self.do_normalize,
					    "image_mean": self.image_mean,
					    "image_std": self.image_std,
					    "do_rescale": self.do_rescale,
					    "rescale_factor": self.rescale_factor,
					    "do_pad": self.do_pad,
					}






	def 				lowercase__  (self : List[str],					__UpperCAmelCase : int,					__UpperCAmelCase : List[str]=False      )     ->			Any:

					"""simple docstring"""

					if not batched:
									SCREAMING_SNAKE_CASE  :						str      					= image_inputs[0]
									if isinstance(UpperCAmelCase_,					Image.Image      ):
													SCREAMING_SNAKE_CASE					,					SCREAMING_SNAKE_CASE  :						Optional[int]      					= image.size
									else:
													SCREAMING_SNAKE_CASE					,					SCREAMING_SNAKE_CASE  :						Optional[int]      					= image.shape[1], image.shape[2]
									if w < h:
													SCREAMING_SNAKE_CASE  :						Optional[Any]      					= int(self.size['''shortest_edge'''] * h / w      )
													SCREAMING_SNAKE_CASE  :						Optional[Any]      					= self.size['''shortest_edge''']
									elif w > h:
													SCREAMING_SNAKE_CASE  :						int      					= self.size['''shortest_edge''']
													SCREAMING_SNAKE_CASE  :						List[Any]      					= int(self.size['''shortest_edge'''] * w / h      )
									else:
													SCREAMING_SNAKE_CASE  :						List[Any]      					= self.size['''shortest_edge''']
													SCREAMING_SNAKE_CASE  :						List[Any]      					= self.size['''shortest_edge''']

					else:
									SCREAMING_SNAKE_CASE  :						List[str]      					= []
									for image in image_inputs:
													SCREAMING_SNAKE_CASE					,					SCREAMING_SNAKE_CASE  :						Tuple      					= self.get_expected_values([image]      )
													expected_values.append((expected_height, expected_width)      )
									SCREAMING_SNAKE_CASE  :						Any      					= max(UpperCAmelCase_,					key=lambda __UpperCAmelCase      : item[0]      )[0]
									SCREAMING_SNAKE_CASE  :						str      					= max(UpperCAmelCase_,					key=lambda __UpperCAmelCase      : item[1]      )[1]

					return expected_height, expected_width



@require_torch
@require_vision
class 	a__     (				__UpperCAmelCase,			unittest.TestCase	):
	__magic_name__		:    Union[str, Any]	    =     ConditionalDetrImageProcessor if is_vision_available() else None


	def 				lowercase__  (self : str      )     ->			List[str]:

					"""simple docstring"""

					SCREAMING_SNAKE_CASE  :						Tuple      					= ConditionalDetrImageProcessingTester(self      )


	@property
	def 				lowercase__  (self : Any      )     ->			int:

					"""simple docstring"""

					return self.image_processor_tester.prepare_image_processor_dict()


	def 				lowercase__  (self : int      )     ->			Optional[Any]:

					"""simple docstring"""

					SCREAMING_SNAKE_CASE  :						Any      					= self.image_processing_class(**self.image_processor_dict      )
					self.assertTrue(hasattr(UpperCAmelCase_,					'''image_mean'''      )      )
					self.assertTrue(hasattr(UpperCAmelCase_,					'''image_std'''      )      )
					self.assertTrue(hasattr(UpperCAmelCase_,					'''do_normalize'''      )      )
					self.assertTrue(hasattr(UpperCAmelCase_,					'''do_resize'''      )      )
					self.assertTrue(hasattr(UpperCAmelCase_,					'''size'''      )      )


	def 				lowercase__  (self : Any      )     ->			Optional[Any]:

					"""simple docstring"""

					SCREAMING_SNAKE_CASE  :						Optional[int]      					= self.image_processing_class.from_dict(self.image_processor_dict      )
					self.assertEqual(image_processor.size,					{'''shortest_edge''': 18, '''longest_edge''': 1333}      )
					self.assertEqual(image_processor.do_pad,					UpperCAmelCase_      )

					SCREAMING_SNAKE_CASE  :						Dict      					= self.image_processing_class.from_dict(
					    self.image_processor_dict,					size=42,					max_size=84,					pad_and_return_pixel_mask=UpperCAmelCase_      )
					self.assertEqual(image_processor.size,					{'''shortest_edge''': 42, '''longest_edge''': 84}      )
					self.assertEqual(image_processor.do_pad,					UpperCAmelCase_      )


	def 				lowercase__  (self : Tuple      )     ->			Any:

					"""simple docstring"""

					pass


	def 				lowercase__  (self : Dict      )     ->			str:

					"""simple docstring"""

					SCREAMING_SNAKE_CASE  :						Optional[Any]      					= self.image_processing_class(**self.image_processor_dict      )
					# create random PIL images
					SCREAMING_SNAKE_CASE  :						Tuple      					= prepare_image_inputs(self.image_processor_tester,					equal_resolution=UpperCAmelCase_      )
					for image in image_inputs:
									self.assertIsInstance(UpperCAmelCase_,					Image.Image      )

					# Test not batched input
					SCREAMING_SNAKE_CASE  :						int      					= image_processing(image_inputs[0],					return_tensors='''pt'''      ).pixel_values

					SCREAMING_SNAKE_CASE					,					SCREAMING_SNAKE_CASE  :						Tuple      					= self.image_processor_tester.get_expected_values(UpperCAmelCase_      )

					self.assertEqual(
					    encoded_images.shape,					(1, self.image_processor_tester.num_channels, expected_height, expected_width),					)

					# Test batched
					SCREAMING_SNAKE_CASE					,					SCREAMING_SNAKE_CASE  :						int      					= self.image_processor_tester.get_expected_values(UpperCAmelCase_,					batched=UpperCAmelCase_      )

					SCREAMING_SNAKE_CASE  :						Any      					= image_processing(UpperCAmelCase_,					return_tensors='''pt'''      ).pixel_values
					self.assertEqual(
					    encoded_images.shape,					(
					        self.image_processor_tester.batch_size,
					        self.image_processor_tester.num_channels,
					        expected_height,
					        expected_width,
					    ),					)


	def 				lowercase__  (self : str      )     ->			List[str]:

					"""simple docstring"""

					SCREAMING_SNAKE_CASE  :						List[Any]      					= self.image_processing_class(**self.image_processor_dict      )
					# create random numpy tensors
					SCREAMING_SNAKE_CASE  :						List[str]      					= prepare_image_inputs(self.image_processor_tester,					equal_resolution=UpperCAmelCase_,					numpify=UpperCAmelCase_      )
					for image in image_inputs:
									self.assertIsInstance(UpperCAmelCase_,					np.ndarray      )

					# Test not batched input
					SCREAMING_SNAKE_CASE  :						Optional[int]      					= image_processing(image_inputs[0],					return_tensors='''pt'''      ).pixel_values

					SCREAMING_SNAKE_CASE					,					SCREAMING_SNAKE_CASE  :						int      					= self.image_processor_tester.get_expected_values(UpperCAmelCase_      )

					self.assertEqual(
					    encoded_images.shape,					(1, self.image_processor_tester.num_channels, expected_height, expected_width),					)

					# Test batched
					SCREAMING_SNAKE_CASE  :						Optional[Any]      					= image_processing(UpperCAmelCase_,					return_tensors='''pt'''      ).pixel_values

					SCREAMING_SNAKE_CASE					,					SCREAMING_SNAKE_CASE  :						Tuple      					= self.image_processor_tester.get_expected_values(UpperCAmelCase_,					batched=UpperCAmelCase_      )

					self.assertEqual(
					    encoded_images.shape,					(
					        self.image_processor_tester.batch_size,
					        self.image_processor_tester.num_channels,
					        expected_height,
					        expected_width,
					    ),					)


	def 				lowercase__  (self : Union[str, Any]      )     ->			Optional[Any]:

					"""simple docstring"""

					SCREAMING_SNAKE_CASE  :						Optional[int]      					= self.image_processing_class(**self.image_processor_dict      )
					# create random PyTorch tensors
					SCREAMING_SNAKE_CASE  :						Optional[int]      					= prepare_image_inputs(self.image_processor_tester,					equal_resolution=UpperCAmelCase_,					torchify=UpperCAmelCase_      )
					for image in image_inputs:
									self.assertIsInstance(UpperCAmelCase_,					torch.Tensor      )

					# Test not batched input
					SCREAMING_SNAKE_CASE  :						Union[str, Any]      					= image_processing(image_inputs[0],					return_tensors='''pt'''      ).pixel_values

					SCREAMING_SNAKE_CASE					,					SCREAMING_SNAKE_CASE  :						Optional[int]      					= self.image_processor_tester.get_expected_values(UpperCAmelCase_      )

					self.assertEqual(
					    encoded_images.shape,					(1, self.image_processor_tester.num_channels, expected_height, expected_width),					)

					# Test batched
					SCREAMING_SNAKE_CASE  :						Any      					= image_processing(UpperCAmelCase_,					return_tensors='''pt'''      ).pixel_values

					SCREAMING_SNAKE_CASE					,					SCREAMING_SNAKE_CASE  :						List[str]      					= self.image_processor_tester.get_expected_values(UpperCAmelCase_,					batched=UpperCAmelCase_      )

					self.assertEqual(
					    encoded_images.shape,					(
					        self.image_processor_tester.batch_size,
					        self.image_processor_tester.num_channels,
					        expected_height,
					        expected_width,
					    ),					)


	@slow
	def 				lowercase__  (self : Dict      )     ->			int:

					"""simple docstring"""

					SCREAMING_SNAKE_CASE  :						Optional[int]      					= Image.open('''./tests/fixtures/tests_samples/COCO/000000039769.png'''      )
					with open('''./tests/fixtures/tests_samples/COCO/coco_annotations.txt''',					'''r'''      ) as f:
									SCREAMING_SNAKE_CASE  :						Optional[int]      					= json.loads(f.read()      )

					SCREAMING_SNAKE_CASE  :						Dict      					= {'''image_id''': 39769, '''annotations''': target}

					# encode them
					SCREAMING_SNAKE_CASE  :						List[Any]      					= ConditionalDetrImageProcessor.from_pretrained('''microsoft/conditional-detr-resnet-50'''      )
					SCREAMING_SNAKE_CASE  :						Optional[Any]      					= image_processing(images=UpperCAmelCase_,					annotations=UpperCAmelCase_,					return_tensors='''pt'''      )

					# verify pixel values
					SCREAMING_SNAKE_CASE  :						Union[str, Any]      					= torch.Size([1, 3, 800, 1066]      )
					self.assertEqual(encoding['''pixel_values'''].shape,					UpperCAmelCase_      )

					SCREAMING_SNAKE_CASE  :						Optional[Any]      					= torch.tensor([0.2796, 0.3138, 0.3481]      )
					self.assertTrue(torch.allclose(encoding['''pixel_values'''][0, 0, 0, :3],					UpperCAmelCase_,					atol=1e-4      )      )

					# verify area
					SCREAMING_SNAKE_CASE  :						Optional[int]      					= torch.tensor([5887.9600, 1_1250.2061, 48_9353.8438, 83_7122.7500, 14_7967.5156, 16_5732.3438]      )
					self.assertTrue(torch.allclose(encoding['''labels'''][0]['''area'''],					UpperCAmelCase_      )      )
					# verify boxes
					SCREAMING_SNAKE_CASE  :						Dict      					= torch.Size([6, 4]      )
					self.assertEqual(encoding['''labels'''][0]['''boxes'''].shape,					UpperCAmelCase_      )
					SCREAMING_SNAKE_CASE  :						List[Any]      					= torch.tensor([0.5503, 0.2765, 0.0604, 0.2215]      )
					self.assertTrue(torch.allclose(encoding['''labels'''][0]['''boxes'''][0],					UpperCAmelCase_,					atol=1e-3      )      )
					# verify image_id
					SCREAMING_SNAKE_CASE  :						Optional[int]      					= torch.tensor([39769]      )
					self.assertTrue(torch.allclose(encoding['''labels'''][0]['''image_id'''],					UpperCAmelCase_      )      )
					# verify is_crowd
					SCREAMING_SNAKE_CASE  :						List[Any]      					= torch.tensor([0, 0, 0, 0, 0, 0]      )
					self.assertTrue(torch.allclose(encoding['''labels'''][0]['''iscrowd'''],					UpperCAmelCase_      )      )
					# verify class_labels
					SCREAMING_SNAKE_CASE  :						Dict      					= torch.tensor([75, 75, 63, 65, 17, 17]      )
					self.assertTrue(torch.allclose(encoding['''labels'''][0]['''class_labels'''],					UpperCAmelCase_      )      )
					# verify orig_size
					SCREAMING_SNAKE_CASE  :						Optional[Any]      					= torch.tensor([480, 640]      )
					self.assertTrue(torch.allclose(encoding['''labels'''][0]['''orig_size'''],					UpperCAmelCase_      )      )
					# verify size
					SCREAMING_SNAKE_CASE  :						Optional[int]      					= torch.tensor([800, 1066]      )
					self.assertTrue(torch.allclose(encoding['''labels'''][0]['''size'''],					UpperCAmelCase_      )      )






	@slow
	def 				lowercase__  (self : List[str]      )     ->			Dict:

					"""simple docstring"""

					SCREAMING_SNAKE_CASE  :						Union[str, Any]      					= Image.open('''./tests/fixtures/tests_samples/COCO/000000039769.png'''      )
					with open('''./tests/fixtures/tests_samples/COCO/coco_panoptic_annotations.txt''',					'''r'''      ) as f:
									SCREAMING_SNAKE_CASE  :						Optional[int]      					= json.loads(f.read()      )

					SCREAMING_SNAKE_CASE  :						Optional[Any]      					= {'''file_name''': '''000000039769.png''', '''image_id''': 39769, '''segments_info''': target}

					SCREAMING_SNAKE_CASE  :						List[Any]      					= pathlib.Path('''./tests/fixtures/tests_samples/COCO/coco_panoptic'''      )

					# encode them
					SCREAMING_SNAKE_CASE  :						List[Any]      					= ConditionalDetrImageProcessor(format='''coco_panoptic'''      )
					SCREAMING_SNAKE_CASE  :						str      					= image_processing(images=UpperCAmelCase_,					annotations=UpperCAmelCase_,					masks_path=UpperCAmelCase_,					return_tensors='''pt'''      )

					# verify pixel values
					SCREAMING_SNAKE_CASE  :						str      					= torch.Size([1, 3, 800, 1066]      )
					self.assertEqual(encoding['''pixel_values'''].shape,					UpperCAmelCase_      )

					SCREAMING_SNAKE_CASE  :						Tuple      					= torch.tensor([0.2796, 0.3138, 0.3481]      )
					self.assertTrue(torch.allclose(encoding['''pixel_values'''][0, 0, 0, :3],					UpperCAmelCase_,					atol=1e-4      )      )

					# verify area
					SCREAMING_SNAKE_CASE  :						int      					= torch.tensor([14_7979.6875, 16_5527.0469, 48_4638.5938, 1_1292.9375, 5879.6562, 7634.1147]      )
					self.assertTrue(torch.allclose(encoding['''labels'''][0]['''area'''],					UpperCAmelCase_      )      )
					# verify boxes
					SCREAMING_SNAKE_CASE  :						Optional[Any]      					= torch.Size([6, 4]      )
					self.assertEqual(encoding['''labels'''][0]['''boxes'''].shape,					UpperCAmelCase_      )
					SCREAMING_SNAKE_CASE  :						List[str]      					= torch.tensor([0.2625, 0.5437, 0.4688, 0.8625]      )
					self.assertTrue(torch.allclose(encoding['''labels'''][0]['''boxes'''][0],					UpperCAmelCase_,					atol=1e-3      )      )
					# verify image_id
					SCREAMING_SNAKE_CASE  :						Dict      					= torch.tensor([39769]      )
					self.assertTrue(torch.allclose(encoding['''labels'''][0]['''image_id'''],					UpperCAmelCase_      )      )
					# verify is_crowd
					SCREAMING_SNAKE_CASE  :						List[str]      					= torch.tensor([0, 0, 0, 0, 0, 0]      )
					self.assertTrue(torch.allclose(encoding['''labels'''][0]['''iscrowd'''],					UpperCAmelCase_      )      )
					# verify class_labels
					SCREAMING_SNAKE_CASE  :						str      					= torch.tensor([17, 17, 63, 75, 75, 93]      )
					self.assertTrue(torch.allclose(encoding['''labels'''][0]['''class_labels'''],					UpperCAmelCase_      )      )
					# verify masks
					SCREAMING_SNAKE_CASE  :						Any      					= 822873
					self.assertEqual(encoding['''labels'''][0]['''masks'''].sum().item(),					UpperCAmelCase_      )
					# verify orig_size
					SCREAMING_SNAKE_CASE  :						List[str]      					= torch.tensor([480, 640]      )
					self.assertTrue(torch.allclose(encoding['''labels'''][0]['''orig_size'''],					UpperCAmelCase_      )      )
					# verify size
					SCREAMING_SNAKE_CASE  :						int      					= torch.tensor([800, 1066]      )
					self.assertTrue(torch.allclose(encoding['''labels'''][0]['''size'''],					UpperCAmelCase_      )      )









'''simple docstring'''

from ..utils import DummyObject, requires_backends


class 	a__     (				metaclass=_lowercase	):
	__magic_name__		:    Dict	    =     ["torch", "transformers", "onnx"]


	def __init__(self : List[str],					*__UpperCAmelCase : Dict,					**__UpperCAmelCase : List[Any]      )     ->			Union[str, Any]:

					"""simple docstring"""

					requires_backends(self,					['''torch''', '''transformers''', '''onnx''']      )


	@classmethod
	def 				lowercase__  (cls : Optional[Any],					*__UpperCAmelCase : Tuple,					**__UpperCAmelCase : int      )     ->			int:

					"""simple docstring"""

					requires_backends(cls,					['''torch''', '''transformers''', '''onnx''']      )






	@classmethod
	def 				lowercase__  (cls : Any,					*__UpperCAmelCase : Tuple,					**__UpperCAmelCase : Tuple      )     ->			Tuple:

					"""simple docstring"""

					requires_backends(cls,					['''torch''', '''transformers''', '''onnx''']      )



class 	a__     (				metaclass=_lowercase	):
	__magic_name__		:    Any	    =     ["torch", "transformers", "onnx"]


	def __init__(self : Dict,					*__UpperCAmelCase : Union[str, Any],					**__UpperCAmelCase : Optional[Any]      )     ->			int:

					"""simple docstring"""

					requires_backends(self,					['''torch''', '''transformers''', '''onnx''']      )


	@classmethod
	def 				lowercase__  (cls : Any,					*__UpperCAmelCase : Tuple,					**__UpperCAmelCase : List[str]      )     ->			Optional[int]:

					"""simple docstring"""

					requires_backends(cls,					['''torch''', '''transformers''', '''onnx''']      )






	@classmethod
	def 				lowercase__  (cls : int,					*__UpperCAmelCase : List[Any],					**__UpperCAmelCase : Any      )     ->			Optional[Any]:

					"""simple docstring"""

					requires_backends(cls,					['''torch''', '''transformers''', '''onnx''']      )



class 	a__     (				metaclass=_lowercase	):
	__magic_name__		:    Optional[Any]	    =     ["torch", "transformers", "onnx"]


	def __init__(self : Dict,					*__UpperCAmelCase : Dict,					**__UpperCAmelCase : Any      )     ->			List[str]:

					"""simple docstring"""

					requires_backends(self,					['''torch''', '''transformers''', '''onnx''']      )


	@classmethod
	def 				lowercase__  (cls : Tuple,					*__UpperCAmelCase : Union[str, Any],					**__UpperCAmelCase : int      )     ->			Optional[Any]:

					"""simple docstring"""

					requires_backends(cls,					['''torch''', '''transformers''', '''onnx''']      )






	@classmethod
	def 				lowercase__  (cls : Union[str, Any],					*__UpperCAmelCase : List[str],					**__UpperCAmelCase : str      )     ->			Optional[int]:

					"""simple docstring"""

					requires_backends(cls,					['''torch''', '''transformers''', '''onnx''']      )



class 	a__     (				metaclass=_lowercase	):
	__magic_name__		:    Tuple	    =     ["torch", "transformers", "onnx"]


	def __init__(self : Union[str, Any],					*__UpperCAmelCase : Optional[int],					**__UpperCAmelCase : List[Any]      )     ->			Tuple:

					"""simple docstring"""

					requires_backends(self,					['''torch''', '''transformers''', '''onnx''']      )


	@classmethod
	def 				lowercase__  (cls : str,					*__UpperCAmelCase : Optional[int],					**__UpperCAmelCase : Tuple      )     ->			str:

					"""simple docstring"""

					requires_backends(cls,					['''torch''', '''transformers''', '''onnx''']      )






	@classmethod
	def 				lowercase__  (cls : int,					*__UpperCAmelCase : List[Any],					**__UpperCAmelCase : List[str]      )     ->			Tuple:

					"""simple docstring"""

					requires_backends(cls,					['''torch''', '''transformers''', '''onnx''']      )



class 	a__     (				metaclass=_lowercase	):
	__magic_name__		:    List[Any]	    =     ["torch", "transformers", "onnx"]


	def __init__(self : Dict,					*__UpperCAmelCase : Optional[Any],					**__UpperCAmelCase : int      )     ->			List[str]:

					"""simple docstring"""

					requires_backends(self,					['''torch''', '''transformers''', '''onnx''']      )


	@classmethod
	def 				lowercase__  (cls : List[str],					*__UpperCAmelCase : Union[str, Any],					**__UpperCAmelCase : Dict      )     ->			Union[str, Any]:

					"""simple docstring"""

					requires_backends(cls,					['''torch''', '''transformers''', '''onnx''']      )






	@classmethod
	def 				lowercase__  (cls : Any,					*__UpperCAmelCase : List[str],					**__UpperCAmelCase : List[Any]      )     ->			Dict:

					"""simple docstring"""

					requires_backends(cls,					['''torch''', '''transformers''', '''onnx''']      )



class 	a__     (				metaclass=_lowercase	):
	__magic_name__		:    Dict	    =     ["torch", "transformers", "onnx"]


	def __init__(self : Tuple,					*__UpperCAmelCase : Optional[Any],					**__UpperCAmelCase : List[str]      )     ->			Any:

					"""simple docstring"""

					requires_backends(self,					['''torch''', '''transformers''', '''onnx''']      )


	@classmethod
	def 				lowercase__  (cls : Tuple,					*__UpperCAmelCase : Any,					**__UpperCAmelCase : Union[str, Any]      )     ->			Optional[int]:

					"""simple docstring"""

					requires_backends(cls,					['''torch''', '''transformers''', '''onnx''']      )






	@classmethod
	def 				lowercase__  (cls : Optional[Any],					*__UpperCAmelCase : Union[str, Any],					**__UpperCAmelCase : Optional[Any]      )     ->			int:

					"""simple docstring"""

					requires_backends(cls,					['''torch''', '''transformers''', '''onnx''']      )




