Error - OcropusFileNotFound default.cmodel

79 views
Skip to first unread message

jbest

unread,
Apr 19, 2012, 9:05:56 PM4/19/12
to ocr...@googlegroups.com
I'm trying to get the current code (0.5) in the repository to install and successfully recognize text. 

When I use the command "ocropus 0003.png" I get some success but ultimately the error is "ocrolib.common.OcropusFileNotFound: <OcropusFileNotFound default.cmodel>
exit 1"

Today is my first attempt to getting OCRopus installed so maybe something didn't build correctly but I saw no obvious errors. I'm on Ubuntu 11.10.
Is default.cmodel something that was supposed to be installed or do I have to generate that through training?

Thanks for any assistance,
Jason

The full output is below:
jason@BDI:~/Desktop/jbest-ocropus/jbest-ocropus$ ocropus 0003.png 
book directory _book-011042
# ocropus-preproc -o _book-011042 0003.png
=== 0003.png 1 (3300, 2560)
(3324, 2591) (3324, 2591)
# writing _book-011042/0001 (3324, 2591) (3324, 2591)
# ocropus-prast _book-011042
=== _book-011042/0001.png
# loading _book-011042/0001.bin.png
# segmenting
# writing 50 lines
# ocropus-lattices _book-011042
adding 49 files from _book-011042
added 0 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 348, in ocropus_find_file
    raise OcropusFileNotFound(fname)
ocrolib.common.OcropusFileNotFound: <OcropusFileNotFound default.cmodel>
exit 1

jbest

unread,
Apr 19, 2012, 9:52:07 PM4/19/12
to ocr...@googlegroups.com
Sorry, disregard this question. I've found at least a partial solution. 

First I discovered that I only ran ocroinst install and should have also run ocroinst packages and ocroinst dl.
The dl portion is still in process but it appears that default.cmodel won't be installed as only the following files are available in that directory:
case.fst.bz2
none.fst.bz2
uw3unlv-240-4-60-g2.cmodel.bz2
uw3unlv-240-8-40-nogeo.cmodel.bz2

I found a copy (maybe outdated?) of default.cmodel at:

Character recognition is working now I'm getting other errors at the moment (ImportError: cannot import name fstutils
) but I'll try to work though that to see if I missed anything else in the install and build process.

jbest

unread,
Apr 20, 2012, 1:03:31 PM4/20/12
to ocr...@googlegroups.com
My additional problems are the same as issue 322 (http://code.google.com/p/ocropus/issues/detail?id=322)

Stefan Heise

unread,
May 22, 2012, 9:55:40 AM5/22/12
to ocropus
Jason,

how exactly did you find out that you needed to run ocroinst packages
and ocroinst dl? I'm currently trying to get started using Ocropus and
find it very cumbersome. Did you find any installation instructions
apart from the install transcript on ocropus.org and the video on
YouTube? Apparently both don't quite match the current version of
Ocropus.
Did you make further progress? Are you successfully using Ocropus now?
Can you recommend any resources that helped you?

Cheers,
Stefan

On Apr 20, 3:52 am, jbest <jb...@brit.org> wrote:
> Sorry, disregard this question. I've found at least a partial solution.
>
> First I discovered that I only ran ocroinst install and should have also
> run ocroinst packages and ocroinst dl.
> The dl portion is still in process but it appears that default.cmodel won't
> be installed as only the following files are available in that directory:
> case.fst.bz2
> none.fst.bz2
> uw3unlv-240-4-60-g2.cmodel.bz2
> uw3unlv-240-8-40-nogeo.cmodel.bz2
>
> I found a copy (maybe outdated?) of default.cmodel at:http://code.google.com/p/ocropus/source/browse/data/?repo=ocropy&r=25...

Tom

unread,
Jun 2, 2012, 5:35:23 PM6/2/12
to ocr...@googlegroups.com
If you install ocropus 0.5, you need to download and install the character recognition models explicitly using

    ocroinst dl

Tom
Reply all
Reply to author
Forward
0 new messages