
    jh                        d dl mZ d dlmZmZmZmZmZmZ d dl	m
Z
mZ d Zi ddeddd	ed
ddedddedddedddedddedddedddedddeddg
dd eeeeeeef         f                            ddgdded dgd!ded"dgd#d$ed%dd&ed'dgd(d$ed)dd&ed*dgd+d$ eee                   d%dgd,d-ed.dded/dd	ed
dd0ed1dd2ed3ddedddedddedddedddedddeddgd4d-ed.dd5ed6dd7ed8dded/dd	ed
dd0ed1dd2ed3ddedddedddedddedddedddeddgd9ded/dd	ed
dd0ed1dd: eeeeeeef         f                            d;dd<ed=dd> eeeeeeef         eeef         f                            d?dd@ eeeeeeef         f                            dAddBedddCedDddEedddFedddGedddHeddgdIdeddd	ed
ddJedKddedddLedMddNedOddPedQdd: eeeeeeef         f                            d;dd<ed=dd> eeeeeeef         eeef         f                            d?dd@ eeeeeeef         f                            dAddBedddCedDddEedddFedddGedddHedddedddedddedddedddedddeddgdRdeddd	ed
ddJedKddedddLedMddNedOddPedQdd: eeeeeeef         f                            d;dd<ed=dd> eeeeeeef         eeef         f                            d?dd@ eeeeeeef         f                            dAddBedddCedDddEedddFedddGedddHedddedddedddedddedddedddeddd-ed.dd5ed6dd7ed8dgdSdeddd	ed
dd0edTddUedVdd: eeeeeeef         f                            d;dd<ed=dd> eeeeeeef         eeef         f                            d?dd@ eeeeeeef         f                            dAddWedXddY eee                   dZdd[ed\dd] eee                   d^dd_ eee                   d`dda eee                   dbddc eee                   dddde eee                   dfdgdgdhdidhdjdhdkd0edTddeddd	ed
dd: eeeeeeef         f                            dldd<edmdd> eeeeeeef         eeef         f                            dndd@ eeeeeeef         f                            dodgd eee                   dpdgdq eeeeeeef         edr         f                            dsdgd eeeeeeef         f                            dtdgdhdedudgdvedwddxedydgdedzdd	ed{dgd eeeeeeef         f                            d|dgd} eeeef                   d~ddeddgdeddd eeee                            ddgdhdhdhdZdhS )    )literal_eval)DictListLiteralOptionalTupleUnion)TypeAdapterValidationErrorc                 &     dt           d f fd}|S )z;Create validator for CLI input conversion and type checking	cli_inputreturnc                 H   	 t          |           }nC# t          t          t          t          t
          f$ r}d| d| }t          |          |d }~ww xY w	 t                                        |          S # t          $ r}d d| d}t          |          |d }~ww xY w)Nz&Malformed input:
            - Input: z
            - Error: z,Invalid input type:
            - Expected: z
            - Received: z
            )	r   
ValueErrorSyntaxError	TypeErrorMemoryErrorRecursionErrorr
   validate_pythonr   )r   parsedexcerrcli_expected_types       p/lsinfo/ai/hellotax_ai/data_center/backend/venv/lib/python3.11/site-packages/paddlex/utils/pipeline_arguments.py	validatorzcustom_type.<locals>.validator   s    	+!),,FFKKP 	+ 	+ 	+  C S//s*		+	+011AA&III 	+ 	+ 	+* "  C S//s*	+s,    #AAA!A9 9
B!BB!)str)r   r   s   ` r   custom_typer      s8    +S +%6 + + + + + +$     OCRz--use_doc_orientation_classifyz=Determines whether to use document orientation classification)nametypehelpz--use_doc_unwarpingz,Determines whether to use document unwarpingz--use_textline_orientationz4Determines whether to consider text line orientationz--text_det_limit_side_lenz.Sets the side length limit for text detection.z--text_det_limit_typez'Sets the limit type for text detection.z--text_det_threshz&Sets the threshold for text detection.z--text_det_box_threshz*Sets the box threshold for text detection.z--text_det_unclip_ratioz)Sets the unclip ratio for text detection.z--text_rec_score_threshz.Sets the score threshold for text recognition.z--return_word_boxz%Determines whether to return word boxobject_detectionz--thresholdz(Sets the threshold for object detection.image_classificationz--topkz.Sets the Top-K value for image classification.image_multilabel_classificationz7Sets the threshold for image multilabel classification. pedestrian_attribute_recognitionz--det_thresholdz'Sets the threshold for human detection.z--cls_thresholdz8Sets the threshold for pedestrian attribute recognition.vehicle_attribute_recognitionz)Sets the threshold for vehicle detection.z5Sets the threshold for vehicle attribute recognition.human_keypoint_detectiontable_recognitionz--use_table_cells_ocr_resultsz+Determines whether to use cells OCR resultsz0Determines whether to use document preprocessingz--use_layout_detectionz3Determines whether to use document layout detectionz--use_ocr_modelzDetermines whether to use OCRtable_recognition_v2z--use_e2e_wired_table_rec_modelzBDetermines whether to use end-to-end wired table recognition modelz"--use_e2e_wireless_table_rec_modelzEDetermines whether to use end-to-end wireless table recognition modelseal_recognitionz--layout_thresholdz4Determines confidence threshold for layout detectionz--layout_nmsz1Determines whether to use non maximum suppressionz--layout_unclip_ratioz2Determines unclip ratio for layout detection boxesz--layout_merge_bboxes_modezNDetermines merge mode for layout detection bboxes, 'union', 'large' or 'small'z--seal_det_limit_side_lenz--seal_det_limit_typez5Sets the limit type for text detection, 'min', 'max'.z--seal_det_threshz--seal_det_box_threshz--seal_det_unclip_ratioz--seal_rec_score_threshlayout_parsingz--use_general_ocrz%Determines whether to use general ocrz--use_seal_recognitionz*Determines whether to use seal recognitionz--use_table_recognitionz+Determines whether to use table recognitionz--use_formula_recognitionz-Determines whether to use formula recognitionzPP-StructureV3zPaddleOCR-VLz*Determines whether to use layout detectionz--use_chart_recognitionz4Determines whether to use document chart recognitionz--use_queuesz Determines whether to use queuesz--prompt_labelz5Sets the prompt label when not using layout detectionz--format_block_contentz*Determines whether to format block contentz--repetition_penalty z--temperaturez%Temperature parameter for VLLM model.z--top_pzTop-p parameter for VLLM model.z--min_pixelsz'Sets the minimum pixels for VLLM model.z--max_pixelsz*Sets the max_pixels pixels for VLLM model.ts_forecastNts_anomaly_detectionts_classificationformula_recognitionz/Sets the layout threshold for layout detection.z$Determines whether to use layout nmsz2Sets the layout unclip ratio for layout detection.z7Sets the layout merge bboxes mode for layout detection.z-Sets the threshold for instance segmentation.z--target_sizez>Sets the inference image resolution for semantic segmentation.z.Sets the threshold for small object detection.z.Sets the Top-K value for video classification.z--nms_threshz+Sets the NMS threshold for video detection.z--score_threshz2Sets the confidence threshold for video detection.z>Determines whether to use document orientation classification.z-Determines whether to use document unwarping.z0Sets the threshold for rotated object detection.z--thresholdsz2Sets the thresholds for open vocabulary detection.z--promptz.Sets the prompt for open vocabulary detection.z--prompt_typez6Sets the prompt type for open vocabulary segmentation.z1Sets the prompt for open vocabulary segmentation.)instance_segmentationsemantic_segmentationsmall_object_detectionanomaly_detectionvideo_classificationvideo_detectiondoc_preprocessorrotated_object_detectionopen_vocabulary_detectionopen_vocabulary_segmentation3d_bev_detectionmultilingual_speech_recognitiontext_to_speech)astr   typingr   r   r   r   r   r	   pydanticr
   r   r   boolintr   floatPIPELINE_ARGUMENTS r   r   <module>rH      s         > > > > > > > > > > > > > > > > 1 1 1 1 1 1 1 1  0|	4S	
 	
 *B	
 	
 1J	
 	
 0D	
 	
 ,=	
 	
 (<	
 	
 ,@	
 	
 .?	
 	
 .D	
 	
 (;	
 	
]3|j !Kud3:6F/F)G HII>	
 	
