§
    Ý˜ºh€¡  ã                   óª  — d dl Z d dlZd dlZd dlmZ d dlmZ d dlmZm	Z	m
Z
mZ d dlZddlmZ ddlmZmZ ddlmZ dd	lmZmZmZ dd
lmZmZ ddlmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z* ddl+m,Z, ddl-m.Z. ddl/m0Z0m1Z1m2Z2m3Z3m4Z4m5Z5m6Z6m7Z7m8Z8  e&¦   «         rd dl9Z9 e(¦   «         r e)¦   «         rd dl:m;Z< nd dl=m;Z<  e*j>        e?¦  «        Z@dZA e!deA¦  «         e.d¬¦  «         G d„ de¦  «        ¦   «         ¦   «         ZB e"eBjC        ¦  «        eB_C        eBjC        jD        �.eBjC        jD         E                    ddd¬¦  «        eBjC        _D        dS dS )é    N)Údeepcopy)Úpartial)ÚAnyÚCallableÚOptionalÚUnioné   )Úcustom_object_save)ÚBatchFeatureÚget_size_dict)ÚBaseImageProcessorFast)ÚChannelDimensionÚSizeDictÚvalidate_kwargs)ÚUnpackÚVideosKwargs)ÚIMAGE_PROCESSOR_NAMEÚPROCESSOR_NAMEÚVIDEO_PROCESSOR_NAMEÚ
TensorTypeÚadd_start_docstringsÚ	copy_funcÚdownload_urlÚis_offline_modeÚis_remote_urlÚis_torch_availableÚis_torchcodec_availableÚis_torchvision_availableÚis_torchvision_v2_availableÚlogging)Úcached_files)Úrequires)	Ú
VideoInputÚVideoMetadataÚgroup_videos_by_shapeÚis_valid_videoÚ
load_videoÚmake_batched_metadataÚmake_batched_videosÚreorder_videosÚto_channel_dimension_format)Ú
functionalaQ  
    Args:
        do_resize (`bool`, *optional*, defaults to `self.do_resize`):
            Whether to resize the video's (height, width) dimensions to the specified `size`. Can be overridden by the
            `do_resize` parameter in the `preprocess` method.
        size (`dict`, *optional*, defaults to `self.size`):
            Size of the output video after resizing. Can be overridden by the `size` parameter in the `preprocess`
            method.
        size_divisor (`int`, *optional*, defaults to `self.size_divisor`):
            The size by which to make sure both the height and width can be divided.
        default_to_square (`bool`, *optional*, defaults to `self.default_to_square`):
            Whether to default to a square video when resizing, if size is an int.
        resample (`PILImageResampling`, *optional*, defaults to `self.resample`):
            Resampling filter to use if resizing the video. Only has an effect if `do_resize` is set to `True`. Can be
            overridden by the `resample` parameter in the `preprocess` method.
        do_center_crop (`bool`, *optional*, defaults to `self.do_center_crop`):
            Whether to center crop the video to the specified `crop_size`. Can be overridden by `do_center_crop` in the
            `preprocess` method.
        do_pad (`bool`, *optional*):
            Whether to pad the video to the `(max_height, max_width)` of the videos in the batch.
        crop_size (`dict[str, int]` *optional*, defaults to `self.crop_size`):
            Size of the output video after applying `center_crop`. Can be overridden by `crop_size` in the `preprocess`
            method.
        do_rescale (`bool`, *optional*, defaults to `self.do_rescale`):
            Whether to rescale the video by the specified scale `rescale_factor`. Can be overridden by the
            `do_rescale` parameter in the `preprocess` method.
        rescale_factor (`int` or `float`, *optional*, defaults to `self.rescale_factor`):
            Scale factor to use if rescaling the video. Only has an effect if `do_rescale` is set to `True`. Can be
            overridden by the `rescale_factor` parameter in the `preprocess` method.
        do_normalize (`bool`, *optional*, defaults to `self.do_normalize`):
            Whether to normalize the video. Can be overridden by the `do_normalize` parameter in the `preprocess`
            method. Can be overridden by the `do_normalize` parameter in the `preprocess` method.
        image_mean (`float` or `list[float]`, *optional*, defaults to `self.image_mean`):
            Mean to use if normalizing the video. This is a float or list of floats the length of the number of
            channels in the video. Can be overridden by the `image_mean` parameter in the `preprocess` method. Can be
            overridden by the `image_mean` parameter in the `preprocess` method.
        image_std (`float` or `list[float]`, *optional*, defaults to `self.image_std`):
            Standard deviation to use if normalizing the video. This is a float or list of floats the length of the
            number of channels in the video. Can be overridden by the `image_std` parameter in the `preprocess` method.
            Can be overridden by the `image_std` parameter in the `preprocess` method.
        do_convert_rgb (`bool`, *optional*, defaults to `self.image_std`):
            Whether to convert the video to RGB.
        video_metadata (`VideoMetadata`, *optional*):
            Metadata of the video containing information about total duration, fps and total number of frames.
        do_sample_frames (`int`, *optional*, defaults to `self.do_sample_frames`):
            Whether to sample frames from the video before processing or to process the whole video.
        num_frames (`int`, *optional*, defaults to `self.num_frames`):
            Maximum number of frames to sample when `do_sample_frames=True`.
        fps (`int` or `float`, *optional*, defaults to `self.fps`):
            Target frames to sample per second when `do_sample_frames=True`.
        return_tensors (`str` or `TensorType`, *optional*):
            Returns stacked tensors if set to `pt, otherwise returns a list of tensors.
        data_format (`ChannelDimension` or `str`, *optional*, defaults to `ChannelDimension.FIRST`):
            The channel dimension format for the output video. Can be one of:
            - `"channels_first"` or `ChannelDimension.FIRST`: video in (num_channels, height, width) format.
            - `"channels_last"` or `ChannelDimension.LAST`: video in (height, width, num_channels) format.
            - Unset: Use the channel dimension format of the input video.
        input_data_format (`ChannelDimension` or `str`, *optional*):
            The channel dimension format for the input video. If unset, the channel dimension format is inferred
            from the input video. Can be one of:
            - `"channels_first"` or `ChannelDimension.FIRST`: video in (num_channels, height, width) format.
            - `"channels_last"` or `ChannelDimension.LAST`: video in (height, width, num_channels) format.
            - `"none"` or `ChannelDimension.NONE`: video in (height, width) format.
        device (`torch.device`, *optional*):
            The device to process the videos on. If unset, the device is inferred from the input videos.
        return_metadata (`bool`, *optional*):
            Whether to return video metadata or not.
        z!Constructs a base VideoProcessor.)ÚvisionÚtorchvision)Úbackendsc            "       óò  ‡ — e Zd ZdZdZdZdZdZdZdZ	dZ
dZdZdZdZdZdZdZdZdZdZdZdZeZdgZdee         ddfˆ fd„Zdefd	„Zd
ddefd„Z	 	 dCde de!e"         de!e#e"e$f                  fd„Z%	 	 dCdede#e e&f         de!e'         de!e(         de)d         f
d„Z*	 	 dCdede!e#e+e,f                  de!e+         de)d         fd„Z- e.e/¦  «        dedee         defd„¦   «         Z0	 dDde)d         de'de'de1de!e"         de!d         d e'd!e1d"e'd#e'd$e$d%e'd&e!e#e$e)e$         f                  d'e!e#e$e)e$         f                  d(e!e#e+e2f                  def d)„Z3e4	 	 	 	 	 dEd+e#e+e5j6        f         d,e!e#e+e5j6        f                  d-e'd.e'd/e!e#e+e'f                  d0e+fd1„¦   «         Z7dFd2e#e+e5j6        f         d3e'fd4„Z8e4d+e#e+e5j6        f         de9e&e+e:f         e&e+e:f         f         fd5„¦   «         Z;e4d6e&e+e:f         fd7„¦   «         Z<de&e+e:f         fd8„Z=de+fd9„Z>d:e#e+e5j6        f         fd;„Z?d<„ Z@e4d=e#e+e5j6        f         fd>„¦   «         ZAe4dGd@„¦   «         ZBdDdAe#e+e)e+         e)e)e+                  f         fdB„ZCˆ xZDS )HÚBaseVideoProcessorNTgp?FÚpixel_values_videosÚkwargsÚreturnc                 ór  •— t          ¦   «                              ¦   «          |                     dd ¦  «        | _        |                     ¦   «         D ]N\  }}	 t          | ||¦  «         Œ# t          $ r*}t                               d|› d|› d| › �¦  «         |‚d }~ww xY w|                     d| j	        ¦  «        }|�*t          ||                     d| j        ¦  «        ¬¦  «        nd | _	        |                     d| j        ¦  «        }|�t          |d¬	¦  «        nd | _        t          | j        j                             ¦   «         ¦  «        | _        | j        D ]\}|                     |¦  «        �t          | |||         ¦  «         Œ/t          | |t'          t)          | |d ¦  «        ¦  «        ¦  «         Œ]d S )
NÚprocessor_classz
Can't set z with value z for ÚsizeÚdefault_to_square)r7   r8   Ú	crop_size)Ú
param_name)ÚsuperÚ__init__ÚpopÚ_processor_classÚitemsÚsetattrÚAttributeErrorÚloggerÚerrorr7   r   r8   r9   ÚlistÚvalid_kwargsÚ__annotations__ÚkeysÚmodel_valid_processing_keysÚgetr   Úgetattr)Úselfr3   ÚkeyÚvalueÚerrr7   r9   Ú	__class__s          €úk/var/www/html/services/rag-service/venv/lib/python3.11/site-packages/transformers/video_processing_utils.pyr<   zBaseVideoProcessor.__init__´   sÓ  ø€ Ý‰Œ×ÒÑÔÐà &§
¢
Ð+<¸dÑ CÔ CˆÔð !Ÿ,š,™.œ.ð 	ð 	‰JˆC�ðÝ˜˜c 5Ñ)Ô)Ð)Ð)øÝ!ð ð ð Ý—’ÐM¨#ÐMÐM¸5ÐMÐMÀtÐMÐMÑNÔNÐNØ�	øøøøðøøøð
 �zŠz˜& $¤)Ñ,Ô,ˆð Ðõ ˜t°v·z²zÐBUÐW[ÔWmÑ7nÔ7nÐoÑoÔoÐoàð 	Œ	ð
 —J’J˜{¨D¬NÑ;Ô;ˆ	ØMVÐMb� y¸[ÐIÑIÔIÐIÐhlˆŒõ ,0°Ô0AÔ0Q×0VÒ0VÑ0XÔ0XÑ+YÔ+YˆÔ(ØÔ3ð 	Gð 	GˆCØ�zŠz˜#‰ŒÐ*Ý˜˜c 6¨#¤;Ñ/Ô/Ð/Ð/å˜˜c¥8­G°D¸#¸tÑ,DÔ,DÑ#EÔ#EÑFÔFÐFÐFð		Gð 	Gs   ÁA)Á)
BÁ3%BÂBc                 ó   —  | j         |fi |¤ŽS ©N)Ú
preprocess)rK   Úvideosr3   s      rP   Ú__call__zBaseVideoProcessor.__call__Ó   s   € ØˆtŒ˜vÐ0Ð0¨Ð0Ð0Ð0ó    Úvideoztorch.Tensorc                 ó:  — t          j        |¦  «        }|j        d         dk    s&|dddd…dd…f         dk                          ¦   «         s|S |dddd…dd…f         dz  }d|dddd…dd…f         z
  dz  |dddd…dd…f         |ddd…dd…dd…f         z  z   }|S )zÏ
        Converts a video to RGB format.

        Args:
            video (`"torch.Tensor"`):
                The video to convert.

        Returns:
            `torch.Tensor`: The converted video.
        éýÿÿÿé   .Néÿ   g     ào@r	   )ÚFÚgrayscale_to_rgbÚshapeÚany)rK   rW   Úalphas      rP   Úconvert_to_rgbz!BaseVideoProcessor.convert_to_rgbÖ   sâ   € õ Ô" 5Ñ)Ô)ˆØŒ;�rŒ?˜aÒÐ¨¨c°1°a°a°a¸¸¸¨lÔ(;¸cÒ(A×'FÒ'FÑ'HÔ'HÐØˆLð �c˜1˜a˜a˜a   �lÔ# eÑ+ˆØ�U˜3  a a a¨¨¨˜?Ô+Ñ+¨sÑ2°U¸3ÀÀaÀaÀaÈÈÈ¸?Ô5KÈeÐTWÐY[ÐZ[ÐY[Ð]^Ð]^Ð]^Ð`aÐ`aÐ`aÐTaÔNbÑ5bÑbˆØˆrV   ÚmetadataÚ
num_framesÚfpsc                 ó´  — |�|�t          d¦  «        ‚|�|n| j        }|�|n| j        }|j        }|€4|�2|�|j        €t          d¦  «        ‚t	          ||j        z  |z  ¦  «        }||k    rt          d|› d|› d�¦  «        ‚|�,t          j        d|||z  ¦  «                             ¦   «         }n't          j        d|¦  «                             ¦   «         }|S )a%  
        Default sampling function which uniformly samples the desired number of frames between 0 and total number of frames.
        If `fps` is passed along with metadata, `fps` frames per second are sampled uniformty. Arguments `num_frames`
        and `fps` are mutually exclusive.

        Args:
            metadata (`VideoMetadata`):
                Metadata of the video containing information about total duration, fps and total number of frames.
            num_frames (`int`, *optional*):
                Maximum number of frames to sample. Defaults to `self.num_frames`.
            fps (`int` or `float`, *optional*):
                Target frames to sample per second. Defaults to `self.fps`.

        Returns:
            np.ndarray:
                Indices to sample video frames.
        Nzc`num_frames`, `fps`, and `sample_indices_fn` are mutually exclusive arguments, please use only one!zÈAsked to sample `fps` frames per second but no video metadata was provided which is required when sampling with `fps`. Please pass in `VideoMetadata` object or use a fixed `num_frames` per input videoz(Video can't be sampled. The `num_frames=z` exceeds `total_num_frames=z`. r   )Ú
ValueErrorrc   rd   Útotal_num_framesÚintÚtorchÚarange)rK   rb   rc   rd   r3   rg   Úindicess          rP   Úsample_framesz BaseVideoProcessor.sample_framesï   s"  € ð0 ˆ?˜zÐ5ÝØuñô ð ð $.Ð#9�Z�Z¸t¼ˆ
Ø�_ˆcˆc¨$¬(ˆØ#Ô4Ðð Ð # /ØÐ 8¤<Ð#7Ý ðhñô ð õ Ð-°´Ñ<¸sÑBÑCÔCˆJàÐ(Ò(Ð(ÝØx¸:ÐxÐxÐcsÐxÐxÐxñô ð ð Ð!Ý”l 1Ð&6Ð8HÈ:Ñ8UÑVÔV×ZÒZÑ\Ô\ˆGˆGå”l 1Ð&6Ñ7Ô7×;Ò;Ñ=Ô=ˆGØˆrV   rT   Úvideo_metadataÚdo_sample_framesÚsample_indices_fnc                 ó2  — t          |¦  «        }t          ||¬¦  «        }t          |d         ¦  «        rd|rbg }g }t          ||¦  «        D ]H\  }} ||¬¦  «        }	|	|_        |                     ||	         ¦  «         |                     |¦  «         ŒI|}|}n{t          |d         ¦  «        sft          |d         t          ¦  «        r1d„ |                      |¦  «        D ¦   «         }|rt          d¦  «        ‚n|  
                    ||¬¦  «        \  }}||fS )zB
        Decode input videos and sample frames if needed.
        )rm   r   )rb   c                 óN   — g | ]"}t          j        d „ |D ¦   «         d¬¦  «        ‘Œ#S )c                 ó6   — g | ]}t          j        |¦  «        ‘ŒS © )r\   Úpil_to_tensor)Ú.0Úimages     rP   ú
<listcomp>zKBaseVideoProcessor._decode_and_sample_videos.<locals>.<listcomp>.<listcomp>@  s"   € Ð LÐ LÐ L¸E¥¤°Ñ!7Ô!7Ð LÐ LÐ LrV   r   ©Údim)ri   Ústack)ru   Úimagess     rP   rw   z@BaseVideoProcessor._decode_and_sample_videos.<locals>.<listcomp>?  sG   € ð ð ð àõ ”KÐ LÐ LÀVÐ LÑ LÔ LÐRSÐTÑTÔTðð ð rV   zUSampling frames from a list of images is not supported! Set `do_sample_frames=False`.©ro   )r)   r(   r&   ÚzipÚframes_indicesÚappendÚ
isinstancerD   Úfetch_imagesrf   Úfetch_videos)
rK   rT   rm   rn   ro   Úsampled_videosÚsampled_metadatarW   rb   rk   s
             rP   Ú_decode_and_sample_videosz,BaseVideoProcessor._decode_and_sample_videos$  sh  € õ % VÑ,Ô,ˆÝ.¨vÀnÐUÑUÔUˆõ ˜& œ)Ñ$Ô$ð 	hÐ)9ð 	hØˆNØ!ÐÝ#& v¨~Ñ#>Ô#>ð 2ð 2‘��xØ+Ð+°XÐ>Ñ>Ô>�Ø*1�Ô'Ø×%Ò% e¨G¤nÑ5Ô5Ð5Ø ×'Ò'¨Ñ1Ô1Ð1Ð1Ø#ˆFØ-ˆNˆNÝ  q¤	Ñ*Ô*ð 	hÝ˜& œ)¥TÑ*Ô*ð hðð à"&×"3Ò"3°FÑ";Ô";ðñ ô �ð $ð Ý$Øoñô ð ðð
 *.×):Ò):¸6ÐUfÐ):Ñ)gÔ)gÑ&�˜à�~Ð%Ð%rV   Úinput_data_formatÚdevicec                 ó"  — g }|D ]‰}t          |t          j        ¦  «        rAt          |t          j        |¦  «        }t          j        |¦  «                             ¦   «         }|�| 	                    |¦  «        }| 
                    |¦  «         ŒŠ|S )z:
        Prepare the input videos for processing.
        )r€   ÚnpÚndarrayr+   r   ÚFIRSTri   Ú
from_numpyÚ
contiguousÚtor   )rK   rT   r†   r‡   Úprocessed_videosrW   s         rP   Ú_prepare_input_videosz(BaseVideoProcessor._prepare_input_videosL  s“   € ð ÐØð 
	+ð 
	+ˆEå˜%¥¤Ñ,Ô,ð =Ý3°EÕ;KÔ;QÐSdÑeÔe�åÔ(¨Ñ/Ô/×:Ò:Ñ<Ô<�àÐ!ØŸš Ñ(Ô(�à×#Ò# EÑ*Ô*Ð*Ð*ØÐrV   c           	      óþ  — t          |                     ¦   «         t          | j        j                             ¦   «         ¦  «        dgz   ¬¦  «         | j        j        D ]'}|                     |t          | |d ¦  «        ¦  «         Œ(|                     d¦  «        }|                     d¦  «        }|                     d¦  «        }|                     d¦  «        }|rt          | j	        fi |¤Žnd }|  
                    ||||¬¦  «        \  }}|                      |||¬¦  «        } | j        di |¤Ž} | j        di |¤Ž |                     d	¦  «         |                     d
