



import unittest
from pathlib import Path

from transformers import is_vision_available, load_tool
from transformers.testing_utils import get_tests_dir

from .test_tools_common import ToolTesterMixin


if is_vision_available():
	from PIL import Image
class lowerCAmelCase_       (   unittest.TestCase ,A_			):







	'''simple docstring'''




	def 				_A			(	self       ):



				'''simple docstring'''


				a__					=  load_tool("""image-segmentation"""       )
				self.tool.setup()
				a__					=  load_tool("""image-segmentation"""   ,       remote=lowerCamelCase       )

	def 				_A			(	self       ):



				'''simple docstring'''


				a__					=  Image.open(Path(get_tests_dir("""fixtures/tests_samples/COCO"""       )       ) / """000000039769.png"""       )
				a__					=  self.tool(lowerCamelCase   ,       """cat"""       )
				self.assertTrue(isinstance(lowerCamelCase   ,       Image.Image       )       )

	def 				_A			(	self       ):



				'''simple docstring'''


				a__					=  Image.open(Path(get_tests_dir("""fixtures/tests_samples/COCO"""       )       ) / """000000039769.png"""       )
				a__					=  self.remote_tool(lowerCamelCase   ,       """cat"""       )
				self.assertTrue(isinstance(lowerCamelCase   ,       Image.Image       )       )

	def 				_A			(	self       ):



				'''simple docstring'''


				a__					=  Image.open(Path(get_tests_dir("""fixtures/tests_samples/COCO"""       )       ) / """000000039769.png"""       )
				a__					=  self.tool(image=lowerCamelCase   ,       label="""cat"""       )
				self.assertTrue(isinstance(lowerCamelCase   ,       Image.Image       )       )







	def 				_A			(	self       ):



				'''simple docstring'''


				a__					=  Image.open(Path(get_tests_dir("""fixtures/tests_samples/COCO"""       )       ) / """000000039769.png"""       )
				a__					=  self.remote_tool(image=lowerCamelCase   ,       label="""cat"""       )
				self.assertTrue(isinstance(lowerCamelCase   ,       Image.Image       )       )






from ..utils import DummyObject, requires_backends
class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     List[str]									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     Dict									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     Union[str, Any]									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     Any									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     Dict									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     Dict									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     str									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     Any									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     Any									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     Dict									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     List[str]									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     Union[str, Any]									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     str									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     List[str]									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     List[str]									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     Union[str, Any]									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     Union[str, Any]									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     Optional[int]									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     Union[str, Any]									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     List[Any]									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     Dict									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     List[str]									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     Union[str, Any]									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     List[Any]									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     int									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     str									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     Dict									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     str									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     Optional[Any]									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     List[Any]									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     Optional[int]									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     Optional[int]									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     Tuple									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     Dict									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     int									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     Dict									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     Any									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     Optional[int]									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     List[str]									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     Any									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     Optional[Any]									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     Optional[int]									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     List[Any]									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     Dict									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     Optional[Any]									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     Any									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     Optional[int]									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     int									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     List[str]									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     Union[str, Any]									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     Tuple									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     Union[str, Any]									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     str									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     List[str]									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     Any									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     List[Any]									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     int									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     Optional[Any]									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     Optional[int]									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     Union[str, Any]									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     List[str]									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     Tuple									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     Tuple									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     Tuple									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     List[Any]									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     List[str]									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     Tuple									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     str									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     int									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     Any									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     int									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     str									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     Any									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )


class lowerCAmelCase_       (   metaclass=A_			):







	'''simple docstring'''




	A_       :     Dict									=		['vision']

	def __init__(	self   ,       *lowerCamelCase   ,       **lowerCamelCase       ):



				'''simple docstring'''


				requires_backends(self   ,       ["""vision"""]       )

