o
    'jW                     @   sJ   d dl Z d dlZd dlZd dlmZ d dlmZ dgZG dd de	Z
dS )    N)thin)!sort_and_expand_with_direction_v2PGProcessTrainc                   @   s  e Zd Z							dFdd	Zd
d Zdd Zdd Zdd Z		dGddZ			dHddZ				dHddZ
dd Zdd Z	 	!dId"d#Zd$d% Zd&d' Z	(	)dJd*d+Z	)dKd,d-Zd.d/ Zd0d1 Zd2d3 Zd4d5 Zd6d7 Zd8d9 Zd:d; Zd<d= Zd>d? Zd@dA ZdBdC ZdDdE ZdS )Lr      TF         Nc                 K   sf   || _ || _|| _|| _|du r|| _|| _|	| _|
| _|| _|| _	| 
|| _t| j| _d| _d S )NTr   )tcl_lenmax_text_lengthmax_text_nums
batch_sizemin_crop_sizeuse_random_cropmin_text_sizemax_text_size
use_resizepoint_gather_modeget_dictLexicon_Tablelenpad_numimg_id)selfcharacter_dict_pathr
   r   r	   r   r   r   r   r   r   r   kwargs r   f/var/www/html/Deteccion_Ine/venv/lib/python3.10/site-packages/paddleocr/ppocr/data/imaug/pg_process.py__init__   s   
zPGProcessTrain.__init__c                 C   sl   d}t |d%}| }|D ]}|ddd}||7 }qt|}W d    |S 1 s/w   Y  |S )N rbzutf-8
z
)open	readlinesdecodestriplist)r   r   Zcharacter_strZfinlineslineZdict_characterr   r   r   r   5   s   


zPGProcessTrain.get_dictc                 C   s   |d d |d d  |d d |d d   |d d |d d  |d d |d d   |d d |d d  |d d |d d   |d d |d d  |d d |d d   g}t |d S )zQ
        compute area of a polygon
        :param poly:
        :return:
           r                @)npsum)r   polyedger   r   r   	quad_area?   s   ....zPGProcessTrain.quad_areac           
      C   s  |j d }tjdtjd}t|tj}tt	|}d}d}t
dD ]P}tj||d d  |d  tj||d d  ||d d    tj||d d  ||d    tj||d d  |d	   }	|	|k rv|	}|}q&t
dD ]}||| d  ||< q{|S )
3
        Generate min area quad from poly.
        r   r   r)   dtype     @r   r(   r)   r*   )shaper,   zerosfloat32cv2minAreaRectastypeint32array	boxPointsrangelinalgnorm)
r   r.   	point_nummin_area_quadrectboxfirst_point_idxmin_distidistr   r   r   gen_quad_from_polyK   s.   
&"z!PGProcessTrain.gen_quad_from_polyc                 C   s  |\}}|j d dkr|tg tg fS t|dddddf d|d |dddddf< t|dddddf d|d |dddddf< g }g }g }t||D ]\}	}
| |	}| |}t|dk rptd qW|dkr|
dkr~td d}
|	dddf }	|d	ddf }tj	
|d |d  tj	
|d
 |d   }tj	
|d |d
  tj	
|d |d   }d}|d |k rd}||	 ||
 || qWt|t|t|fS )z
        check so that the text poly is in the same direction,
        and also filter some invalid polygons
        :param polys:
        :param tags:
        :return:
        r   Nr(   zinvalid polyFzpoly in wrong directionT)r      r            
   	               r   r*   r)   r(   )r   r*   r)   r(   r*   r)   r+   )r7   r,   r>   clipziprK   r0   absprintrA   rB   append)r   polystagsZim_sizehwZvalidated_polysZvalidated_tagshv_tagsr.   tagquadZp_areaZlen_wZlen_hZhv_tagr   r   r   check_and_validate_polysd   sJ   66

""

