
    =pj                         S SK JrJrJrJrJr  S SKrSSKJ	r	  SSK
JrJr  SSKJr  SSKJr  S	S
KJr  \R&                  \	" S5       " S S\5      5       5       rg)    )AnyDictListOptionalUnionN   )pipeline_requires_extra   )	HPIConfigPaddlePredictorOption)TopkVideoResult)	benchmark   )BasePipelinevideoc                   
  ^  \ rS rSrSrSrSSSSSSS.S\S\\   S	\\   S
\\\\	4      S\\
   S\S\\\\\	4   \4      SS4U 4S jjjr SS\\\\   \R"                  \\R"                     4   S\\S4   S\4S jjrSrU =r$ )VideoClassificationPipeline   zVideo Classification Pipelinevideo_classificationNFdeviceengineengine_config	pp_optionuse_hpip
hpi_configconfigr   r   r   r   r   r   returnc          
      p   > [         T
U ]  " SUUUUUUS.UD6  US   S   n	U R                  U	5      U l        g)a  Initializes the video classification pipeline.

Args:
    config (Dict): Configuration dictionary containing model and other parameters.
    device (Optional[str], optional): The device to use for prediction. Defaults to `None`.
    engine (Optional[str], optional): Inference engine. Defaults to `None`.
    engine_config (Optional[Dict[str, Any]], optional): Engine-specific config. Defaults to `None`.
    pp_option (Optional[PaddlePredictorOption], optional): Paddle predictor options.
        Defaults to `None`.
    use_hpip (bool, optional): Whether to use HPIP. Defaults to `False`.
    hpi_config (Optional[Union[Dict[str, Any], HPIConfig]], optional):
        HPIP configuration. Defaults to `None`.
r   
SubModulesVideoClassificationN )super__init__create_modelvideo_classification_model)selfr   r   r   r   r   r   r   kwargs!video_classification_model_config	__class__s             u/var/www/html/pdf-tiff/venv/lib/python3.13/site-packages/paddlex/inference/pipelines/video_classification/pipeline.pyr$   $VideoClassificationPipeline.__init__!   s\    2 	 	
'!	
 	
 -3<,@AV,W)*.*;*;-+
'    inputtopkc              +   >   #    U R                  XS9 Sh  vN   g N7f)a  Predicts video classification results for the given input.

Args:
    input (Union[str, list[str], np.ndarray, list[np.ndarray]]): The input image(s) or path(s) to the images.
    topk: Union[int, None]: The number of top predictions to return. Defaults to 1.
    **kwargs: Additional keyword arguments that can be passed to the function.

Returns:
    TopkVideoResult: The predicted top k results.
)r/   Nr&   )r'   r.   r/   r(   s       r+   predict#VideoClassificationPipeline.predictI   s     " 2252DDDs   r1   )   )__name__
__module____qualname____firstlineno____doc__entitiesr   r   strr   r   boolr   r   r$   r   npndarrayintr   r2   __static_attributes____classcell__)r*   s   @r+   r   r      s    (%H !% $2659AE&
&
 	&

 &
  S#X/&
 12&
 &
 U4S>9#<=>&
 
&
 &
V "#ES$s)RZZbjj1AABE CIE
 
E Er-   r   )typingr   r   r   r   r   numpyr=   
utils.depsr	   modelsr   r   "models.video_classification.resultr   utils.benchmarkr   baser   time_methodsr   r"   r-   r+   <module>rJ      sP    4 3  2 6 A (  !>E, >E " >Er-   