o
    )j=                     @   s	  d dl Zd dlmZ d dlmZ G dd deZG dd deZej	e
ejejfeje
eje
eejfeje
ejdfejeejfejeedfejeedfejeiZej	d	d
dejd	ddejd	ddejd	ddejddddidejddiejddiejddiiZdd Zi ejej	ejdejej	ej	ejejiejej	ejej	ej	ejejiejej	ej ej	ej!ej	ejejej"ej	ej#ejej$ejej%ej	ej&ej	ej'ej	ej(ej	ej)ej	ej*ej	i ej+ej	ej,ej	ej-ej	ej.ej	ej/ej	ej0ej	ej1ej	ej2ej	ej3ej	ej4ej	ej5ejej6ej	ej7ejej8ej	ej9ej	ej:ej	ej;ej	i ej<ej	ej=ej	ej>ej	ej?ej	ej@ej	ejAej	ejBej	ejCej	ejDej	ejEej	ejFej	ejdejGej	ejHej	ejIej	ejJej	ejKej	ejLej	i ejMej	ejNej	ejOej	ejPej	ejQej	ejdejRej	ej	dejSej	ej	ej	dejTej	ej	dejUej	ejdejVej	ej	dejWej	ejXejejYej	ej	ej	ej	ej	fgejZej	ej[ej	ej	dej\ej	ej]eji ej^ejej_ej	ej`ejejaej	ejbej	ejcejejfejdejejeejejfej	ejgejejhej	ej	ej	fej	ej	ej	d gejiej	ej	ejejiejjej	ejkejejlej	ejmej	ej	ej	ej	ej	ej	iejnej	ej	d!ejii ejoejejd"ejpejejejejd#ejqej	ej	d$ejiejrej	ej	d%ejiejsd&ejiejtejejejfejejd'gejuejejfejejd(gejvejejfejwejejxejejyejejzejej{ejd)ejigej|ejej}ejd)ejigej~ejejeji ejejejejejd*ejejejfejejd*gejejejejejejejd+ejejejejejd,ejejejd-ejejejejd.ejejejejejd/ejejejejd0ejd1ejiejejejejd2ejejejejejejejejd3gi ejejejejejd4ejejejejejejejejejejejejejejejejejejejejejejejgejej	d5ej	igejejd6ejigejd&ejiejej	ejdi ejd)ejiejej	ejd7ejej	ejdejej	ejd7ejejejd8ejej	ejdejejejd8ejej	ejejd9ejejejej	ejejejejejejejd:ejej	ejejejejd;ejd)ejiejejejd<ejiejej	ejd=ZdS )>    N)Image)Tasksc                   @   s   e Zd ZdZdZdZdS )	InputKeysimagetextvideoN)__name__
__module____qualname__IMAGETEXTVIDEO r   r   [/var/www/html/Deteccion_Ine/venv/lib/python3.10/site-packages/modelscope/pipeline_inputs.pyr   	   s    r   c                   @   s,   e Zd ZdZdZdZdZdZdZdZ	dZ
d	S )
	InputTyper   r   Zaudior   boxdictlistnumberN)r   r	   r
   r   r   AUDIOr   BOXDICTLISTNUMBERr   r   r   r   r      s    r   zcv2.VideoCapturestringz(Base64 encoded image file or url string.)typedescriptionz)Base64 encoded audio file or url string..z)Base64 encoded video file or url string..zThe input text.arrayzBox coordinate, should be int.r   r   )r   r   itemsobjectintegerc              	   C   s   t |  }| tjkr+t|jdks't||s)J d|  d| dt| d| d S d S t||sBJ d|  d| dt| d| d S )NZVideoCapturezinvalid input type for z, expected z	 but got z
 )
