code: import math
  import os
  
  import cva
  import numpy as np
  
  A_:      Optional[Any]        =			2_5_5.0
  
  
  def 					__lowerCAmelCase			(  _A ,_A					):
  
  
  
  							"""simple docstring"""
  
  
  							_lowercase				=	np.mean((original - contrast) ** 2					)
  							if mse == 0:
  														return 100
  
  							return 20 * math.logaa(PIXEL_MAX / math.sqrt(_A					)					)
  
  
  def 					__lowerCAmelCase			(  ):
  
  
  
  							"""simple docstring"""
  
  
  							_lowercase				=	os.path.dirname(os.path.realpath(_A					)					)
  							# Loading images (original image and compressed image)
  							_lowercase				=	cva.imread(os.path.join(_A ,"""image_data/original_image.png"""					)					)
  							_lowercase				=	cva.imread(os.path.join(_A ,"""image_data/compressed_image.png"""					) ,1					)
  
  							_lowercase				=	cva.imread(os.path.join(_A ,"""image_data/PSNR-example-base.png"""					)					)
  							_lowercase				=	cva.imread(
  							    os.path.join(_A ,"""image_data/PSNR-example-comp-10.jpg"""					) ,1					)
  
  							# Value expected: 29.73dB
  							print("""-- First Test --"""					)
  							print(f'''PSNR value is {peak_signal_to_noise_ratio(_A ,_A					)} dB'''					)
  
  							# # Value expected: 31.53dB (Wikipedia Example)
  							print("""\n-- Second Test --"""					)
  							print(f'''PSNR value is {peak_signal_to_noise_ratio(_A ,_A					)} dB'''					)
  
  
  if __name__ == "__main__":
  				main()
  
  
  
style_context: import warnings
  
  from ...utils import logging
  from .image_processing_mobilenet_va import MobileNetVaImageProcessor
  
  
  A_:      Tuple        =			logging.get_logger(__name__)
  
  
  class _lowercase					(       _UpperCAmelCase						):
  
  
  
  
  
  							"""simple docstring"""
  
  
  
  
  							def __init__(    self     ,   *UpperCAmelCase     ,   **UpperCAmelCase  ):
  
  
  
  
  
  
  
  														'''simple docstring'''
  
  
  
  
  
  
  														warnings.warn(
  														    """The class MobileNetV2FeatureExtractor is deprecated and will be removed in version 5 of Transformers."""
  														    """ Please use MobileNetV2ImageProcessor instead."""     ,   UpperCAmelCase     ,   )
  														super().__init__(*UpperCAmelCase     ,   **UpperCAmelCase  )
  
  
  