hagerwang / png-mask-to-yolo-txt

Convert png mask segmentation labels to yolo txt format 将png掩码mask转换为yolo的txt格式
MIT License
10 stars 0 forks source link

bug #3

Open AMSSN opened 2 months ago

AMSSN commented 2 months ago

img_temp = img_current # 1.if you use this

img_temp = copy.deepcopy(img_current) # 3.so we use the deepcopy img_temp = np.uint8(img_temp) img_temp[img_temp != label_id] = 0 # 2.there will cover the img_temp, and cover the img_current, in next loop, the data will be changed

in "mask2txt_custom.py" line 31-33

hagerwang commented 2 hours ago

I didn’t notice it before, but you’re right. Thank you for your correction.

img_temp = img_current # 1.if you use this

img_temp = copy.deepcopy(img_current) # 3.so we use the deepcopy

img_temp = np.uint8(img_temp) img_temp[img_temp != label_id] = 0 # 2.there will cover the img_temp, and cover the img_current, in next loop, the data will be changed in "mask2txt_custom.py" line 31-33