AdvSemiSeg icon indicating copy to clipboard operation
AdvSemiSeg copied to clipboard

AttributeError: 'NoneType' object has no attribute 'shape'

Open wwwmmmqqq opened this issue 4 years ago • 6 comments

File "D:\workspace\AdvSemiSeg\dataset\voc_dataset.py", line 56, in getitem img_h, img_w = label.shape AttributeError: 'NoneType' object has no attribute 'shape'

Can you help me? I tried some ways,but it still has errors.Thank you!

wwwmmmqqq avatar Dec 28 '19 12:12 wwwmmmqqq

This is likely due to errors from reading images. Please make sure you have the dataset in place

hfslyc avatar Jan 16 '20 23:01 hfslyc

This is likely due to errors from reading images. Please make sure you have the dataset in place

hello,i face the same issue and don't know the reason,my dataset are corrected putted in the right place and it still occured the problem

xysaber avatar Jan 19 '20 08:01 xysaber

this error is dut to the wrong path of your ground truth labels which can not be loaded by opencv.

lxtGH avatar Mar 11 '20 05:03 lxtGH

i meet the problem too,but did download SegmentationClassAug and placed it in AdvSemiSeg/dataset/VOC2012/JPEGImages/.how can solve this please?

cg126 avatar Feb 24 '21 07:02 cg126

You should put the folder “SegmentationClassAug“” under the “dataset/VOC2012/” path

aoaoaoaoa avatar Mar 04 '21 03:03 aoaoaoaoa

I fixed this problem by changing something else. In dataset/voc_list/ the contents of the text files need to have the same format, for example they all have the line feed in the final line.

Abalizzw avatar Mar 04 '21 11:03 Abalizzw