k|x D	
 	
y|F &!M	
 	
(G|T '%=	
 	
 &N	
 	
)U|l $%?	
 	
 &K	
 	
&m|D %K00=	
 	
!E|R 3A	
 	
 5F	
 	
 *B	
 	
 -I	
 	
 &3	
 	
 0D	
 	
 ,=	
 	
 (<	
 	
 ,@	
 	
 .?	
 	
 .D	
 	
g8S|D 3A	
 	
 6X	
 	
 9[	
 	
 5F	
 	
 *B	
 	
 -I	
 	
 &3	
 	
 0D	
 	
 ,=	
 	
 (<	
 	
 ,@	
 	
 .?	
 	
 .D	
 	
{BE|J 4F	
 	
 *B	
 	
 -I	
 	
 )Kud3:6F/F)G HIIJ	
 	
 #G	
 	
 ,KueE5L&94U
;KKLM  I	
 	
 1KsDcN/B)C DEEd	
 	
 0D	
 	
 ,K	
 	
 (<	
 	
 ,@	
 	
 .?	
 	
 .D	
 	
DK|T	 4S	
 	
 *B	
 	
 (;	
 	
 1J	
 	
 -@	
 	
 .A	
 	
 0C	
 	
 )Kud3:6F/F)G HIIJ	
 	
 #G	
 	
 ,KueE5L&94U
;KKLM  I	
 	
 1KsDcN/B)C DEEd	
 	
 0D	
 	
 ,K	
 	
 (<	
 	
 ,@	
 	
 .?	
 	
 .D	
 	
 0D	
 	
 ,=	
 	
 (<	
 	
 ,@	
 	
 .?	
 	
 .D	
 	
cvU	|B 4S	
 	
 *B	
 	
 (;	
 	
 1J	
 	
 -@	
 	
 .A	
 	
 0C	
 	
 )Kud3:6F/F)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