a
    )ycQ                     @   s0   d dl Z d dlmZ d dlZd dlZdd ZdS )    Nc                 C   s2  t | sJ tt| }d|v s(J |dd }|d u rrt | }t ||d }t |sdJ tj	
|}ntj|}|jd d \}}||d ksJ ||d ksJ d|v sJ |d D ]h}d|v sJ d|v sJ |d D ]B\}	}
d	|	  kr|ksn J d	|
  kr$|ksn J qqd S )
NZ	imagePath	imageData   ZimageHeightZ
imageWidthZshapeslabelZpointsr   )ospexistsjsonloadopengetdirnamejoinimgvizioZimreadlabelmeutilsZimg_b64_to_arrshape)filenamedatar   
parent_dirZimg_fileZimgHWr   xy r   \/nfs/NAS7/SABIOD/METHODE/ermites/ermites_venv/lib/python3.9/site-packages/labelme/testing.pyassert_labelfile_sanity   s(    
r   )r   os.pathpathr   r   Zlabelme.utilsr   r   r   r   r   r   <module>   s   