How to use ocropus-rtrain

279 views
Skip to first unread message

Wesley Willians

unread,
Feb 26, 2014, 4:50:57 PM2/26/14
to ocr...@googlegroups.com
Hi folks,

I'm starting using ocropus this week, and I would like to train it to understand a pattern..

I have the images and the *.gt.txt files with the expected result.

I run exactly as manual said, but, i can see the param -s no longer exists, so I tried in many different ways and could succeed.
 
Have a look some examples i've been trying..

ocropus-rtrain P1.jpg -o result.txt

# inputs 1

# tests None

import ocrolib.lineest

# CenterNormalizer

# using default codec

# charset size 157 Traceback (most recent call last):

  File "/usr/local/bin/ocropus-rtrain", line 121, in <module>

    print "["+"".join(charset)+"]"

UnicodeEncodeError: 'ascii' codec can't encode characters in position 96-155: ordinal not in range(128)


When i use the -c 'UTF-8', i get the result:

# inputs 1

# tests None

import ocrolib.lineest

# CenterNormalizer

# building codec

Traceback (most recent call last):

  File "/usr/local/bin/ocropus-rtrain", line 106, in <module>

    for fname in ocrolib.glob_all(args.codec):

  File "/usr/local/lib/python2.7/dist-packages/ocrolib/toplevel.py", line 215, in argument_checks

    result = f(*args,**kw)

  File "/usr/local/lib/python2.7/dist-packages/ocrolib/common.py", line 626, in glob_all

    raise Exception("%s: expansion did not yield any files"%arg)

Exception: U: expansion did not yield any files


Any help?


All the best.

Reply all
Reply to author
Forward
0 new messages