guchengxi1994 / mask2json

a small tool for image augmentation, including mask files to json/xml files , image augmentation(flip,rotation,noise,...) and so on
Apache License 2.0
57 stars 11 forks source link

Image Binarization issue #14

Closed guchengxi1994 closed 2 years ago

guchengxi1994 commented 4 years ago

sometimes i convert a img to a binary image , the boundray of each area is not binary(see https://github.com/guchengxi1994/mask2json/blob/test/static/issue.png),which will result in some errors when convert masks to xmls .

code can be found here: https://github.com/guchengxi1994/mask2json/blob/test/convertmask/utils/xml2mask/x2m.py line 117

io.imsave(parentpath+os.sep+'mask'+os.sep+fileName+'.jpg',np.array(mask_img/np.max(mask_img)*255,dtype=np.uint8))

github-actions[bot] commented 2 years ago

This issue is stale because it has been open for 14 days with no activity.

github-actions[bot] commented 2 years ago

This issue was closed because it has been inactive for 7 days since being marked as stale.