INPUT_TYPEr   r   r   r   
isinstance)Z
input_typeinputexpected_typer   r   r   check_input_typeI   s   
r%   )r   r   )imgZcategory_names)r   prompt)r&   mask)r&   r(   	reference)Z	sky_imageZscene_image)templateuser)contentstyle)Zmasked_modelZposeZclothZtarget_pose_path)
dataset_idcase_id)r.   r/   Zaction_datasetactionZtarget_viewsave_dirmessages)r   text2)Zsource_textZtarget_textr   )Zsource_sentenceZsentences_to_compare)historyZ	knowledgeZbot_profileZuser_profile)questionZhistory_sql)Z	query_setZsupport_set)Zhypsrcref)r   Zdatabase)querycontextlabelZdataset)r8   Zpositivenegative)Zwavr   )Znearend_micZfarend_speechr   r   )r&   r   )r   r   )r   r   r3   )Z	mesh_pathZtexture_pathr'   ZuvsizeZ
image_size
output_dir)Zvideo_input_pathZvideo_output_pathZ	mask_pathr'   )r&   Zprompts)numpynpZPILr   Zmodelscope.utils.constantr   r   r   r   r   strZndarrayr   r   bytesr   r   r   r   r   r   r   r   intr!   ZINPUT_TYPE_SCHEMAr%   Ztask_templateZimage_text_retrievalZgeneral_recognitionZvideo_depth_estimationZindoor_layout_estimationZimage_demoireingZpanorama_depth_estimationZanimal_recognitionZmotion_generationZvideo_panoptic_segmentationZocr_detectionZocr_recognitionZface_2d_keypointsZface_livenessZface_quality_assessmentZcard_detectionZlicense_plate_detectionZcard_detection_correctionZlineless_table_recognitionZtable_recognitionZface_detectionZfacial_expression_recognitionZface_attribute_recognitionZface_recognitionZface_reconstructionZhead_reconstructionZtext_to_headZhuman_detectionZface_image_generationZimage_classificationZimage_quality_assessment_mosZ$image_quality_assessment_degradationZimage_object_detectionZ domain_specific_object_detectionZhuman_wholebody_keypointZimage_segmentationZportrait_mattingZuniversal_mattingZproduct_segmentationZsemantic_segmentationZface_human_hand_detectionZhand_staticZimage_fewshot_detectionZopen_vocabulary_detectionZimage_driving_perceptionZvision_efficient_tuningZskin_retouchingZimage_super_resolutionZimage_colorizationZimage_color_enhancementZimage_denoisingZimage_body_reshapingZimage_portrait_enhancementZcrowd_countingZimage_super_resolution_pasdZimage_inpaintingZimage_paintbyexampleZimage_skychangeZcontrollable_image_generationZimage_face_fusionZimage_deblurringZvideo_colorizationZimage_to_image_generationZimage_to_image_translationZimage_style_transferZimage_portrait_stylizationZlive_categoryZaction_recognitionZbody_2d_keypointsZbody_3d_keypointsZhand_2d_keypointsZ pedestrian_attribute_recognitionZvideo_single_object_trackingZvideo_multi_object_trackingZvideo_categoryZproduct_retrieval_embeddingZvideo_embeddingZvirtual_try_onZtext_driven_segmentationZshop_segmentationZmovie_scene_segmentationZbad_image_detectingZimage_try_onZhuman_image_generationZhuman3d_renderZhuman3d_animationZimage_view_transformZimage_control_3d_portraitZchatZtext_classificationZsentence_similarityZnliZsentiment_classificationZzero_shot_classificationZrelation_extractiontranslationZtext_summarizationZcompetency_aware_translationZword_segmentationZpart_of_speechZnamed_entity_recognitionZtext_error_correctionZsentence_embeddingZtext_rankingZtext_generationZfid_dialogueZ	fill_maskZtable_question_answeringZfaq_question_answeringZtranslation_evaluationZsudokuZtext2sqlZ!document_grounded_dialog_generateZdocument_grounded_dialog_rerankZ"document_grounded_dialog_retrievalZmachine_reading_comprehensionZsiamese_uieZauto_speech_recognitionZspeech_signal_processZacoustic_echo_cancellationZspeech_separationZacoustic_noise_suppressionZtext_to_speechZkeyword_spottingZ&speaker_diarization_dialogue_detectionZlanguage_score_predictionpunctuationZspeech_language_recognitionZ3speaker_diarization_semantic_speaker_turn_detectionZinverse_text_processingZspeaker_verificationZimage_captioningZvideo_captioningZmultimodal_dialogueZvisual_groundingZtext_to_image_synthesisZmulti_modal_embeddingZ generative_multi_modal_embeddingZmulti_modal_similarityZtext_video_retrievalZvisual_question_answeringZvideo_question_answeringZvisual_entailmentZaction_detectionZhuman_reconstructionZtext_texture_generationZimage_reid_personZvideo_inpaintingZtext_to_video_synthesisZvideo_summarizationZtext_to_360panorama_imageZimage_editingZTASK_INPUTSr   r   r   r   <module>   s  $!#%'+-/13579;=?ACEGIKMOQSUWY[]_acegikmqswy{}                    !  #  '  +  -  1  3  5  7  9  ;  =  ?  @  B  D  F  H  P  T  V  X  Z  _  c  g  m  q  w   	
    
                        !    $    &    )    +    -    /    3
    :    <    B    D    H    L    Q    S    W    \    _    d    g    j    o    q    u    w    y    {    }                                  
                                          !      %      )      -      1      5      :      <      >      F      H      M      P      Q      T   
