Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wwwmmmqqq opened this issue Dec 28, 2019 · 6 comments
Open

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

wwwmmmqqq opened this issue Dec 28, 2019 · 6 comments

Comments

@wwwmmmqqq
Copy link

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!

@hfslyc
Copy link
Owner

hfslyc commented Jan 16, 2020

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

@xysaber
Copy link

xysaber commented Jan 19, 2020

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

@lxtGH
Copy link

lxtGH commented Mar 11, 2020

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

@cg126
Copy link

cg126 commented Feb 24, 2021

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

@aoaoaoaoa
Copy link

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

@Abalizzw
Copy link

Abalizzw commented Mar 4, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants