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

Add instructions for installing ocropy into a virtualenv #29

Merged
merged 2 commits into from
Mar 16, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,24 @@ ocropy

Python-based OCR package using recurrent neural networks.

To install, use:
To install OCRopus dependencies system-wide:

$ sudo apt-get install $(cat PACKAGES)
$ wget -nd http://www.tmbdev.net/en-default.pyrnn.gz
$ mv en-default.pyrnn.gz models/
$ sudo python setup.py install

Alternatively, dependenices can be installed into a [Python Virtual Environment]
(http://docs.python-guide.org/en/latest/dev/virtualenvs/):

$ virtualenv ocropus_venv/
$ source ocropus_venv/bin/source
$ pip install -r requirements_1.txt
# tables has some dependencies which must be installed first:
$ pip install -r requirements_2.txt
$ wget -nd http://www.tmbdev.net/en-default.pyrnn.gz
$ mv en-default.pyrnn.gz models/

To test the recognizer, run:

$ ./run-test
Expand Down
2 changes: 1 addition & 1 deletion ocropus-dewarp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python

import random as pyrandom
import re
Expand Down
2 changes: 1 addition & 1 deletion ocropus-econf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import warnings,numpy,argparse,sys,os,os.path,multiprocessing,codecs
Expand Down
2 changes: 1 addition & 1 deletion ocropus-errs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import argparse,sys,os,os.path,multiprocessing
Expand Down
2 changes: 1 addition & 1 deletion ocropus-gpageseg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python

# TODO:
# ! add option for padding
Expand Down
2 changes: 1 addition & 1 deletion ocropus-gtedit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python

from pylab import *
import argparse,codecs,re,os.path,ocrolib,base64
Expand Down
2 changes: 1 addition & 1 deletion ocropus-hocr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python

import __builtin__ as python
import random as pyrandom
Expand Down
2 changes: 1 addition & 1 deletion ocropus-linegen
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# vim: set fileencoding=utf8 :

import random as pyrandom
Expand Down
2 changes: 1 addition & 1 deletion ocropus-lpred
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python

import random as pyrandom
import re
Expand Down
2 changes: 1 addition & 1 deletion ocropus-ltrain
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python

import random as pyrandom
import re
Expand Down
2 changes: 1 addition & 1 deletion ocropus-nlbin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python

from pylab import *
from numpy.ctypeslib import ndpointer
Expand Down
2 changes: 1 addition & 1 deletion ocropus-rpred
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python

import traceback
import codecs
Expand Down
4 changes: 1 addition & 3 deletions ocropus-rtrain
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#!/usr/bin/python

#import sys;sys.path.append('/home/tmb/github/ocropy/clstm')
#!/usr/bin/env python

import random as pyrandom
import re
Expand Down
2 changes: 1 addition & 1 deletion ocropus-visualize-results
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python

import glob
import matplotlib
Expand Down
7 changes: 7 additions & 0 deletions requirements_1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
numpy>=1.9.2
scipy>=0.15.1
matplotlib>=1.4.3
beautifulsoup4>=4.3.2
numexpr>=2.4
Cython>=0.22
Pillow>=2.7.0
1 change: 1 addition & 0 deletions requirements_2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tables>=3.1.1