
    9i۞                     t    S SK r SSKJrJrJrJr  SSKJrJr  SSK	J
r
  / SQr " S S	\5      r " S
 S\5      rg)    N   )add_simple_inference_argsget_subcommand_argsperform_simple_inferencestr2bool   )PaddleXPipelineWrapperPipelineCLISubcommandExecutor)create_config_from_structure)PP-OCRv3PP-OCRv4PP-OCRv5c                   p  ^  \ rS rSr                                                                 SU 4S jjr\S 5       rSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS.S jrSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS.S	 jrS
 r	\
S 5       rS rS rSrU =r$ )PPStructureV3   NcB           	      
  > WAb   WA[         ;  a  [        SWA S[          S35      e[        [        S UUUU45      5      (       aJ  W@c  WAbC  U R	                  W@WA5      u  nCnDUCb  WDc$  [        S[        W@5       S[        WA5       S35      eWCnWDnOW@c  WAb  [        R                  " SSS	9  [        5       R                  5       nEUUES
'   UUES'   UER                  S5        UER                  S5        UEU l        [        TFU ]4  " S0 WBD6  g )NzInvalid OCR version: z. Supported values are .c                 
    U S L $ N )ps    c/var/www/html/land-doc-ocr/venv/lib/python3.13/site-packages/paddleocr/_pipelines/pp_structurev3.py<lambda>(PPStructureV3.__init__.<locals>.<lambda>i   s    !t)    z)No models are available for the language z and OCR version z^`lang` and `ocr_version` will be ignored when model names or model directories are not `None`.r   )
stackleveltext_detection_model_nametext_recognition_model_nameselfkwargsr   )_SUPPORTED_OCR_VERSIONS
ValueErrorallmap_get_ocr_model_namesreprwarningswarnlocalscopypop_paramssuper__init__)Gr   layout_detection_model_namelayout_detection_model_dirlayout_threshold
layout_nmslayout_unclip_ratiolayout_merge_bboxes_modechart_recognition_model_namechart_recognition_model_dirchart_recognition_batch_sizeregion_detection_model_nameregion_detection_model_dir#doc_orientation_classify_model_name"doc_orientation_classify_model_dirdoc_unwarping_model_namedoc_unwarping_model_dirr   text_detection_model_dirtext_det_limit_side_lentext_det_limit_typetext_det_threshtext_det_box_threshtext_det_unclip_ratiotextline_orientation_model_nametextline_orientation_model_dirtextline_orientation_batch_sizer   text_recognition_model_dirtext_recognition_batch_sizetext_rec_score_threshtable_classification_model_nametable_classification_model_dir,wired_table_structure_recognition_model_name+wired_table_structure_recognition_model_dir/wireless_table_structure_recognition_model_name.wireless_table_structure_recognition_model_dir&wired_table_cells_detection_model_name%wired_table_cells_detection_model_dir)wireless_table_cells_detection_model_name(wireless_table_cells_detection_model_dir%table_orientation_classify_model_name$table_orientation_classify_model_dirseal_text_detection_model_nameseal_text_detection_model_dirseal_det_limit_side_lenseal_det_limit_typeseal_det_threshseal_det_box_threshseal_det_unclip_ratio seal_text_recognition_model_nameseal_text_recognition_model_dir seal_text_recognition_batch_sizeseal_rec_score_threshformula_recognition_model_nameformula_recognition_model_dirformula_recognition_batch_sizeuse_doc_orientation_classifyuse_doc_unwarpinguse_textline_orientationuse_seal_recognitionuse_table_recognitionuse_formula_recognitionuse_chart_recognitionuse_region_detectionlangocr_versionr    det_model_namerec_model_nameparams	__class__sG                                                                         r   r.   PPStructureV3.__init__   sC   J "{:Q'Q'}4KLcKddef  #-,/.	

 

 ;#:151J1J+2. ")^-C$CDJ<O`aefqar`sstu  -;).<+;#:t  .G*+0K,-

6

8"6"r   c                     g)NzPP-StructureV3r   r   s    r   _paddlex_pipeline_name$PPStructureV3._paddlex_pipeline_name       r   FT)rd   re   rf   rg   rh   ri   rj   rk   r1   r2   r3   r4   r?   r@   rA   rB   rC   rI   rX   rY   rZ   r[   r\   r`   #use_wired_table_cells_trans_to_html&use_wireless_table_cells_trans_to_htmluse_table_orientation_classify use_ocr_results_with_table_cellsuse_e2e_wired_table_rec_model use_e2e_wireless_table_rec_modelc                    U R                   R                  " U40 SU_SU_SU_SU_SU_SU_SU_SU	_S	U
_S
U_SU_SU_SU_SU_SU_SU_SU_SU_SU_SU_SU_SU_SU_SU_SU_SU_SU_SU_SU_SU_U D6$ Nrd   re   rf   rg   rh   ri   rj   rk   r1   r2   r3   r4   r?   r@   rA   rB   rC   rI   rX   rY   rZ   r[   r\   r`   rx   ry   rz   r{   r|   r}   )paddlex_pipelinepredict!r   inputrd   re   rf   rg   rh   ri   rj   rk   r1   r2   r3   r4   r?   r@   rA   rB   rC   rI   rX   rY   rZ   r[   r\   r`   rx   ry   rz   r{   r|   r}   r    s!                                    r   predict_iterPPStructureV3.predict_iter   sU   H $$,,!
)E!
 0!
 &>	!

 "6!
 #8!
 %<!
 #8!
 "6!
 .!
 "!
 !4!
 &>!
 %<!
 !4!
  ,!!
" !4#!
$ #8%!
& #8'!
( %<)!
* !4+!
, ,-!
. !4/!
0 #81!
2 #83!
4 1T5!
6 4Z7!
8 ,J9!
: .N;!
< +H=!
> .NA!
 !	
r   c                    [        U R                  " U40 SU_SU_SU_SU_SU_SU_SU_SU	_S	U
_S
U_SU_SU_SU_SU_SU_SU_SU_SU_SU_SU_SU_SU_SU_SU_SU_SU_SU_SU_SU_SU_U D65      $ r   )listr   r   s!                                    r   r   PPStructureV3.predict   s\   H !-I! #4! *B	!
 &:! '<! )@! '<! &:! "2! &! %8! *B! )@! %8!  !0!!" %8#!$ '<%!& '<'!( )@)!* %8+!, !0-!. %8/!0 '<1!2 '<3!4 5X5!6 8^7!8 0N9!: 2R;!< /L=!> 2RA!#
 #	
r   c                 8    U R                   R                  U5      $ r   )r   concatenate_markdown_pages)r   markdown_lists     r   r   (PPStructureV3.concatenate_markdown_pages  s    $$??NNr   c                     [        5       $ r   )"PPStructureV3CLISubcommandExecutor)clss    r   get_cli_subcommand_executor)PPStructureV3.get_cli_subcommand_executor"  s    133r   c                 	   0 SU R                   S   _SU R                   S   _SU R                   S   =(       d    U R                   S   _SU R                   S   _SU R                   S   _S	U R                   S	   _S
U R                   S
   _SU R                   S   _SU R                   S   _SU R                   S   _SU R                   S   _SU R                   S   _SU R                   S   _SU R                   S   _SU R                   S   _SU R                   S   _SU R                   S   _0 SU R                   S   _SU R                   S    _S!U R                   S"   _S#U R                   S$   _S%U R                   S&   _S'U R                   S(   _S)U R                   S*   _S+U R                   S,   _S-U R                   S.   _S/U R                   S0   _S1U R                   S2   _S3U R                   S4   _S5U R                   S6   _S7U R                   S8   _S9U R                   S:   _S;U R                   S<   _S=U R                   S>   _E0 S?U R                   S@   _SAU R                   SB   _SCU R                   SD   _SEU R                   SF   _SGU R                   SH   _SIU R                   SJ   _SKU R                   SL   _SMU R                   SN   _SOU R                   SP   _SQU R                   SR   _SSU R                   ST   _SUU R                   SV   _SWU R                   SX   _SYU R                   SZ   _S[U R                   S\   _S]U R                   S^   _S_U R                   S,   _E0 S`U R                   S.   _SaU R                   S0   _SbU R                   S2   _ScU R                   S4   _SdU R                   S6   _SeU R                   S8   _SfU R                   S:   _SgU R                   S<   _ShU R                   S>   _SiU R                   S@   _SjU R                   SB   _SkU R                   SD   _SlU R                   SF   _SmU R                   Sn   _SoU R                   Sp   _SqU R                   S0   _SrU R                   Ss   _EU R                   St   U R                   Su   U R                   Sv   U R                   Sw   U R                   Sx   U R                   Sy   U R                   Sz   U R                   S{   U R                   S|   S}.	En[        U5      $ )~Nz9SubPipelines.DocPreprocessor.use_doc_orientation_classifyrd   z.SubPipelines.DocPreprocessor.use_doc_unwarpingre   use_doc_preprocessorz0SubPipelines.GeneralOCR.use_textline_orientationrf   rg   rh   ri   rj   rk   z%SubModules.LayoutDetection.model_namer/   z$SubModules.LayoutDetection.model_dirr0   z$SubModules.LayoutDetection.thresholdr1   z%SubModules.LayoutDetection.layout_nmsr2   z.SubModules.LayoutDetection.layout_unclip_ratior3   z3SubModules.LayoutDetection.layout_merge_bboxes_moder4   z&SubModules.ChartRecognition.model_namer5   z%SubModules.ChartRecognition.model_dirr6   z&SubModules.ChartRecognition.batch_sizer7   z%SubModules.RegionDetection.model_namer8   z$SubModules.RegionDetection.model_dirr9   zISubPipelines.DocPreprocessor.SubModules.DocOrientationClassify.model_namer:   zHSubPipelines.DocPreprocessor.SubModules.DocOrientationClassify.model_dirr;   z?SubPipelines.DocPreprocessor.SubModules.DocUnwarping.model_namer<   z>SubPipelines.DocPreprocessor.SubModules.DocUnwarping.model_dirr=   z;SubPipelines.GeneralOCR.SubModules.TextDetection.model_namer   z:SubPipelines.GeneralOCR.SubModules.TextDetection.model_dirr>   z?SubPipelines.GeneralOCR.SubModules.TextDetection.limit_side_lenr?   z;SubPipelines.GeneralOCR.SubModules.TextDetection.limit_typer@   z7SubPipelines.GeneralOCR.SubModules.TextDetection.threshrA   z;SubPipelines.GeneralOCR.SubModules.TextDetection.box_threshrB   z=SubPipelines.GeneralOCR.SubModules.TextDetection.unclip_ratiorC   zASubPipelines.GeneralOCR.SubModules.TextLineOrientation.model_namerD   z@SubPipelines.GeneralOCR.SubModules.TextLineOrientation.model_dirrE   zASubPipelines.GeneralOCR.SubModules.TextLineOrientation.batch_sizerF   z=SubPipelines.GeneralOCR.SubModules.TextRecognition.model_namer   z<SubPipelines.GeneralOCR.SubModules.TextRecognition.model_dirrG   z=SubPipelines.GeneralOCR.SubModules.TextRecognition.batch_sizerH   z?SubPipelines.GeneralOCR.SubModules.TextRecognition.score_threshrI   zGSubPipelines.TableRecognition.SubModules.TableClassification.model_namerJ   zFSubPipelines.TableRecognition.SubModules.TableClassification.model_dirrK   zRSubPipelines.TableRecognition.SubModules.WiredTableStructureRecognition.model_namerL   zQSubPipelines.TableRecognition.SubModules.WiredTableStructureRecognition.model_dirrM   zUSubPipelines.TableRecognition.SubModules.WirelessTableStructureRecognition.model_namerN   zTSubPipelines.TableRecognition.SubModules.WirelessTableStructureRecognition.model_dirrO   zLSubPipelines.TableRecognition.SubModules.WiredTableCellsDetection.model_namerP   zKSubPipelines.TableRecognition.SubModules.WiredTableCellsDetection.model_dirrQ   zOSubPipelines.TableRecognition.SubModules.WirelessTableCellsDetection.model_namerR   zNSubPipelines.TableRecognition.SubModules.WirelessTableCellsDetection.model_dirrS   zLSubPipelines.TableRecognition.SubModules.TableOrientationClassify.model_namerT   zKSubPipelines.TableRecognition.SubModules.TableOrientationClassify.model_dirrU   zYSubPipelines.TableRecognition.SubPipelines.GeneralOCR.SubModules.TextDetection.model_namezXSubPipelines.TableRecognition.SubPipelines.GeneralOCR.SubModules.TextDetection.model_dirz]SubPipelines.TableRecognition.SubPipelines.GeneralOCR.SubModules.TextDetection.limit_side_lenzYSubPipelines.TableRecognition.SubPipelines.GeneralOCR.SubModules.TextDetection.limit_typezUSubPipelines.TableRecognition.SubPipelines.GeneralOCR.SubModules.TextDetection.threshzYSubPipelines.TableRecognition.SubPipelines.GeneralOCR.SubModules.TextDetection.box_threshz[SubPipelines.TableRecognition.SubPipelines.GeneralOCR.SubModules.TextDetection.unclip_ratioz_SubPipelines.TableRecognition.SubPipelines.GeneralOCR.SubModules.TextLineOrientation.model_namez^SubPipelines.TableRecognition.SubPipelines.GeneralOCR.SubModules.TextLineOrientation.model_dirz_SubPipelines.TableRecognition.SubPipelines.GeneralOCR.SubModules.TextLineOrientation.batch_sizez[SubPipelines.TableRecognition.SubPipelines.GeneralOCR.SubModules.TextRecognition.model_namezZSubPipelines.TableRecognition.SubPipelines.GeneralOCR.SubModules.TextRecognition.model_dirz[SubPipelines.TableRecognition.SubPipelines.GeneralOCR.SubModules.TextRecognition.batch_sizez]SubPipelines.TableRecognition.SubPipelines.GeneralOCR.SubModules.TextRecognition.score_threshzUSubPipelines.SealRecognition.SubPipelines.SealOCR.SubModules.TextDetection.model_namerV   zTSubPipelines.SealRecognition.SubPipelines.SealOCR.SubModules.TextDetection.model_dirrW   zYSubPipelines.SealRecognition.SubPipelines.SealOCR.SubModules.TextDetection.limit_side_lenzUSubPipelines.SealRecognition.SubPipelines.SealOCR.SubModules.TextDetection.limit_typerY   rZ   r[   r\   r]   r^   r_   ra   rb   rc   )	zQSubPipelines.SealRecognition.SubPipelines.SealOCR.SubModules.TextDetection.threshzUSubPipelines.SealRecognition.SubPipelines.SealOCR.SubModules.TextDetection.box_threshzWSubPipelines.SealRecognition.SubPipelines.SealOCR.SubModules.TextDetection.unclip_ratiozWSubPipelines.SealRecognition.SubPipelines.SealOCR.SubModules.TextRecognition.model_namezVSubPipelines.SealRecognition.SubPipelines.SealOCR.SubModules.TextRecognition.model_dirzWSubPipelines.SealRecognition.SubPipelines.SealOCR.SubModules.TextRecognition.batch_sizezHSubPipelines.FormulaRecognition.SubModules.FormulaRecognition.model_namezGSubPipelines.FormulaRecognition.SubModules.FormulaRecognition.model_dirzHSubPipelines.FormulaRecognition.SubModules.FormulaRecognition.batch_size)r,   r   )r   	STRUCTUREs     r   _get_paddlex_config_overrides+PPStructureV3._get_paddlex_config_overrides&  s   Y
G.JY
 =dll#?	Y
 #DLL1O$P %1||/0Y
 ?*AY
 #DLL1G$HY
 $T\\2I%JY
 &t||4M'NY
 $T\\2I%JY
  #DLL1G$H!Y
" 4T\\-6#Y
( 3DLL,5)Y
. 3DLLAS4T/Y
0 4T\\,5O1Y
2 =dll%?3Y
8 B4<<*D9Y
> 5dll.7?Y
D 4T\\-6EY
J 5dll.7KY
P 4T\\-6QY
V 3DLL,5WY
\ XY]YeYe5Z]Y
b WX\XdXd4YcY
h Nt||*PiY
n Mdll)OoY
t J4<<+LuY
z I$,,*K{Y
@ Nt||)PAY
F J4<<%LGY
L Ft||!HMY
R J4<<%LSY
X LT\\'NYY
^ PQUQ]Q]1R_Y
d OPTP\P\0QeY
j PQUQ]Q]1RkY
p LT\\-NqY
v KDLL,MwY
| LT\\-N}Y
B Nt||'PCY
H VW[WcWc1XIY
N UVZVbVb0WOY
T abfbnbn>cUY
Z `aeamam=b[Y
` deieqeqAfaY
f cdhdpdp@egY
l [\`\h\h8]mY
r Z[_[g[g7\sY
x ^_c_k_k;`yY
~ ]^b^j^j:_Y
D [\`\h\h7]EY
J Z[_[g[g6\KY
P himiuiu+jQY
V ghlhtht*iWY
\ lmqmymy)n]Y
b himiuiu%jcY
h deieqeq!fiY
n himiuiu%joY
t jkokwkw'luY
z noso{o{1p{Y
@ mnrnznz0oAY
F noso{o{1pGY
L jkokwkw-lMY
R ijnjvjv,kSY
X jkokwkw-lYY
^ lmqmymy'n_Y
d deieqeq0feY
j cdhdpdp/ekY
p himiuiu)jqY
v deieqeq%fwY
| bfamam!b fjeqeq%f hlgsgs'h hlgsgs2h gkfrfr1g hlgsgs2h Y]XdXd0Y X\WcWc/X Y]XdXd0YmY
	t ,I66r   c                    / SQn/ SQn/ SQn/ SQn/ SQn/ SQnUc  SnUc'  U/ SQU-   U-   ;   a  S	nOUUU-   U-   U-   U-   ;   a  S
nOgUS	:X  aC  Su  pUS;   a  Sn
O*X;   a  Sn	O"X;   a  Sn	OUS:X  a  Sn	OUS:X  a  Sn	OUS:X  a  Sn	U	b  U	 S3n
SU
4$ US:X  a  US:X  a  gUS:X  a  ggS n	X;   a  Sn	OX;   a  Sn	OX;   a  Sn	OX;   a  Sn	OX;   a  Un	S n
U	S:X  a  Sn
SU
4$ U	b  U	 S3n
SU
4$ )N)*afazbscscydadeesetfrgahrhuidisitkulaltlvmimsmtnlnoocpiplptrors_latinskslsqsvswtltruzvifrenchgerman)arfaugur)rubeuk)r   rs_cyrillicr   bgr   mnabqadykbdavadarinhchelbeleztab)himrnebhmaiangbhomahscknewgomsabgc)chenkoreanjapanchinese_chttekatar   )r   r   r   r   r   thelr   r   )NN)r   r   r   r   zPP-OCRv5_server_reclatineslavr   r   r   z_PP-OCRv5_mobile_reczPP-OCRv5_server_detr   )PP-OCRv4_mobile_detzPP-OCRv4_mobile_recr   )r   zen_PP-OCRv4_mobile_recarabiccyrillic
devanagarizPP-OCRv3_mobile_recz_PP-OCRv3_mobile_reczPP-OCRv3_mobile_detr   )r   rl   ppocr_versionLATIN_LANGSARABIC_LANGSESLAV_LANGSCYRILLIC_LANGSDEVANAGARI_LANGSSPECIFIC_LANGSrec_langro   s              r   r%   "PPStructureV3._get_ocr_model_names  s   +
X 0(
$
	
 <D M
 !+ ! ## !	! !+ "J&'1$H;;!6$"$"!##$,:-A!B(.88j(t|CF! H""%#'%)')#H!N4!6 ).88 %$,:-A!B(.88r   )r,   )ANNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN)__name__
__module____qualname____firstlineno__r.   propertyru   r   r   r   classmethodr   r   r%   __static_attributes____classcell__)rq   s   @r   r   r      s    %)#' !%%)$(%)$(#',0+/!% $"&!% $  "(,'+(,$(#'$("(,'+59488<7;/3.22615.2-1'+&* $  ")-(,)-"'+&*'+%)!%!" $"!El#\     &*!%!" $"! !% $  "" $  "",1/4'+)-&+)-CE
V &*!%!" $"! !% $  "" $  "",1/4'+)-&+)-CG
RO 4 4[7z`9 `9r   r   c                   0    \ rS rSr\S 5       rS rS rSrg)r   i  c                     g)Npp_structurev3r   rt   s    r   subparser_name1PPStructureV3CLISubcommandExecutor.subparser_name  rw   r   c                 
   [        U5        UR                  S[        SS9  UR                  S[        SS9  UR                  S[        SS9  UR                  S[        S	S9  UR                  S
[        SS9  UR                  S[        SS9  UR                  S[        SS9  UR                  S[        SS9  UR                  S[
        SS9  UR                  S[        SS9  UR                  S[        SS9  UR                  S[        SS9  UR                  S[        SS9  UR                  S[        SS9  UR                  S[        SS9  UR                  S [        S!S9  UR                  S"[        S#S9  UR                  S$[
        S%S9  UR                  S&[        S'S9  UR                  S([        S)S9  UR                  S*[        S+S9  UR                  S,[        S-S9  UR                  S.[        S/S9  UR                  S0[        S1S9  UR                  S2[
        S3S9  UR                  S4[        S5S9  UR                  S6[        S7S9  UR                  S8[
        S9S9  UR                  S:[        S;S9  UR                  S<[        S=S9  UR                  S>[        S?S9  UR                  S@[        SAS9  UR                  SB[        SCS9  UR                  SD[        SES9  UR                  SF[        SCS9  UR                  SG[        SHS9  UR                  SI[        SJS9  UR                  SK[        SLS9  UR                  SM[        SNS9  UR                  SO[        SPS9  UR                  SQ[        SRS9  UR                  SS[
        STS9  UR                  SU[        SVS9  UR                  SW[        SXS9  UR                  SY[        SZS9  UR                  S[[        S\S9  UR                  S][        S^S9  UR                  S_[        S`S9  UR                  Sa[
        SbS9  UR                  Sc[        SdS9  UR                  Se[        SfS9  UR                  Sg[        ShS9  UR                  Si[
        SjS9  UR                  Sk[        SlS9  UR                  Sm[        SnS9  UR                  So[        SpS9  UR                  Sq[        SrS9  UR                  Ss[        StS9  UR                  Su[        SvS9  UR                  Sw[        SxS9  UR                  Sy[        SzS9  g ){Nz--layout_detection_model_namez#Name of the layout detection model.)typehelpz--layout_detection_model_dirz-Path to the layout detection model directory.z--layout_thresholdz/Score threshold for the layout detection model.z--layout_nmsz'Whether to use NMS in layout detection.z--layout_unclip_ratioz+Expansion coefficient for layout detection.z--layout_merge_bboxes_modez!Overlapping box filtering method.z--chart_recognition_model_namez$Name of the chart recognition model.z--chart_recognition_model_dirz.Path to the chart recognition model directory.z--chart_recognition_batch_sizez+Batch size for the chart recognition model.z--region_detection_model_namez#Name of the region detection model.z--region_detection_model_dirz-Path to the region detection model directory.z%--doc_orientation_classify_model_namez<Name of the document image orientation classification model.z$--doc_orientation_classify_model_dirzFPath to the document image orientation classification model directory.z--doc_unwarping_model_namez'Name of the text image unwarping model.z--doc_unwarping_model_dirz,Path to the image unwarping model directory.z--text_detection_model_namez!Name of the text detection model.z--text_detection_model_dirz+Path to the text detection model directory.z--text_det_limit_side_lenzUThis sets a limit on the side length of the input image for the text detection model.z--text_det_limit_typezxThis determines how the side length limit is applied to the input image before feeding it into the text deteciton model.z--text_det_threshzDetection pixel threshold for the text detection model. Pixels with scores greater than this threshold in the output probability map are considered text pixels.z--text_det_box_threshzDetection box threshold for the text detection model. A detection result is considered a text region if the average score of all pixels within the border of the result is greater than this threshold.z--text_det_unclip_ratiozText detection expansion coefficient, which expands the text region using this method. The larger the value, the larger the expansion area.z!--textline_orientation_model_namez7Name of the text line orientation classification model.z --textline_orientation_model_dirz;Path to the text line orientation classification directory.z!--textline_orientation_batch_sizez>Batch size for the text line orientation classification model.z--text_recognition_model_namez#Name of the text recognition model.z--text_recognition_model_dirz-Path to the text recognition model directory.z--text_recognition_batch_sizez*Batch size for the text recognition model.z--text_rec_score_threshzrText recognition threshold used in general OCR. Text results with scores greater than this threshold are retained.z!--table_classification_model_namez'Name of the table classification model.z --table_classification_model_dirz1Path to the table classification model directory.z.--wired_table_structure_recognition_model_namez4Name of the wired table structure recognition model.z---wired_table_structure_recognition_model_dirz>Path to the wired table structure recognition model directory.z1--wireless_table_structure_recognition_model_namez7Name of the wireless table structure recognition model.z0--wireless_table_structure_recognition_model_dirz(--wired_table_cells_detection_model_namez.Name of the wired table cells detection model.z'--wired_table_cells_detection_model_dirz8Path to the wired table cells detection model directory.z+--wireless_table_cells_detection_model_namez1Name of the wireless table cells detection model.z*--wireless_table_cells_detection_model_dirz;Path to the wireless table cells detection model directory.z --seal_text_detection_model_namez&Name of the seal text detection model.z--seal_text_detection_model_dirz0Path to the seal text detection model directory.z--seal_det_limit_side_lenzZThis sets a limit on the side length of the input image for the seal text detection model.z--seal_det_limit_typez}This determines how the side length limit is applied to the input image before feeding it into the seal text deteciton model.z--seal_det_threshzDetection pixel threshold for the seal text detection model. Pixels with scores greater than this threshold in the output probability map are considered text pixels.z--seal_det_box_threshzDetection box threshold for the seal text detection model. A detection result is considered a text region if the average score of all pixels within the border of the result is greater than this threshold.z--seal_det_unclip_ratiozSeal text detection expansion coefficient, which expands the text region using this method. The larger the value, the larger the expansion area.z"--seal_text_recognition_model_namez(Name of the seal text recognition model.z!--seal_text_recognition_model_dirz2Path to the seal text recognition model directory.z"--seal_text_recognition_batch_sizez/Batch size for the seal text recognition model.z--seal_rec_score_threshzcSeal text recognition threshold. Text results with scores greater than this threshold are retained.z --formula_recognition_model_namez&Name of the formula recognition model.z--formula_recognition_model_dirz0Path to the formula recognition model directory.z --formula_recognition_batch_sizez-Batch size for the formula recognition model.z--use_doc_orientation_classifyz9Whether to use document image orientation classification.z--use_doc_unwarpingz$Whether to use text image unwarping.z--use_textline_orientationz4Whether to use text line orientation classification.z--use_seal_recognitionz Whether to use seal recognition.z--use_table_recognitionz!Whether to use table recognition.z--use_formula_recognitionz#Whether to use formula recognition.z--use_chart_recognitionz!Whether to use chart recognition.z--use_region_detectionz Whether to use region detection.)r   add_argumentstrfloatr   int)r   	subparsers     r   _update_subparser4PPStructureV3CLISubcommandExecutor._update_subparser  sI   !),+6 	 	

 	*@ 	 	

 	 B 	 	

 	: 	 	

 	#> 	 	

 	(4 	 	
 	,7 	 	

 	+A 	 	

 	,> 	 	
 	+6 	 	

 	*@ 	 	
 	3O 	 	

 	2Y 	 	

 	(: 	 	

 	'? 	 	
 	)4 	 	

 	(> 	 	

 	'h 	 	

 	# L 	 	

 	 t 	 	

 	# [ 	 	

 	% _ 	 	

 	/J 	 	

 	.N 	 	

 	/Q 	 	

 	+6 	 	

 	*@ 	 	

 	+= 	 	

 	% F 	 	
 	/: 	 	

 	.D 	 	

 	<G 	 	

 	;Q 	 	

 	?J 	 	

 	>Q 	 	

 	6A 	 	

 	5K 	 	

 	9D 	 	

 	8N 	 	
 	.9 	 	

 	-C 	 	

 	'm 	 	

 	# Q 	 	

 	 y 	 	

 	# ` 	 	

 	% d 	 	

 	0; 	 	

 	/E 	 	

 	0B 	 	

 	%v 	 	
 	.9 	 	

 	-C 	 	

 	.@ 	 	
 	,L 	 	

 	!7 	 	

 	(G 	 	

 	$3 	 	

 	%4 	 	

 	'6 	 	

 	%4 	 	

 	$3 	 	
r   c                 :    [        U5      n[        [        U5        g r   )r   r   r   )r   argsrp   s      r   execute_with_args4PPStructureV3CLISubcommandExecutor.execute_with_args  s    $T* 	
r   r   N)	r   r   r   r   r   r  r  r  r  r   r   r   r   r     s        {
z	
r   r   )r'   
_utils.clir   r   r   r   baser	   r
   utilsr   r!   r   r   r   r   r   <module>r     sB      H /> G
9* G
9TG
)F G
r   