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

Segmentation.py [AttributeError: 'NoneType' object has no attribute 'shape'] #3

Closed
ghost opened this issue Sep 20, 2018 · 1 comment

Comments

@ghost
Copy link

ghost commented Sep 20, 2018

@watersink Thank you for your hard work

I have successfully trained a new model using train_test.py.
ocrseg.ckpt-200.zip

But when using my model for segmentation, an error message appears:

home@home-lnx:~/ocrsegment$ python3 segmentation.py 
Traceback (most recent call last):
  File "segmentation.py", line 444, in <module>
    lines = seg.extract_textlines(image)
  File "segmentation.py", line 425, in extract_textlines
    if len(image.shape)!=2:
AttributeError: 'NoneType' object has no attribute 'shape'
@ghost
Copy link
Author

ghost commented Sep 20, 2018

I figured it out.
It was caused because segmentation.py line 443 had the wrong image name.
Change W1P0.png to W001.png

@ghost ghost closed this as completed Sep 20, 2018
This issue was closed.
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

0 participants