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

ocropus-gpageseg ERROR less than --minscale #241

Closed
wanghaisheng opened this Issue Sep 13, 2017 · 4 comments

Comments

Projects
None yet
4 participants
@wanghaisheng
Copy link

wanghaisheng commented Sep 13, 2017

docker@93498577c7b6:~/pic$  ocropus-gpageseg  --csminheight 100000 --usegauss -n   a90c158fjw1ekmiqfxt4fj20dc0hsdif.nrm.png
INFO:  
INFO:  ########## /usr/local/bin/ocropus-gpageseg --csminheight 100000 --usega
INFO:  
INFO:  a90c158fjw1ekmiqfxt4fj20dc0hsdif.nrm.png
INFO:  scale 8.485281
ERROR:  a90c158fjw1ekmiqfxt4fj20dc0hsdif.nrm.png: scale (8.48528) less than --minscale; skipping

when explictly set minscale ,it still

docker@93498577c7b6:~/pic$  ocropus-gpageseg  --csminheight 100000 --usegauss -n   a90c158fjw1ekmiqfxt4fj20dc0hsdif.bin.png --minscale 5.0
INFO:  
INFO:  ########## /usr/local/bin/ocropus-gpageseg --csminheight 100000 --usega
INFO:  
INFO:  a90c158fjw1ekmiqfxt4fj20dc0hsdif.bin.png
INFO:  scale 8.485281
INFO:  computing segmentation
INFO:  computing column separators
INFO:  considering at most 3 whitespace column separators
INFO:  computing lines
INFO:  propagating labels
INFO:  spreading labels
INFO:  number of lines 56
INFO:  finding reading order
INFO:  writing lines
Traceback (most recent call last):
  File "/usr/local/bin/ocropus-gpageseg", line 443, in safe_process1
    process1(job)
  File "/usr/local/bin/ocropus-gpageseg", line 425, in process1
    ocrolib.write_page_segmentation("%s.pseg.png"%outputdir,segmentation)
  File "/usr/local/lib/python2.7/dist-packages/ocrolib/toplevel.py", line 213, in argument_checks
    raise e
CheckWarning: 
CheckWarning for argument image of function <function write_page_segmentation at 0x7fa58b611410>
<ndarray-7fa58b5c22b0 (640, 480) int32 [0,65586]> of type <type 'numpy.ndarray'>: expect a page image (larger than 600x600)(This can happen occasionally during normal operations and isn't necessarily a bug or problem.)


a90c158fjw1ekmiqfxt4fj20dc0hsdif nrm

@wanghaisheng wanghaisheng changed the title <ndarray-7fa58b5c22b0 (640, 480) int32 [0,65586]> of type <type 'numpy.ndarray'>: expect a page image (larger than 600x600)(This can happen occasionally during normal operations and isn't necessarily a bug or problem.) ocropus-gpageseg ERROR less than --minscale Sep 13, 2017

@Sultan91

This comment has been minimized.

Copy link

Sultan91 commented Nov 16, 2017

Same problem

@Sultan91

This comment has been minimized.

Copy link

Sultan91 commented Dec 25, 2017

You can re-set values fed as arguments by adding this code to ocropus-gpageseg file

class Namespace:
    def __init__(self, **kwargs):
        self.__dict__.update(kwargs)

args = Namespace(
    blackseps=False,
    csminaspect=1.1,
    csminheight=10, 
    debug=False, 
    expand=3, 
    files=[], 
    gray=True, 
    hscale=1.0, 
    maxcolseps=3, 
    maxlines=300, 
    maxseps=0, 
    minscale=8.3, 
    nocheck=True, 
    noise=8, 
    pad=3, 
    parallel=0, 
    quiet=False, 
    scale=0.0, 
    sepwiden=10, 
    threshold=0.2, 
    usegauss=False, 
    vscale=1.0)
@zuphilip

This comment has been minimized.

Copy link
Collaborator

zuphilip commented Dec 25, 2017

@wanghaisheng The second error ... expect a page image (larger than 600x600) should be fixed after merging #220. Please update to the newest version and try it again.

@zuphilip zuphilip closed this Feb 20, 2018

@alexmititelu

This comment has been minimized.

Copy link

alexmititelu commented Nov 27, 2018

Has someone recently encountered this problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.