You're checking out the tip, not 0.5.4. The tip is currently broken (I'm working on it).
To check out 0.5.4, use hg clone -r ocropus-0.5.4 https://code.google.com/p/ocropus Tom On Monday, July 23, 2012 7:55:21 PM UTC+2, c.kruk wrote: > > I installed and tried ocropus for the first time. Unfortunately I > encountered an error that causes the invalid work of the program. > > First I downloaded the sources: > > hg clone https://code.google.com/p/ocropus > > According to .hgtags file I guess it’s ocropus 0.5.4. > > The program changed a lot recently so the ./ocroinst packages, ./ > ocroinst install, ./ocroinst dl procedure described in the > documentation doesn’t work because there’s no ocroinst script. Instead > there are ocropus-install and ocropus-uninstall scripts. > > So I started the first one: > > # ./ocropus-install > > Among the other things it installed a lot of packages, downloaded > space.model.bz2, eng-5.ngraphs.bz2, and uw3unlv-240-4-60-g2.cmodel.bz2 > packages, and processed flann-1.7.1 package. The compilation and the > installation of all programs finished successfully. > > I registered the required directories in the appropriate variables: > > $ echo $PATH > /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/ > games > > $ echo $LD_LIBRARY_PATH > /usr/local/lib > > Then I started the test of the program: > > $ ocropus ocropy/tests/alice.png > # gcc -g -O4 -lm -shared -fopenmp -std=c99 -fPIC .pynative/ > 71e70aafcf483a202213ffcc1b1bf0c1.c -o .pynative/ > 71e70aafcf483a202213ffcc1b1bf0c1.so > book directory _book-003056 > ocropy/tests/alice.png -> _book-003056/0001.png > === preprocess > ['ocropus-nlbin', '_book-003056/0001.png'] > _book-003056/0001.png lo-hi (0.00 1.00) angle 0.0 no-normalization > > === page segmentation > ['ocropus-gpageseg', '_book-003056/0001.png'] > _book-003056/0001.png > 10 _book-003056/0001.png 19.0 11 > > === line recognition > ['ocropus-lattices', '-m', 'uw3unlv-240-4-60-g2.cmodel', > '_book-003056/0001/01000a.png', '_book-003056/0001/010003.png', > '_book-003056/0001/010007.png'] > ['ocropus-lattices', '-m', 'uw3unlv-240-4-60-g2.cmodel', > '_book-003056/0001/010001.png', '_book-003056/0001/010005.png', > '_book-003056/0001/010009.png'] > ['ocropus-lattices', '-m', 'uw3unlv-240-4-60-g2.cmodel', > '_book-003056/0001/01000b.png', '_book-003056/0001/010004.png', > '_book-003056/0001/010008.png'] > ['ocropus-lattices', '-m', 'uw3unlv-240-4-60-g2.cmodel', > '_book-003056/0001/010002.png', '_book-003056/0001/010006.png'] > added 3 files directly > added 3 files directly > added 2 files directly > added 3 files directly > Traceback (most recent call last): > File "/usr/local/bin/ocropus-lattices", line 82, in <module> > cmodel = > ocrolib.load_component(ocrolib.ocropus_find_file(options.model)) > File "/usr/local/lib/python2.7/dist-packages/ocrolib/common.py", > line 871, in load_component > return pickle.load(stream) > File "/usr/local/lib/python2.7/dist-packages/llpy/__init__.py", line > 3, in <module> > import csclass > File "/usr/local/lib/python2.7/dist-packages/llpy/csclass.py", line > 69, in <module> > import variants > File "/usr/local/lib/python2.7/dist-packages/llpy/variants.py", line > 12, in <module> > from ocrolib import docproc,improc > ImportError: cannot import name docproc > Traceback (most recent call last): > File "/usr/local/bin/ocropus-lattices", line 82, in <module> > cmodel = > ocrolib.load_component(ocrolib.ocropus_find_file(options.model)) > File "/usr/local/lib/python2.7/dist-packages/ocrolib/common.py", > line 871, in load_component > Traceback (most recent call last): > Traceback (most recent call last): > File "/usr/local/bin/ocropus-lattices", line 82, in <module> > cmodel = > ocrolib.load_component(ocrolib.ocropus_find_file(options.model)) > File "/usr/local/lib/python2.7/dist-packages/ocrolib/common.py", > line 871, in load_component > File "/usr/local/bin/ocropus-lattices", line 82, in <module> > cmodel = > ocrolib.load_component(ocrolib.ocropus_find_file(options.model)) > File "/usr/local/lib/python2.7/dist-packages/ocrolib/common.py", > line 871, in load_component > return pickle.load(stream) > File "/usr/local/lib/python2.7/dist-packages/llpy/__init__.py", line > 3, in <module> > import csclass > File "/usr/local/lib/python2.7/dist-packages/llpy/csclass.py", line > 69, in <module> > return pickle.load(stream) > File "/usr/local/lib/python2.7/dist-packages/llpy/__init__.py", line > 3, in <module> > import variants > File "/usr/local/lib/python2.7/dist-packages/llpy/variants.py", line > 12, in <module> > import csclass > File "/usr/local/lib/python2.7/dist-packages/llpy/csclass.py", line > 69, in <module> > return pickle.load(stream) > File "/usr/local/lib/python2.7/dist-packages/llpy/__init__.py", line > 3, in <module> > from ocrolib import docproc,improc > ImportErrorimport variants > File "/usr/local/lib/python2.7/dist-packages/llpy/variants.py", line > 12, in <module> > : cannot import name docproc > import csclass > from ocrolib import docproc,improc > File "/usr/local/lib/python2.7/dist-packages/llpy/csclass.py", line > 69, in <module> > ImportError: cannot import name docproc > import variants > File "/usr/local/lib/python2.7/dist-packages/llpy/variants.py", line > 12, in <module> > from ocrolib import docproc,improc > ImportError: cannot import name docproc > > === language modeling > > > <?xml version="1.0" encoding="UTF-8"?> > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> > <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> > <head> > <title>OCR Results</title> > <meta name="Description" content="OCRopus Output" /> > <meta name="ocr-system" content="ocropus-0.4" /> > <meta name="ocr-capabilities" content="ocr_line ocr_page" /> > </head> > <body> > > <div class='ocr_page' title='file _book-003056/0001.png'> > _book-003056/0001/010001.txt: no such file > _book-003056/0001/010002.txt: no such file > _book-003056/0001/010003.txt: no such file > _book-003056/0001/010004.txt: no such file > _book-003056/0001/010005.txt: no such file > _book-003056/0001/010006.txt: no such file > _book-003056/0001/010007.txt: no such file > _book-003056/0001/010008.txt: no such file > _book-003056/0001/010009.txt: no such file > _book-003056/0001/01000a.txt: no such file > _book-003056/0001/01000b.txt: no such file > </div> > > </body> > </html> > > As a result ocropus doesn’t create any *.txt file. It seems to me that > the cause of such a behavior of the program is the lacking ocropy/ > ocrolib/docproc.py source file. There’s no docproc.py file in the /usr/ > local/lib/python2.7/dist-packages/ocrolib > directory as well. > > Any help will be welcomed. > -- You received this message because you are subscribed to the Google Groups "ocropus" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msg/ocropus/-/6Js6fV1U4XIJ. For more options, visit https://groups.google.com/groups/opt_out.