z'PGProcessTrain.check_and_validate_polys   c           !      C   s  |j \}}	}
|d }|	d }tj||d  tjd}tj|	|d  tjd}|D ]M}tj|ddtj}t|dddf }t|dddf }d||| || < t|dddf }t|dddf }d||| || < q(t|dkd }t|dkd }t	|dkst	|dkr|||||fS t
|D ]>}tjj|dd}t|| }t|| }t|d|	d }t|d|	d }tjj|dd}t|| }t|| }t|d|d }t|d|d }|| | jk s|| | jk rq|j d dkrN|dddddf |k|dddddf |k@ |dddddf |k@ |dddddf |k@ }ttj|dd	d
kd }ng }t	|dkr|rg }|D ]
} |||   q^|}|||d ||d ddf || || || |f  S q|||d ||d ddf }|| }|| }|| }g }|D ]
} |||   q|}|dddddf  |8  < |dddddf  |8  < |||||f  S |||||fS )z
        make random crop from the input image
        :param im:
        :param polys:  [b,4,2]
        :param tags:
        :param crop_background:
        :param max_tries: 50 -> 25
        :return:
        rP   r)   r3   r   ZdecimalsNr(   )sizeZaxisr   )r7   r,   r8   r=   roundr<   minmaxwherer   r@   randomchoicerV   r   r-   rZ   )!r   imr[   r\   r_   Ztxtscrop_backgroundZ	max_triesr]   r^   _Zpad_hZpad_wZh_arrayZw_arrayr.   ZminxZmaxxZminyZmaxyZh_axisZw_axisrI   xxZxminZxmaxyyZyminZymaxZpoly_axis_in_areaZselected_polysZtxts_tmpZselected_polyr   r   r   	crop_area   s   2 "zPGProcessTrain.crop_area@   r   r*   c                    s  g }|j d td D ]}	||	 |d |	   d }
||
 qtj||fdd}t|t|dgdd	 t	|dk\}}tjt
t||dd
}|d |d  d dd}|d |d  d dd}|| tj|| d  }t||j d df}t||j d df}|| }tj|| dd}|t| }t|dddddddf }t| kr҇ fddt D }||ddf }ttt| }tj dk r5|dkr5tj|d | d }tddgddg||dg }||7 }t|dddf d|d |dddf< t|dddf d|d |dddf< tj| jdftjd
}t| jf| |dddf< tj| jdftjd
}t|tj|d|ddf< d	|d|< ||fS )S
        Find the center point of poly as key_points, then fit and gather.
        r   r)   r(   r+   r9   )r7   r4   r=   F      ?r3   ư>rf   r6   Nc                        g | ]}t d    | qS ru   int.0xfixed_point_numrC   r   r   
<listcomp>      z?PGProcessTrain.fit_and_gather_tcl_points_v2.<locals>.<listcomp>皙?r*         ?333333?)r7   r@   rZ   r,   r8   r:   Z	polylinesr>   r<   rj   r%   rW   reshaperA   rB   Ztiler-   Zargsortr   rz   rh   rk   randrV   r	   r=   onesr9   rg   )r   rD   r.   max_hmax_wr   r   reference_heightZkey_point_xysidxcenter_pointZ	tmp_imageysxsZxy_textZleft_center_ptZright_center_ptZproj_unit_vecZproj_unit_vec_tileZleft_center_pt_tileZxy_text_to_left_centerZ
proj_valuepos_infokeep_idskeepdlZrandom_floatpos_lpos_mr   r~   r   fit_and_gather_tcl_points_v2   sl   
$**"z+PGProcessTrain.fit_and_gather_tcl_points_v2c           '         s  t t|| j t|| j ft j}t|t || j t j	d tj
|d| j| jd}t j|dkdd}| j}	t|t j}
tj|
t jdd\}}t |d	k\}}tt||}t|d
k rjdS t||	|}t |}t|d	 }d}t|D ]q}t |||  d ||d	 |  d  }t |||  d	 ||d	 |  d	  }tt||}|||  ||d	 |   | }|d	 }tt|D ]}|||  |d	 |  }|| d	 | }t j|||dd}q||7 }qt |ddt j}t| kr fddt D }||ddf }ttt| }t |d |d  t |d |d   d }t j d	k rt j|d | } t j d }!t d|!| d gg}"t d	dgd	dg| |d	g }#|"j|dd}$||#7 }||$7 }t |dddf d|d	 |dddf< t |ddd	f d|d	 |ddd	f< t j| jd
ft j	d}%t  | jf| |%dddf< t j| jd	ft jd}&t |t j	|%d|d	df< d|&d|< |%|&fS )rt   ru   NZdsizeZfxfyMbP?r9   r3   rR   )Zconnectivityr(   r*   r   rf   r6   r)   c                    rw   rx   ry   r{   r~   r   r   r   b  r   z?PGProcessTrain.fit_and_gather_tcl_points_v3.<locals>.<listcomp>)r   r   r   )r6   r(   r   )r   r*   r   )r6   r)   r   r   r   )!r,   r8   rz   ds_ratior<   r9   r:   fillPolyrg   r=   resizer>   f_directionr   Zuint8ZconnectedComponentsrj   r%   rW   r   r   r@   rX   ri   insertr   rh   rk   r   repeatrV   r	   r   )'r   rD   r.   r   r   r   r   r   Zdet_maskr   Zskeleton_mapZinstance_countZinstance_label_mapr   r   pos_listZpos_list_sortedlengthZ
insert_numindexZstride_yZstride_xZ
max_pointsZstrideZinsert_num_temprI   Zinsert_valueZinsert_indexr   r   r   Zreference_widthZdhoffsetZdwZrandom_float_hZrandom_float_wr   r   r   r~   r   fit_and_gather_tcl_points_v3&  s   