¦  «        }	 | j        dd|i|¤Ž}
|	r||
d<   |
S )NÚreturn_tensors)Úcaptured_kwargsÚvalid_processor_keysr†   rn   r‡   rm   )rm   rn   ro   )rT   r†   r‡   Údata_formatÚreturn_metadatarT   rs   )r   rG   rD   rE   rF   Ú
setdefaultrJ   r=   r   rl   r…   r�   Ú_further_process_kwargsÚ_validate_preprocess_kwargsÚ_preprocess)rK   rT   r3   Ú
kwarg_namer†   rn   r‡   rm   ro   r–   Úpreprocessed_videoss              rP   rS   zBaseVideoProcessor.preprocessc  sÑ  € õ 	Ø"ŸKšK™MœMÝ!% dÔ&7Ô&G×&LÒ&LÑ&NÔ&NÑ!OÔ!OÐScÐRdÑ!dð	
ñ 	
ô 	
ð 	
ð Ô+Ô;ð 	Kð 	KˆJØ×Ò˜j­'°$¸
ÀDÑ*IÔ*IÑJÔJÐJÐJà"ŸJšJÐ':Ñ;Ô;ÐØ!Ÿ:š:Ð&8Ñ9Ô9ÐØ—’˜HÑ%Ô%ˆØŸšÐ$4Ñ5Ô5ˆàEUÐ_�G DÔ$6ÐAÐA¸&ÐAÐAÐAÐ[_ÐØ!%×!?Ò!?ØØ)Ø-Ø/ð	 "@ñ "
ô "
Ñˆ�ð ×+Ò+°6ÐM^ÐgmÐ+ÑnÔnˆà-�Ô-Ð7Ð7°Ð7Ð7ˆØ(ˆÔ(Ð2Ð2¨6Ð2Ð2Ð2ð 	�
Š
�=Ñ!Ô!Ð!Ø Ÿ*š*Ð%6Ñ7Ô7ˆà.˜dÔ.ÐGÐG°fÐGÀÐGÐGÐØð 	CØ4BÐÐ 0Ñ1Ø"Ð"rV   Údo_convert_rgbÚ	do_resizer7   Úsize_divisorÚinterpolationzF.InterpolationModeÚdo_center_cropr9   Ú
do_rescaleÚdo_padÚrescale_factorÚdo_normalizeÚ
image_meanÚ	image_stdr’   c           	      ó0  — t          |¦  «        \  }}i }|                     ¦   «         D ]<\  }}|r|                      |¦  «        }|r|                      ||||¬¦  «        }|||<   Œ=t	          ||¦  «        }t          |¦  «        \  }}i }|                     ¦   «         D ]<\  }}|r|                      ||¦  «        }|                      ||	||||¦  «        }|||<   Œ=t	          ||¦  «        }|rt          j        |d¬¦  «        n|}t          d|i|¬¦  «        S )N)r7   rŸ   r    r   rx   r2   )ÚdataÚtensor_type)
r%   r?   ra   Úresizer*   Úcenter_cropÚrescale_and_normalizeri   rz   r   )rK   rT   r�   rž   r7   rŸ   r    r¡   r9   r¢   r£   r¤   r¥   r¦   r§   r’   r3   Úgrouped_videosÚgrouped_videos_indexÚresized_videos_groupedr^   Ústacked_videosÚresized_videosÚprocessed_videos_groupedr�   s                            rP   rš   zBaseVideoProcessor._preprocessŽ  s€  € õ( 0EÀVÑ/LÔ/LÑ,ˆÐ,Ø!#ÐØ%3×%9Ò%9Ñ%;Ô%;ð 	;ð 	;Ñ!ˆE�>Øð EØ!%×!4Ò!4°^Ñ!DÔ!D�Øð Ø!%§¢Ø"¨¸LÐXeð "-ñ "ô "�ð -;Ð" 5Ñ)Ð)Ý'Ð(>Ð@TÑUÔUˆõ 0EÀ^Ñ/TÔ/TÑ,ˆÐ,Ø#%Ð Ø%3×%9Ò%9Ñ%;Ô%;ð 	=ð 	=Ñ!ˆE�>Øð MØ!%×!1Ò!1°.À)Ñ!LÔ!L�à!×7Ò7Ø 
¨N¸LÈ*ÐV_ñô ˆNð /=Ð$ UÑ+Ð+å)Ð*BÐDXÑYÔYÐØCQÐg�5œ;Ð'7¸QÐ?Ñ?Ô?Ð?ÐWgÐåÐ"7Ð9IÐ!JÐXfÐgÑgÔgÐgrV   ÚmainÚpretrained_model_name_or_pathÚ	cache_dirÚforce_downloadÚlocal_files_onlyÚtokenÚrevisionc                 ó   — ||d<   ||d<   ||d<   ||d<   |                      dd¦  «        }|�-t          j        dt          ¦  «         |�t	          d¦  «        ‚|}|�||d	<    | j        |fi |¤Ž\  }	} | j        |	fi |¤ŽS )
a  
        Instantiate a type of [`~video_processing_utils.VideoProcessorBase`] from an video processor.

        Args:
            pretrained_model_name_or_path (`str` or `os.PathLike`):
                This can be either:

                - a string, the *model id* of a pretrained video hosted inside a model repo on
                  huggingface.co.
                - a path to a *directory* containing a video processor file saved using the
                  [`~video_processing_utils.VideoProcessorBase.save_pretrained`] method, e.g.,
                  `./my_model_directory/`.
                - a path or url to a saved video processor JSON *file*, e.g.,
                  `./my_model_directory/video_preprocessor_config.json`.
            cache_dir (`str` or `os.PathLike`, *optional*):
                Path to a directory in which a downloaded pretrained model video processor should be cached if the
                standard cache should not be used.
            force_download (`bool`, *optional*, defaults to `False`):
                Whether or not to force to (re-)download the video processor files and override the cached versions if
                they exist.
            resume_download:
                Deprecated and ignored. All downloads are now resumed by default when possible.
                Will be removed in v5 of Transformers.
            proxies (`dict[str, str]`, *optional*):
                A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128',
                'http://hostname': 'foo.bar:4012'}.` The proxies are used on each request.
            token (`str` or `bool`, *optional*):
                The token to use as HTTP bearer authorization for remote files. If `True`, or not specified, will use
                the token generated when running `hf auth login` (stored in `~/.huggingface`).
            revision (`str`, *optional*, defaults to `"main"`):
                The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
                git-based system for storing models and other artifacts on huggingface.co, so `revision` can be any
                identifier allowed by git.


                <Tip>

                To test a pull request you made on the Hub, you can pass `revision="refs/pr/<pr_number>"`.

                </Tip>

            return_unused_kwargs (`bool`, *optional*, defaults to `False`):
                If `False`, then this function returns just the final video processor object. If `True`, then this
                functions returns a `Tuple(video_processor, unused_kwargs)` where *unused_kwargs* is a dictionary
                consisting of the key/value pairs whose keys are not video processor attributes: i.e., the part of
                `kwargs` which has not been used to update `video_processor` and is otherwise ignored.
            subfolder (`str`, *optional*, defaults to `""`):
                In case the relevant files are located inside a subfolder of the model repo on huggingface.co, you can
                specify the folder name here.
            kwargs (`dict[str, Any]`, *optional*):
                The values in kwargs of any keys which are video processor attributes will be used to override the
                loaded values. Behavior concerning key/value pairs whose keys are *not* video processor attributes is
                controlled by the `return_unused_kwargs` keyword parameter.

        Returns:
            A video processor of type [`~video_processing_utils.ImagVideoProcessorBase`].

        Examples:

        ```python
        # We can't instantiate directly the base class *VideoProcessorBase* so let's show the examples on a
        # derived class: *LlavaOnevisionVideoProcessor*
        video_processor = LlavaOnevisionVideoProcessor.from_pretrained(
            "llava-hf/llava-onevision-qwen2-0.5b-ov-hf"
        )  # Download video_processing_config from huggingface.co and cache.
        video_processor = LlavaOnevisionVideoProcessor.from_pretrained(
            "./test/saved_model/"
        )  # E.g. video processor (or model) was saved using *save_pretrained('./test/saved_model/')*
        video_processor = LlavaOnevisionVideoProcessor.from_pretrained("./test/saved_model/video_preprocessor_config.json")
        video_processor = LlavaOnevisionVideoProcessor.from_pretrained(
            "llava-hf/llava-onevision-qwen2-0.5b-ov-hf", do_normalize=False, foo=False
        )
        assert video_processor.do_normalize is False
        video_processor, unused_kwargs = LlavaOnevisionVideoProcessor.from_pretrained(
            "llava-hf/llava-onevision-qwen2-0.5b-ov-hf", do_normalize=False, foo=False, return_unused_kwargs=True
        )
        assert video_processor.do_normalize is False
        assert unused_kwargs == {"foo": False}
        ```r¶   r·   r¸   rº   Úuse_auth_tokenNúrThe `use_auth_token` argument is deprecated and will be removed in v5 of Transformers. Please use `token` instead.úV`token` and `use_auth_token` are both specified. Please set only the argument `token`.r¹   )r=   ÚwarningsÚwarnÚFutureWarningrf   Úget_video_processor_dictÚ	from_dict)
Úclsrµ   r¶   r·   r¸   r¹   rº   r3   r¼   Úvideo_processor_dicts
             rP   Úfrom_pretrainedz"BaseVideoProcessor.from_pretrainedÀ  sÖ   € ðt (ˆˆ{ÑØ#1ˆÐÑ Ø%5ˆÐ!Ñ"Ø%ˆˆzÑàŸšÐ$4°dÑ;Ô;ˆØÐ%ÝŒMð EÝñô ð ð Ð Ý Ølñô ð ð #ˆEàÐØ#ˆF�7‰Oà'C sÔ'CÐDaÐ'lÐ'lÐekÐ'lÐ'lÑ$Ð˜fàˆsŒ}Ð1Ð<Ð<°VÐ<Ð<Ð<rV   Úsave_directoryÚpush_to_hubc           	      ó~  — |                      dd¦  «        }|�Ct          j        dt          ¦  «         |                     d¦  «        �t          d¦  «        ‚||d<   t          j                             |¦  «        rt          d|› d�¦  «        ‚t          j
        |d¬	¦  «         |rw|                      d
d¦  «        }|                      d|                     t          j        j        ¦  «        d         ¦  «        } | j        |fi |¤Ž}|                      |¦  «        }| j        �t!          | || ¬¦  «         t          j                             |t$          ¦  «        }|                      |¦  «         t(                               d|› �¦  «         |r-|                      |||||                     d¦  «        ¬¦  «         |gS )aq  
        Save an video processor object to the directory `save_directory`, so that it can be re-loaded using the
        [`~video_processing_utils.VideoProcessorBase.from_pretrained`] class method.

        Args:
            save_directory (`str` or `os.PathLike`):
                Directory where the video processor JSON file will be saved (will be created if it does not exist).
            push_to_hub (`bool`, *optional*, defaults to `False`):
                Whether or not to push your model to the Hugging Face model hub after saving it. You can specify the
                repository you want to push to with `repo_id` (will default to the name of `save_directory` in your
                namespace).
            kwargs (`dict[str, Any]`, *optional*):
                Additional key word arguments passed along to the [`~utils.PushToHubMixin.push_to_hub`] method.
        r¼   Nr½   r¹   r¾   zProvided path (z#) should be a directory, not a fileT)Úexist_okÚcommit_messageÚrepo_idéÿÿÿÿ)ÚconfigzVideo processor saved in )rË   r¹   )r=   r¿   rÀ   rÁ   rI   rf   ÚosÚpathÚisfileÚAssertionErrorÚmakedirsÚsplitÚsepÚ_create_repoÚ_get_files_timestampsÚ_auto_classr
   Újoinr   Úto_json_filerB   ÚinfoÚ_upload_modified_files)	rK   rÇ   rÈ   r3   r¼   rË   rÌ   Úfiles_timestampsÚoutput_video_processor_files	            rP   Úsave_pretrainedz"BaseVideoProcessor.save_pretrained2  sß  € ð  ŸšÐ$4°dÑ;Ô;ˆàÐ%ÝŒMð EÝñô ð ð �zŠz˜'Ñ"Ô"Ð.Ý Ølñô ð ð -ˆF�7‰OåŒ7�>Š>˜.Ñ)Ô)ð 	hÝ Ð!f°>Ð!fÐ!fÐ!fÑgÔgÐgå
Œ�N¨TÐ2Ñ2Ô2Ð2àð 	JØ#ŸZšZÐ(8¸$Ñ?Ô?ˆNØ—j’j ¨N×,@Ò,@ÅÄÄÑ,MÔ,MÈbÔ,QÑRÔRˆGØ'�dÔ'¨Ð:Ð:°6Ð:Ð:ˆGØ#×9Ò9¸.ÑIÔIÐð ÔÐ'Ý˜t ^¸DÐAÑAÔAÐAõ ')¤g§l¢l°>ÕCWÑ&XÔ&XÐ#à×ÒÐ5Ñ6Ô6Ð6Ý�ŠÐMÐ0KÐMÐMÑNÔNÐNàð 	Ø×'Ò'ØØØ Ø-Ø—j’j Ñ)Ô)ð (ñ ô ð ð ,Ð,Ð,rV   c                 ó*  — |                      dd¦  «        }|                      dd¦  «        }|                      dd¦  «        }|                      dd¦  «        }|                      dd¦  «        }|                      dd¦  «        }|                      d	d¦  «        }	|                      d
d¦  «        }
|                      dd¦  «        }|                      dd¦  «        }|                      dd¦  «        }|�-t          j        dt          ¦  «         |�t	          d¦  «        ‚|}d|dœ}|�||d<   t          ¦   «         r|	st                               d¦  «         d}	t          |¦  «        }t          j
                             |¦  «        }t          j
                             |¦  «        r|}d}n•t          |¦  «        r|}t          |¦  «        }ntt          }	 t!          |t          t"          t$          g|||||	|||
|d¬¦  «        }|d         }n6# t&          $ r ‚ t(          $ r t+          d|› d|› dt          › d�¦  «        ‚w xY w	 t-          |dd¬¦  «        5 }|                     ¦   «         }ddd¦  «         n# 1 swxY w Y   t1          j        |¦  «        }|                     d|¦  «        }n&# t0          j        $ r t+          d |› d!�¦  «        ‚w xY w|rt                               d"|› �¦  «         n t                               d"|› d#|› �¦  «         ||fS )$a  
        From a `pretrained_model_name_or_path`, resolve to a dictionary of parameters, to be used for instantiating a
        video processor of type [`~video_processing_utils.VideoProcessorBase`] using `from_dict`.

        Parameters:
            pretrained_model_name_or_path (`str` or `os.PathLike`):
                The identifier of the pre-trained checkpoint from which we want the dictionary of parameters.
            subfolder (`str`, *optional*, defaults to `""`):
                In case the relevant files are located inside a subfolder of the model repo on huggingface.co, you can
                specify the folder name here.

        Returns:
            `tuple[Dict, Dict]`: The dictionary(ies) that will be used to instantiate the video processor object.
        r¶   Nr·   FÚresume_downloadÚproxiesr¹   r¼   r¸   rº   Ú	subfolderÚ Ú_from_pipelineÚ
_from_autor½   r¾   úvideo processor)Ú	file_typeÚfrom_auto_classÚusing_pipelinez+Offline mode: forcing local_files_only=TrueT)Ú	filenamesr¶   r·   râ   rá   r¸   r¹   Ú
user_agentrº   rã   Ú%_raise_exceptions_for_missing_entriesr   z Can't load video processor for 'zœ'. If you were trying to load it from 'https://huggingface.co/models', make sure you don't have a local directory with the same name. Otherwise, make sure 'z2' is the correct path to a directory containing a z fileÚrúutf-8©ÚencodingÚvideo_processorz"It looks like the config file at 'z' is not a valid JSON file.zloading configuration file z from cache at )r=   r¿   rÀ   rÁ   rf   r   rB   rÛ   ÚstrrÏ   rÐ   ÚisdirrÑ   r   r   r   r!   r   r   ÚEnvironmentErrorÚ	ExceptionÚOSErrorÚopenÚreadÚjsonÚloadsrI   ÚJSONDecodeError)rÄ   rµ   r3   r¶   r·   rá   râ   r¹   r¼   r¸   rº   rã   Úfrom_pipelineré   rì   Úis_localÚresolved_video_processor_fileÚvideo_processor_fileÚresolved_video_processor_filesÚreaderÚtextrÅ   s                         rP   rÂ   z+BaseVideoProcessor.get_video_processor_dicto  s  € ð$ —J’J˜{¨DÑ1Ô1ˆ	ØŸšÐ$4°eÑ<Ô<ˆØ Ÿ*š*Ð%6¸Ñ=Ô=ˆØ—*’*˜Y¨Ñ-Ô-ˆØ—
’
˜7 DÑ)Ô)ˆØŸšÐ$4°dÑ;Ô;ˆØ!Ÿ:š:Ð&8¸%Ñ@Ô@ÐØ—:’:˜j¨$Ñ/Ô/ˆØ—J’J˜{¨BÑ/Ô/ˆ	àŸ
š
Ð#3°TÑ:Ô:ˆØ Ÿ*š* \°5Ñ9Ô9ˆàÐ%ÝŒMð EÝñô ð ð Ð Ý Ølñô ð ð #ˆEà#4ÈÐYÐYˆ
ØÐ$Ø+8ˆJÐ'Ñ(åÑÔð 	$Ð%5ð 	$Ý�KŠKÐEÑFÔFÐFØ#Ðå(+Ð,IÑ(JÔ(JÐ%Ý”7—=’=Ð!>Ñ?Ô?ˆÝŒ7�>Š>Ð7Ñ8Ô8ð %	Ø,IÐ)ØˆHˆHÝÐ8Ñ9Ô9ð "	Ø#@Ð Ý,8Ð9VÑ,WÔ,WÐ)Ð)å#7Ð ðõ 2>Ø1Ý3Õ5IÍ>ÐZØ'Ø#1Ø#Ø$3Ø%5ØØ)Ø%Ø'Ø:?ð2ñ 2ô 2Ð.ð 1OÈqÔ0QÐ-Ð-øÝ#ð ð ð ð Ýð ð ð åðKÐ7Tð Kð Kà9VðKð Kõ 0DðKð Kð Kñô ð ðøøøð
	åÐ3°SÀ7ÐKÑKÔKð %ÈvØ—{’{‘}”}�ð%ð %ð %ñ %ô %ð %ð %ð %ð %ð %ð %øøøð %ð %ð %ð %å#'¤:¨dÑ#3Ô#3Ð Ø#7×#;Ò#;Ð<MÐOcÑ#dÔ#dÐ Ð øåÔ#ð 	ð 	ð 	ÝØoÐ5RÐoÐoÐoñô ð ð	øøøð
 ð 	Ý�KŠKÐUÐ6SÐUÐUÑVÔVÐVÐVå�KŠKØrÐ.BÐrÐrÐSpÐrÐrñô ð ð $ VÐ+Ð+s<   Ç5H È3H>ÉJ+ ÉI5É)J+ É5I9É9J+ É<I9É=-J+ Ê+#KrÅ   c                 ó
  — |                      ¦   «         }|                     dd¦  «        }d|v rd|v r|                     d¦  «        |d<   d|v rd|v r|                     d¦  «        |d<    | di |¤Ž}g }|                     ¦   «         D ];\  }}t          ||¦  «        r&t	          |||¦  «         |                     |¦  «         Œ<|D ]}|                     |d¦  «         Œt                               d|› �¦  «         |r||fS |S )aç  
        Instantiates a type of [`~video_processing_utils.VideoProcessorBase`] from a Python dictionary of parameters.

        Args:
            video_processor_dict (`dict[str, Any]`):
                Dictionary that will be used to instantiate the video processor object. Such a dictionary can be
                retrieved from a pretrained checkpoint by leveraging the
                [`~video_processing_utils.VideoProcessorBase.to_dict`] method.
            kwargs (`dict[str, Any]`):
                Additional parameters from which to initialize the video processor object.

        Returns:
            [`~video_processing_utils.VideoProcessorBase`]: The video processor object instantiated from those
            parameters.
        Úreturn_unused_kwargsFr7   r9   NzVideo processor rs   )Úcopyr=   r?   Úhasattrr@   r   rB   rÛ   )rÄ   rÅ   r3   r  rò   Ú	to_removerL   rM   s           rP   rÃ   zBaseVideoProcessor.from_dictÞ  sR  € ð"  4×8Ò8Ñ:Ô:ÐØ%ŸzšzÐ*@À%ÑHÔHÐð
 �VÐÐ Ð*>Ð >Ð >Ø+1¯:ª:°fÑ+=Ô+=Ð  Ñ(Ø˜&Ð Ð  [Ð4HÐ%HÐ%HØ06·
²
¸;Ñ0GÔ0GÐ  Ñ-à˜#Ð5Ð5Ð 4Ð5Ð5ˆð ˆ	Ø Ÿ,š,™.œ.ð 	&ð 	&‰JˆC�Ý�¨Ñ,Ô,ð &Ý˜¨¨eÑ4Ô4Ð4Ø× Ò  Ñ%Ô%Ð%øØð 	"ð 	"ˆCØ�JŠJ�s˜DÑ!Ô!Ð!Ð!å�ŠÐ8 Ð8Ð8Ñ9Ô9Ð9Øð 	#Ø" FÐ*Ð*à"Ð"rV   c                 ó¤   — t          | j        ¦  «        }|                     dd¦  «         |                     dd¦  «         | j        j        |d<   |S )z¿
        Serializes this instance to a Python dictionary.

        Returns:
            `dict[str, Any]`: Dictionary of all the attributes that make up this video processor instance.
        rH   NÚ_valid_kwargs_namesÚvideo_processor_type)r   Ú__dict__r=   rO   Ú__name__)rK   Úoutputs     rP   Úto_dictzBaseVideoProcessor.to_dict  sR   € õ ˜$œ-Ñ(Ô(ˆØ�
Š
Ð0°$Ñ7Ô7Ð7Ø�
Š
Ð(¨$Ñ/Ô/Ð/Ø)-¬Ô)@ˆÐ%Ñ&àˆrV   c                 ó.  — |                       ¦   «         }|                     ¦   «         D ]6\  }}t          |t          j        ¦  «        r|                     ¦   «         ||<   Œ7|                     dd¦  «        }|�||d<   t          j        |dd¬¦  «        dz   S )zÃ
        Serializes this instance to a JSON string.

        Returns:
            `str`: String containing all the attributes that make up this feature_extractor instance in JSON format.
        r>   Nr6   é   T)ÚindentÚ	sort_keysú
)	r  r?   r€   r‰   rŠ   Útolistr=   rú   Údumps)rK   Ú
dictionaryrL   rM   r>   s        rP   Úto_json_stringz!BaseVideoProcessor.to_json_string  sš   € ð —\’\‘^”^ˆ
à$×*Ò*Ñ,Ô,ð 	1ð 	1‰JˆC�Ý˜%¥¤Ñ,Ô,ð 1Ø"'§,¢,¡.¤.�
˜3‘øð &Ÿ>š>Ð*<¸dÑCÔCÐØÐ'Ø,<ˆJÐ(Ñ)åŒz˜*¨Q¸$Ð?Ñ?Ô?À$ÑFÐFrV   Újson_file_pathc                 óª   — t          |dd¬¦  «        5 }|                     |                      ¦   «         ¦  «         ddd¦  «         dS # 1 swxY w Y   dS )zá
        Save this instance to a JSON file.

        Args:
            json_file_path (`str` or `os.PathLike`):
                Path to the JSON file in which this image_processor instance's parameters will be saved.
        Úwrï   rð   N)rø   Úwriter  )rK   r  Úwriters      rP   rÚ   zBaseVideoProcessor.to_json_file.  s˜   € õ �. #°Ð8Ñ8Ô8ð 	0¸FØ�LŠL˜×,Ò,Ñ.Ô.Ñ/Ô/Ð/ð	0ð 	0ð 	0ñ 	0ô 	0ð 	0ð 	0ð 	0ð 	0ð 	0ð 	0ð 	0øøøð 	0ð 	0ð 	0ð 	0ð 	0ð 	0s   “(AÁAÁAc                 óH   — | j         j        › d|                      ¦   «         › �S )Nú )rO   r  r  )rK   s    rP   Ú__repr__zBaseVideoProcessor.__repr__9  s'   € Ø”.Ô)ÐCÐC¨D×,?Ò,?Ñ,AÔ,AÐCÐCÐCrV   Ú	json_filec                 ó¶   — t          |dd¬¦  «        5 }|                     ¦   «         }ddd¦  «         n# 1 swxY w Y   t          j        |¦  «        } | di |¤ŽS )aÌ  
        Instantiates a video processor of type [`~video_processing_utils.VideoProcessorBase`] from the path to a JSON
        file of parameters.

        Args:
            json_file (`str` or `os.PathLike`):
                Path to the JSON file containing the parameters.

        Returns:
            A video processor of type [`~video_processing_utils.VideoProcessorBase`]: The video_processor object
            instantiated from that JSON file.
        rî   rï   rð   Nrs   )rø   rù   rú   rû   )rÄ   r!  r  r  rÅ   s        rP   Úfrom_json_filez!BaseVideoProcessor.from_json_file<  sŸ   € õ �)˜S¨7Ð3Ñ3Ô3ð 	!°vØ—;’;‘=”=ˆDð	!ð 	!ð 	!ñ 	!ô 	!ð 	!ð 	!ð 	!ð 	!ð 	!ð 	!øøøð 	!ð 	!ð 	!ð 	!å#œz¨$Ñ/Ô/ÐØˆsÐ*Ð*Ð)Ð*Ð*Ð*s   “4´8»8ÚAutoVideoProcessorc                 ó¢   — t          |t          ¦  «        s|j        }ddlmc m} t          ||¦  «        st          |› d�¦  «        ‚|| _        dS )a	  
        Register this class with a given auto class. This should only be used for custom video processors as the ones
        in the library are already mapped with `AutoVideoProcessor `.

        <Tip warning={true}>

        This API is experimental and may have some slight breaking changes in the next releases.

        </Tip>

        Args:
            auto_class (`str` or `type`, *optional*, defaults to `"AutoVideoProcessor "`):
                The auto class to register this new video processor with.
        r   Nz is not a valid auto class.)	r€   ró   r  Útransformers.models.autoÚmodelsÚautor  rf   rØ   )rÄ   Ú
auto_classÚauto_modules      rP   Úregister_for_auto_classz*BaseVideoProcessor.register_for_auto_classO  sn   € õ  ˜*¥cÑ*Ô*ð 	-Ø#Ô,ˆJà6Ð6Ð6Ð6Ð6Ð6Ð6Ð6Ð6å�{ JÑ/Ô/ð 	IÝ 
ÐGÐGÐGÑHÔHÐHà$ˆŒˆˆrV   Úvideo_url_or_urlsc                 óæ   ‡ ‡— d}t          ¦   «         st          j        d¦  «         d}t          |t          ¦  «        r#t	          t          ˆˆ fd„|D ¦   «         Ž ¦  «        S t          ||‰¬¦  «        S )zè
        Convert a single or a list of urls into the corresponding `np.array` objects.

        If a single url is passed, the return value will be a single object. If a list is passed a list of objects is
        returned.
        Ú
torchcodeczÇ`torchcodec` is not installed and cannot be used to decode the video by default. Falling back to `torchvision`. Note that `torchvision` decoding is deprecated and will be removed in future versions. r.   c                 ó>   •— g | ]}‰                      |‰¬ ¦  «        ‘ŒS )r|   )r‚   )ru   Úxro   rK   s     €€rP   rw   z3BaseVideoProcessor.fetch_videos.<locals>.<listcomp>y  s.   ø€ ÐsÐsÐsÐ\]˜d×/Ò/°ÐEVÐ/ÑWÔWÐsÐsÐsrV   )Úbackendro   )r   r¿   rÀ   r€   rD   r}   r'   )rK   r,  ro   r1  s   ` ` rP   r‚   zBaseVideoProcessor.fetch_videosi  s‘   øø€ ð ˆÝ&Ñ(Ô(ð 	$ÝŒMðIñô ð ð $ˆGåÐ'­Ñ.Ô.ð 	gÝ�ÐsÐsÐsÐsÐsÐarÐsÑsÔsÐtÑuÔuÐuåÐ/¸ÐTeÐfÑfÔfÐfrV   )NNrR   )NFFNr´   )F)r$  )Er  Ú
__module__Ú__qualname__rØ   Úresampler¦   r§   r7   rŸ   r8   r9   rž   r¡   r£   r¢   r¤   r¥   r�   rn   rd   rc   rm   r–   r   rE   Úmodel_input_namesr   r<   r   rU   r#   ra   r$   r   rh   r   Úfloatrl   ÚdictÚboolr   rD   r…   ró   r   r�   r   ÚBASE_VIDEO_PROCESSOR_DOCSTRINGrS   r   r   rš   ÚclassmethodrÏ   ÚPathLikerÆ   rß   Útupler   rÂ   rÃ   r  r  rÚ   r   r#  r+  r‚   Ú__classcell__)rO   s   @rP   r1   r1   –   s  ø€ € € € € ð €Kà€HØ€JØ€IØ€DØ€LØÐØ€IØ€IØ€NØ€FØ€JØ€NØ€LØ€NØÐØ
€CØ€JØ€NØ€OØ€LØ.Ð/ÐðG ¨Ô!5ð G¸$ð Gð Gð Gð Gð Gð Gð>1¨Lð 1ð 1ð 1ð 1ðàðð 
ðð ð ð ð8 %)Ø+/ð	3ð 3àð3ð ˜S”Mð3ð �e˜C ˜JÔ'Ô(ð	3ð 3ð 3ð 3ðr ,0Ø04ð&&ð &&àð&&ð ˜m¨TÐ1Ô2ð&&ð # 4œ.ð	&&ð
 $ HÔ-ð&&ð 
ˆnÔ	ð&&ð &&ð &&ð &&ðV EIØ $ð	 ð  àð ð $ E¨#Ð/?Ð*?Ô$@ÔAð ð ˜”ð	 ð
 
ˆnÔ	ð ð  ð  ð  ð. ÐØ&ñô ð&#àð&#ð ˜Ô&ð&#ð 
ð	&#ð &#ð &#ñô ð&#ðp <@ð!0hð 0hà�^Ô$ð0hð ð0hð ð	0hð
 ð0hð ˜s”mð0hð  Ð 5Ô6ð0hð ð0hð ð0hð ð0hð ð0hð ð0hð ð0hð ˜U 5¨$¨u¬+Ð#5Ô6Ô7ð0hð ˜E %¨¨e¬Ð"4Ô5Ô6ð0hð  !  s¨J Ô!7Ô8ð!0hð$ 
ð%0hð 0hð 0hð 0hðd ð 8<Ø$Ø!&Ø,0Øðo=ð o=à',¨S°"´+Ð-=Ô'>ðo=ð ˜E # r¤{Ð"2Ô3Ô4ðo=ð ð	o=ð
 ðo=ð ˜˜c 4˜iÔ(Ô)ðo=ð ðo=ð o=ð o=ñ „[ðo=ðb;-ð ;-¨e°C¸¼Ð4DÔ.Eð ;-ÐTXð ;-ð ;-ð ;-ð ;-ðz ðl,Ø,1°#°r´{Ð2BÔ,Cðl,à	ˆt�C˜�HŒ~˜t C¨ Hœ~Ð-Ô	.ðl,ð l,ð l,ñ „[ðl,ð\ ð*#¨T°#°s°(¬^ð *#ð *#ð *#ñ „[ð*#ðX˜˜c 3˜hœð ð ð ð ðG ð Gð Gð Gð Gð*	0¨5°°b´kÐ1AÔ+Bð 	0ð 	0ð 	0ð 	0ðDð Dð Dð ð+ u¨S°"´+Ð-=Ô'>ð +ð +ð +ñ „[ð+ð$ ð%ð %ð %ñ „[ð%ð2gð g¨e°C¸¸c¼ÀDÈÈcÌÄOÐ4SÔ.Tð gð gð gð gð gð gð gð grV   r1   rç   r$  zvideo processor file)ÚobjectÚobject_classÚobject_files)Frú   rÏ   r¿   r  r   Ú	functoolsr   Útypingr   r   r   r   Únumpyr‰   Údynamic_module_utilsr
   Úimage_processing_utilsr   r   Úimage_processing_utils_fastr   Úimage_utilsr   r   r   Úprocessing_utilsr   r   Úutilsr   r   r   r   r   r   r   r   r   r   r   r   r   r    Ú	utils.hubr!   Úutils.import_utilsr"   Úvideo_utilsr#   r$   r%   r&   r'   r(   r)   r*   r+   ri   Útorchvision.transforms.v2r,   r\   Útorchvision.transformsÚ
get_loggerr  rB   r9  r1   rÈ   Ú__doc__Úformatrs   rV   rP   ú<module>rR     s£  ðð  €€€Ø 	€	€	€	Ø €€€Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø 1Ð 1Ð 1Ð 1Ð 1Ð 1Ð 1Ð 1Ð 1Ð 1Ð 1Ð 1à Ð Ð Ð à 4Ð 4Ð 4Ð 4Ð 4Ð 4ðð ð ð ð ð ð ð ð @Ð ?Ð ?Ð ?Ð ?Ð ?ðð ð ð ð ð ð ð ð ð ð
 3Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2ðð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð  $Ð #Ð #Ð #Ð #Ð #Ø (Ð (Ð (Ð (Ð (Ð (ð
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð ÐÑÔð Ø€L€L€LàÐÑÔð ;Ø"Ð"Ñ$Ô$ð ;Ø=Ð=Ð=Ð=Ð=Ð=Ð=à:Ð:Ð:Ð:Ð:Ð:à	ˆÔ	˜HÑ	%Ô	%€ðC"Ð ðL ÐØ'Ø"ñô ð 
€Ð,Ð-Ñ-Ô-ð`gð `gð `gð `gð `gÐ/ñ `gô `gñ .Ô-ñ	ô ð
`gðF "+ Ð+=Ô+IÑ!JÔ!JÐ Ô ØÔ!Ô)Ð5Ø-?Ô-KÔ-S×-ZÒ-ZØ Ð/CÐRhð .[ñ .ô .ÐÔ"Ô*Ð*Ð*ð 6Ð5rV   