






from abc import ABC, abstractmethod
from typing import Optional, Union

from .. import Dataset, DatasetDict, Features, IterableDataset, IterableDatasetDict, NamedSplit
from ..utils.typing import NestedDataStructureLike, PathLike






class 			_UpperCamelCase(       __lowerCamelCase		):

		def __init__(					self		:    List[str]    ,       SCREAMING_SNAKE_CASE__		:    Optional[NestedDataStructureLike[PathLike]] = None    ,       SCREAMING_SNAKE_CASE__		:    Optional[NamedSplit] = None    ,       SCREAMING_SNAKE_CASE__		:    Optional[Features] = None    ,       SCREAMING_SNAKE_CASE__		:    str = None    ,       SCREAMING_SNAKE_CASE__		:    bool = False    ,       SCREAMING_SNAKE_CASE__		:    bool = False    ,       SCREAMING_SNAKE_CASE__		:    Optional[int] = None    ,       **SCREAMING_SNAKE_CASE__		:    Dict    ,       ):



					'''simple docstring'''



					__a						:  Any									=     path_or_paths
					__a						:  List[Any]									=     split if split or isinstance(SCREAMING_SNAKE_CASE__    ,       SCREAMING_SNAKE_CASE__    ) else 'train'
					__a						:  Any									=     features
					__a						:  str									=     cache_dir
					__a						:  List[str]									=     keep_in_memory
					__a						:  Dict									=     streaming
					__a						:  str									=     num_proc
					__a						:  List[str]									=     kwargs



		@abstractmethod
		def    __lowerCAmelCase  (					self		:    str    ):



					'''simple docstring'''



					pass






class 			_UpperCamelCase(       __lowerCamelCase		):

		def __init__(					self		:    int    ,       SCREAMING_SNAKE_CASE__		:    Optional[Features] = None    ,       SCREAMING_SNAKE_CASE__		:    str = None    ,       SCREAMING_SNAKE_CASE__		:    bool = False    ,       SCREAMING_SNAKE_CASE__		:    bool = False    ,       SCREAMING_SNAKE_CASE__		:    Optional[int] = None    ,       **SCREAMING_SNAKE_CASE__		:    Dict    ,       ):



					'''simple docstring'''



					__a						:  Tuple									=     features
					__a						:  Union[str, Any]									=     cache_dir
					__a						:  Optional[Any]									=     keep_in_memory
					__a						:  Tuple									=     streaming
					__a						:  Tuple									=     num_proc
					__a						:  Optional[int]									=     kwargs



		@abstractmethod
		def    __lowerCAmelCase  (					self		:    Any    ):



					'''simple docstring'''



					pass






'''simple docstring'''






from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available, is_vision_available


_UpperCAmelCase    :     Any         =       {
    '''configuration_maskformer''': ['''MASKFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''MaskFormerConfig'''],
    '''configuration_maskformer_swin''': ['''MaskFormerSwinConfig'''],
}

try:
   if not is_vision_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   _UpperCAmelCase    :     str         =       ['''MaskFormerFeatureExtractor''']
   _UpperCAmelCase    :     str         =       ['''MaskFormerImageProcessor''']


try:
   if not is_torch_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   _UpperCAmelCase    :     Tuple         =       [
       '''MASKFORMER_PRETRAINED_MODEL_ARCHIVE_LIST''',
       '''MaskFormerForInstanceSegmentation''',
       '''MaskFormerModel''',
       '''MaskFormerPreTrainedModel''',
   ]
   _UpperCAmelCase    :     int         =       [
       '''MaskFormerSwinBackbone''',
       '''MaskFormerSwinModel''',
       '''MaskFormerSwinPreTrainedModel''',
   ]

if TYPE_CHECKING:
   from .configuration_maskformer import MASKFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP, MaskFormerConfig
   from .configuration_maskformer_swin import MaskFormerSwinConfig

   try:
      if not is_vision_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .feature_extraction_maskformer import MaskFormerFeatureExtractor
      from .image_processing_maskformer import MaskFormerImageProcessor
   try:
      if not is_torch_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_maskformer import (
          MASKFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
          MaskFormerForInstanceSegmentation,
          MaskFormerModel,
          MaskFormerPreTrainedModel,
      )
      from .modeling_maskformer_swin import (
          MaskFormerSwinBackbone,
          MaskFormerSwinModel,
          MaskFormerSwinPreTrainedModel,
      )


else:
   import sys

   _UpperCAmelCase    :     str         =       _LazyModule(__name__, globals()['''__file__'''], _import_structure)