**"z+PGProcessTrain.fit_and_gather_tcl_points_v3c              	   C   sZ  g }g }|D ]@}t j|d |d  t j|d |d   d }t j|d |d  t j|d |d   d }|| || qtt|| d}	tt|t| d}
d}|D ]K}|d |d  |d |d   d }|t j|d  |	 }ttt	|d |d d|
 g}t
|| t jt jddddf | |d7 }q_|S )		
        r   r(   r)   r*   r+   ru   rv   N)r,   rA   rB   rZ   ri   r-   r   tuplemapfloatr:   r   rg   r<   r=   newaxis)r   
poly_quadsn_chardirection_mapZ
width_listheight_listra   quad_wquad_hZ
norm_widthaverage_heightkZdirect_vector_fullZdirect_vectorZdirection_labelr   r   r   generate_direction_map  sJ   
 "
z%PGProcessTrain.generate_direction_mapc                 C   sf   g }|D ]!}t j|d |d  t j|d |d   d }|| qtt|t| d}|S )r   r   r*   r)   r(   r+   ru   )r,   rA   rB   rZ   ri   r-   r   )r   r   r   ra   r   r   r   r   r   calculate_average_height  s   z'PGProcessTrain.calculate_average_heightr   333333?c	           .         sJ  | _ tj||ftjd}	t|| t|| }}|| }tj||ftjd}
tj||ftjd}tj||dftjd}tj||ftjd}t||dftg dg dtj }d}g }g g g }}}t	t
||D ]\}}|d }|d } |\}}dtj|d |d  tj|d |d	    }dtj|d |d  tj|d	 |d    }t|| j| k st|| j| krqr|rt||tjtjd
d
d
d
f d qr|| } | j} fdd|D }t|dk rqr ||} |} |}  j||d| d\}!}"t|
t|!tjd t|	t|!| tjd t	|!D ]2\}#}$tj||ftjd}%t|%t|$tjd
d
d
d
f tjd}% | |"|#  |%|}qA|dkrt jgg}&||& |d7 }t|t| tj| || t|}' | |'|} |!}( j dkr|d
d
d
d
d
df !  _" j#||!||d j$|(d})|)d
u rqr|)d |)d }*}+n j%||||d j$|(d\}*}+|},t|d	k rqr||* ||+ ||, qrtj&|	d
||d}-tj|-dkdd}
|
||||||||f	S )z#
        Generate polygon.
        r3   rU   r*   )r   r   r(   )r(   r(   r*   r   r(   r   r)   Nr   c                    s$   g | ]}| j v r j |gqS r   )r   r   )r|   Zc_r   r   r   r     s
    
