
    j                     X    d dl mZ d dlmZ ddlmZ ddlmZ dgZ G d de          Z	dS )	    )Any)KIEDocumentBuilder   )OrientationPredictor)_OCRPredictor_KIEPredictorc                   n     e Zd ZU dZedz  ed<   edz  ed<   	 	 	 	 	 ddeded	ed
edededdf fdZ xZ	S )r   a  Implements an object able to localize and identify text elements in a set of documents

    Args:
        assume_straight_pages: if True, speeds up the inference by assuming you only pass straight pages
            without rotated textual elements.
        straighten_pages: if True, estimates the page general orientation based on the median line orientation.
            Then, rotates page before passing it to the deep learning modules. The final predictions will be remapped
            accordingly. Doing so will improve performances for documents with page-uniform rotations.
        preserve_aspect_ratio: if True, resize preserving the aspect ratio (with padding)
        symmetric_pad: if True and preserve_aspect_ratio is True, pas the image symmetrically.
        detect_orientation: if True, the estimated general page orientation will be added to the predictions for each
            page. Doing so will slightly deteriorate the overall latency.
        kwargs: keyword args of `DocumentBuilder`
    Ncrop_orientation_predictorpage_orientation_predictorTFassume_straight_pagesstraighten_pagespreserve_aspect_ratiosymmetric_paddetect_orientationkwargsreturnc                      t                      j        |||||fi | |                    dd            |                    dd            t          di || _        d S )Ndisable_page_orientationdisable_crop_orientation )super__init__popr   doc_builder)selfr   r   r   r   r   r   	__class__s          b/var/www/html/Carbon-Document/venv/lib/python3.11/site-packages/doctr/models/kie_predictor/base.pyr   z_KIEPredictor.__init__#   s     	!#35JM[m	
 	
qw	
 	
 	

 	

-t444

-t444/A/K/KF/K/K    )TFTTF)
__name__
__module____qualname____doc__r   __annotations__boolr   r   __classcell__)r   s   @r   r   r      s           !5t ;;;; 4t ;;;; '+!&&*"#(L L#L L  $	L
 L !L L 
L L L L L L L L L Lr   N)
typingr   doctr.models.builderr   classification.predictorr   predictor.baser   __all__r   r   r   r   <module>r+      s          3 3 3 3 3 3 ; ; ; ; ; ; * * * * * *
$L $L $L $L $LM $L $L $L $L $Lr   