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' #12

Open
sakshamjindal07 opened this issue May 15, 2017 · 5 comments
Open

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

sakshamjindal07 opened this issue May 15, 2017 · 5 comments

Comments

@sakshamjindal07
Copy link

Downloaded the dataset but still facing the Error : "AttributeError: 'NoneType' object has no attribute 'shape' "

@timonsku
Copy link

Having the same issue here. How did you solve this @sakshamjindal07 ?

@sakshamjindal07
Copy link
Author

@PTS93, this issue comes up because your code POC.py does not recognise the captured frame. Tweak the code a little bit to see if it recognises the image or not. Remind me in 2 days, I will let you know. I am travelling right now.

@RBirkeland
Copy link

RBirkeland commented Sep 19, 2017

@sakshamjindal07 Hey, could you please share your solution, I'm also facing the same issue.
I've rewritten the manual_poc.py file to take a dir path as a parameter and use that for predicting. Some images work, but some throw this error.##

EDIT: I've solved the issue. In my case it was a complete path issue. Make sure that the line files.append(f) in manual_poc.py adds the full path. For me I manually added the directory structure to the file files.append(str(path) + f)

@SeptBlast
Copy link

@sakshamjindal07 and @RBirkeland you both are missing out few basic elements to be kept while fetching data to train a machine that's why you are facing this error again and again.

Hint: Define Attributes and the frame according to your training Data you had downloaded from Keggler. POC.py needs to be edited according to the raw training data.

@Ipvikukiepki-KQS
Copy link

I hope that this information might be useful.
This error occurs possibly under two conditions, either cv2.imread() or else cv2.video_capture()
In case of error due to cv2.imread(), specify the path file of an Image for which poc must be shown. 'None' is returned as there are no image. I have solved this issue by this method.

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

5 participants