z9PGProcessTrain.generate_tcl_ctc_label.<locals>.<listcomp>ru   )shrink_ratio_of_widthexpand_height_ratioalignr6   rs   )r   r   r   r   r   r   r   r9   )'r   r,   r8   r9   rz   r   r>   r   r<   	enumeraterW   gen_min_area_quad_from_polyrA   rB   rh   r   r   r:   r   r=   r   prepare_text_labelr   r   poly2tcl
poly2quadsshrink_poly_along_widthrg   gen_quad_tborZ   r   r   r   copyr   r   r   r   r   ).r   r]   r^   r[   r\   	text_strsr   Z	tcl_ratior   Zscore_map_big	score_mapscore_label_maptbo_maptraining_maskr   Z	label_idxZscore_label_map_text_label_listr   pos_mask
label_listZpoly_idxZpoly_tagr.   r`   rD   r   Zmin_area_quad_hZmin_area_quad_wZ
text_labelZtext_label_index_listtcl_polyZ	tcl_quadsr   Z
stcl_quadsZ
quad_indexr   ra   Z	quad_maskZtext_pos_list_r   Zaverage_shrink_heightZpos_resr   r   Zlabel_lZscore_map_big_resizedr   r   r   generate_tcl_ctc_label  s   



&


 

	


z%PGProcessTrain.generate_tcl_ctc_labelc                 C   sB  |j d }|dkrOtj|d |d  }tj|d |d  }tj|d |d  }tj|d |d  }|| d || k rM|g dddf }|S |dkr|d |d  }|d |d  }t||tj|tj| d	  }	ttj|	dd
}
t|
dtj	 krt
td|dg }|t|ddf }|S )z%
        adjust point order.
        r   r   r(   r)   r*   g      ?)r(   r)   r*   r   Nrv   rd   g98?)r7   r,   rA   rB   dotZarccosrg   rX   mathpir%   r@   r>   )r   r.   rC   Zlen_1Zlen_2Zlen_3Zlen_4Zvector_1Zvector_2Z	cos_thetathetar   r   r   r   adjust_point>  s(   

zPGProcessTrain.adjust_pointc                 C   sF  |j d }tjdtjd}|dkr |}tj|ddd }||fS t|tj}|d }t	t
|}d}d}tdD ]P}	tj||	d d  |d  tj||	d d  ||d d    tj||	d d  ||d    tj||	d	 d  |d
   }
|
|k r|
}|	}q=tdD ]}	|||	 d  ||	< q||fS )r1   r   r2   r3   r   rf   r5   r(   r)   r*   r6   )r7   r,   r8   r9   r-   r:   r;   r<   r=   r>   r?   r@   rA   rB   )r   r.   rC   rD   r   rE   rF   rG   rH   rI   rJ   r   r   r   r   X  s8   
&"z*PGProcessTrain.gen_min_area_quad_from_poly        ru   c                 C   sr   t j|g|ggt jd}|d |d |d  |  }|d |d |d  |  }t |d |d |d |d gS )z3
        Generate shrink_quad_along_width.
        r3   r   r(   r*   r)   r,   r>   r9   )r   ra   begin_width_ratioend_width_ratio
ratio_pairZp0_1Zp3_2r   r   r   shrink_quad_along_widthw  s   "z&PGProcessTrain.shrink_quad_along_widthc                 C   sj  g }dd }|D ]}t j|d |d  }|| qt j|d d |d d  | }t j|d d |d d  | }	t||	t|| }
|
}t||
 }|||\}}| j|| |dd}|||\}}| j|| d|d}g }||kr||d |d |d |d g n|| t|d |D ]	}|||  q|| t |t	t||d fS )	z0
        shrink poly with given length.
        c                 S   sF   t | D ]\}}||8 }|dkr || |  | |  }||f  S qd S )Nrv   )r   )Zedge_len_listZcut_lenr   Zedge_lenratior   r   r   get_cut_info  s   z<PGProcessTrain.shrink_poly_along_width.<locals>.get_cut_infor   r(   r*   r6   r)   )r   r   )
r,   rA   rB   rZ   rh   r-   r   r@   r>   r%   )r   Zquadsr   r   Zupper_edge_listr   ra   Zupper_edge_lenZleft_lengthZright_lengthZshrink_lengthZupper_len_leftZupper_len_rightZleft_idxZ
left_ratioZ	left_quadZ	right_idxZright_ratioZ
right_quadZout_quad_listr   r   r   r   r     sP   



z&PGProcessTrain.shrink_poly_along_widthc                 C   s   t |dkr
| S |S )z=
        Prepare text lablel by given Lexicon_Table.
        $   )r   lower)r   Z	label_strr   r   r   r   r     s   z!PGProcessTrain.prepare_text_labelc                 C   s0   t |d |d  |d |d  g}t j| S )zV
        Calculate the angle between vector AB and x-axis positive direction.
        r(   r   )r,   r>   Zarctan2)r   ABZABr   r   r   vector_angle  s   &
zPGProcessTrain.vector_anglec                 C   s4   |\}}t |}t |}|| || ||  gS )zZ
        Calculate the line through given point and angle in ax + by + c =0 form.
        )r,   cossin)r   r   pointr}   yr   r   r   r   r   theta_line_cross_point  s   

z%PGProcessTrain.theta_line_cross_pointc                 C   s   |  ||}| ||S )zX
        Calculate the line through given point A and B in ax + by + c =0 form.
        )r   r   )r   r   r   angler   r   r   line_cross_two_point  s   z#PGProcessTrain.line_cross_two_pointc                 C   s0   |\}}}}|  ||}|  ||}|| d S )zX
        Calculate the average angle between left and right edge in given poly.
        r)   )r   )r   r.   p0p1Zp2Zp3Zangle30Zangle21r   r   r   average_angle  s   zPGProcessTrain.average_anglec                 C   s   |\}}}|\}}}|| ||  }	|	dkr$t d tjddgtjdS || ||  |	 }
|| ||  |	 }tj|
|gtjdS )z`
        line1 and line2 in  0=ax+by+c form, compute the cross point of line1 and line2
        r   zCross point does not existr3   )rY   r,   r>   r9   )r   line1line2Za1b1c1Za2b2c2dr}   r   r   r   r   line_cross_point  s   

zPGProcessTrain.line_cross_pointc                 C   s   t jd|d  gd|d  ggt jd}|d |d |d  |  }|d |d |d  |  }t |d |d |d |d gS )zG
        Generate center line by poly clock-wise point. (4, 2)
        r   r)   r3   r   r*   r(   r   )r   r.   r   r   Zp0_3Zp1_2r   r   r   quad2tcl  s   "zPGProcessTrain.quad2tclc                 C   s   t jd|d  gd|d  ggt jd}t |}|jd }t|d D ]$}|| ||d |  ||  |  }|d ||< |d ||d | < q$|S )z@
        Generate center line by poly clock-wise point.
        r   r)   r3   r   r(   )r,   r>   r9   Z
zeros_liker7   r@   )r   r.   r   r   r   rC   r   
point_pairr   r   r   r     s   

zPGProcessTrain.poly2tclc                 C   sX  |  |d |d }|  |d |d }dtj|d |d  tj|d |d    }dtj|d |d  tj|d |d    }| |}t|dk}	|	D ]S\}
}||
f}| ||}| ||}| ||}|| \}}|| \}}|||
|df< |||
|df< |||
|df< |||
|df< dtt	||d d ||
|df< qV|S )z1
        Generate tbo_map for give quad.
        r   r(   r*   r)   r   ru   r   )
r   r,   rA   rB   r   Zargwherer   r   ri   rh   )r   ra   Ztcl_maskr   Zup_lineZ
lower_liner   r   r   Z
xy_in_polyr   r}   r   r'   Zcross_point_upperZcross_point_lowerZupper_offset_xZupper_offset_yZlower_offset_xZlower_offset_yr   r   r   r     s.   
$zPGProcessTrain.gen_quad_tboc                 C   s   g }|j d }g }t|d D ]}|| ||d |  g}|| q|d d }t|D ]}|t|||d g ddg d  q-t|S )z(
        Split poly into quads.
        r   r)   r(   r   )r   r)   r*   r(   )r7   r@   rZ   r,   r>   r   )r   r.   Z	quad_listrC   Zpoint_pair_listr   r   Zquad_numr   r   r   r   +  s   

zPGProcessTrain.poly2quadsc                 C   sb  |j d |j d }}| }g }tj }d}|dkrd}t|D ]}	t|}q"d| }
|
tj d }|j d }d| d| }}d|j d  d|j d  }}t|D ]P}	||	 }g }tdD ]>}|| d || d }}t	|||  t
|||   | }t
|||  t	|||   | }|||g qb|| qV|tj|tjdfS )	z8
        rotate image with 90 / 180 / 270 degre
        r(   r   r   r*   ig     f@r   r3   )r7   r   r,   rk   r   r@   Zrot90r   r   r   r   rZ   r>   r9   )r   rm   
text_polysZim_wZim_hZdst_imZ	dst_polysZrand_degree_ratioZrand_degree_cntrI   Z
rot_degreeZ	rot_angleZn_polyZcxcyZncxZncyZwordBBr.   jsxZsyZdxZdyr   r   r   rotate_im_poly@  s@   

