
    {-j                     B    d dl Z d dlZddlmZmZ  G d de          ZdS )    N   )BaseCVResult	JsonMixinc                   4    e Zd ZdZdej        fdZd Zd ZdS )DocTrResulta3  
    Result class for DocTr, encapsulating the output of a document image processing task.

    Attributes:
        (inherited from BaseCVResult): Any attributes defined in the base class.

    Methods:
        _to_img(self) -> np.ndarray:
            Converts the stored image result to a numpy array.
    returnc                 >    t          j        | d                   }d|iS )N	doctr_imgres)nparray)selfresults     o/var/www/html/banglarbhumi/venv/lib/python3.11/site-packages/paddlex/inference/models/image_unwarping/result.py_to_imgzDocTrResult._to_img"   s     ${+,,v    c                     t          j        |           }|                    d           d|d<   t          j        |g|R i |S )N	input_imgz...r
   )copydeepcopypopr   _to_strr   argskwargsdatas       r   r   zDocTrResult._to_str&   sN    }T""![ 7777777r   c                 ~    t          j        |           }|                    d           t          j        |g|R i |S )Nr   )r   r   r   r   _to_jsonr   s       r   r   zDocTrResult._to_json,   sD    }T""!$8888888r   N)	__name__
__module____qualname____doc__r   ndarrayr   r   r    r   r   r   r      sY        	 	    8 8 89 9 9 9 9r   r   )r   numpyr   common.resultr   r   r   r$   r   r   <module>r'      sh         4 4 4 4 4 4 4 49 9 9 9 9, 9 9 9 9 9r   