




from typing import List, Union

import numpy as np

from ..utils import add_end_docstrings, is_torch_available, is_vision_available, logging, requires_backends
from .base import PIPELINE_INIT_ARGS, Pipeline


if is_vision_available():
						from PIL import Image

						from ..image_utils import load_image

if is_torch_available():
						import torch

						from ..models.auto.modeling_auto import MODEL_FOR_DEPTH_ESTIMATION_MAPPING

SCREAMING_SNAKE_CASE:     str									= logging.get_logger(__name__)



@add_end_docstrings(SCREAMING_SNAKE_CASE__ )
class    lowercase_		(SCREAMING_SNAKE_CASE__ ):



						def __init__(			self	:   Tuple					,							*snake_case__	:   Union[str, Any]					,							**snake_case__	:   Any  ):

								"""simple docstring"""

								super().__init__(*snake_case__					,							**snake_case__  )
								requires_backends(self					,							'vision'  )
								self.check_model_type(snake_case__  )



						def __call__(			self	:   List[str]					,							snake_case__	:   Union[str, List[str], "Image.Image", List["Image.Image"]]					,							**snake_case__	:   Any  ):

								"""simple docstring"""

								return super().__call__(snake_case__					,							**snake_case__  )



						def 	__a					(			self	:   Dict					,							**snake_case__	:   Dict  ):

								"""simple docstring"""

								return {}, {}, {}



						def 	__a					(			self	:   List[Any]					,							snake_case__	:   Optional[int]  ):

								"""simple docstring"""

								SCREAMING_SNAKE_CASE_					      =							load_image(snake_case__  )
								SCREAMING_SNAKE_CASE_					      =							image.size
								SCREAMING_SNAKE_CASE_					      =							self.image_processor(images=snake_case__					,							return_tensors=self.framework  )
								return model_inputs



						def 	__a					(			self	:   Any					,							snake_case__	:   int  ):

								"""simple docstring"""

								SCREAMING_SNAKE_CASE_					      =							self.model(**snake_case__  )
								return model_outputs






						def 	__a					(			self	:   List[Any]					,							snake_case__	:   Optional[Any]  ):

								"""simple docstring"""

								SCREAMING_SNAKE_CASE_					      =							model_outputs.predicted_depth
								SCREAMING_SNAKE_CASE_					      =							torch.nn.functional.interpolate(
								    predicted_depth.unsqueeze(1  )					,							size=self.image_size[::-1]					,							mode='bicubic'					,							align_corners=snake_case__  )
								SCREAMING_SNAKE_CASE_					      =							prediction.squeeze().cpu().numpy()
								SCREAMING_SNAKE_CASE_					      =							(output * 2_55 / np.max(snake_case__  )).astype('uint8'  )
								SCREAMING_SNAKE_CASE_					      =							Image.fromarray(snake_case__  )
								SCREAMING_SNAKE_CASE_					      =							{}
								SCREAMING_SNAKE_CASE_					      =							predicted_depth
								SCREAMING_SNAKE_CASE_					      =							depth
								return output_dict





SCREAMING_SNAKE_CASE:     Optional[int]									= {str(digit): digit**5 for digit in range(1_0)}


def 					_a							(					lowerCAmelCase )->	int:
		return sum(DIGITS_FIFTH_POWER[digit] for digit in str(lowerCAmelCase ) )


def 					_a							(					)->	int:
		return sum(
		    number
		    for number in range(1000    ,						1000000 )
		    if number == digits_fifth_powers_sum(lowerCAmelCase ) )


if __name__ == "__main__":
						print(solution())