zPGProcessTrain.rotate_im_polyc           4   	   C   s\  d}|d }|d }|d }|d }|j \}}}	| ||||f\}}}
|j d dkr-d S tddd	}tj|}tj d
k rEd| }t|}|}d| }t	j
|d ||d}|d d d d df  |9  < |d d d d df  |9  < | jdu r|j \}}}	t||dk rdt|| }t	
|t|| t|| f}|d d d d df  |9  < |d d d d df  |9  < t||dkrdt|| }t	
|t|| t|| f}|d d d d df  |9  < |d d d d df  |9  < nH| jdu rC|j \}}}	t||dkr#dt|| }t	j
|d ||d}||9 }|j \}}}	t||dk r3d S | j||||
|dd\}}}}
}|j d dkrMd S t|d |jkrZd S |j \}}}	|d u sj|d u rld S t|t|| }tg d}|tj| }t	j
|d ||d}|d d d d df  |9  < |d d d d df  |9  < tj dk rtjdd d }t|d d d }t	j|||fddd}tj dk r|dtj d
   }t|dd}tj dk r|dtj d
   }t|dd}|j \}}}	t|||d
 k rd S tj||dftjd}d|d d d d df< d|d d d d df< d|d d d d df< || }|| }d \}}|dkr^ttj | }|dkrlttj | }| |||| ||| d d f< |d d d d df  |7  < |d d d d df  |7  < | |||||d!\	}}} }!}"}#}$}%}&t|%dkrd S td"dg}'td"dg}(t| jdg| j })t |%D ]1\}*}+t|+},|,| jkr|+d | j |%|*< q|,| jk r|+!| jg |,d7 },|,| jk sqt"t|%D ]}*t|%|* |%|*< qt|#dks*t|#| j#kr,d S t"| j#t|# dd#D ]}-|#!|' |$!|( |%!|) q7| j$| j%d krWd| _$n|  j$d7  _$|d d d d df  d8  < |d d d d df  d8  < |d d d d df  d8  < |d d d d df  d$  < |d d d d df  d%  < |d d d d df  d&  < |&d'}|d d d#d d d d f }.|tj'd d d d f }/|tj'd d d d f }0| &d'}1|!&d'}2|"tj'd d d d f }3t|#}#t|$}$t|%}%|.|d(< |/|d)< |0|d*< |1|d+< |2|d,< |3|d-< |%|d.< |#|d/< |$|d0< |S )1Nr   imager[   Zignore_tagsZtextsr   ru   g?g?r   r   r(   T   i   g      @   F)rn   )      ?g      ?r   g      ?g      ?g      ?ru   ru   ru   ru   ru   g?rU   r)   )ZksizeZsigmaXZsigmaYr   g     o@r*   r3   g33333^@gR]@gRY@)r   r   r   rs   r6   g(\2M@g(\L@g     L@)r)   r   r(   imagestcl_mapstcl_label_mapsborder_mapsdirection_mapstraining_masksr   r   r   )(r7   rb   r,   Zarangerk   rl   r   r   sqrtr:   r   r   ri   rz   r   rh   rr   r-   re   r   r>   ZpermutationZGaussianBlurrV   r   r9   r   r   r   r8   r
   r   r   rZ   r@   r   r   r   Z	transposer   )4r   dataZ
input_sizerm   r   Z	text_tagsr   r]   r^   ro   r_   Z
asp_scalesZ	asp_scaleZasp_wxZasp_hyZori_hZori_wr   Zrd_scaleZnew_hZnew_wZ	std_ratioZrand_scalesZrz_scaleksZ	im_paddedZdel_hZdel_wshswr   r   Z
border_mapr   r   r   r   r   Zscore_label_map_text_labelZpos_list_tempZpos_mask_tempZlabel_list_temprI   labeln__r   r   r   r   r   r   r   r   r   __call___  s2  



  

&







zPGProcessTrain.__call__)r   TFr   r   r   N)Frc   )rs   r   r*   )r   r   )r   ru   rx   )__name__
__module____qualname__r   r   r0   rK   rb   rr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r   r   r   r   r      sb    

4
V
H
Y
 !

3			
 )r   r:   numpyr,   Zskimage.morphology._skeletonizer   Z,ppocr.utils.e2e_utils.extract_textpoint_fastr   __all__objectr   r   r   r   r   <module>   s   