Overview

Installations for running keras-theano on GPU

  1. Upgrade pip and install opencv2
cd ~
pip install --upgrade pip
pip install opencv-python
  1. Upgrade keras and set theano background
pip uninstall keras
pip install keras
vi ~/.keras/keras.json
  {
    "backend": "theano",
    "image_data_format": "channels_first",
    "floatx": "float32",
    "epsilon": 1e-07
  }
  1. Upgrade theano
pip uninstall theano
pip install theano==1.0.1
  1. Install pygpu which is necessary to run theano on GPU
git clone https://github.com/Theano/libgpuarray.git
cd libgpuarray
mkdir Build
cd Build
cmake .. -DCMAKE_BUILD_TYPE=Release
make
make install
cd ..
python3 setup.py build_ext -L /root/libgpuarray/lib -I /root/libgpuarray/include
python3 setup.py install
sudo ldconfig
  1. Run python on a specific GPU
THEANO_FLAGS=device=cuda0 python3

How to run the project

  1. Download challenging text line dataset

  2. Preprocess

python3 preprocess.py
  1. Train
THEANO_FLAGS=device=cuda0 python3
  1. Predict
python3 SlidingPredictor.py
  1. Postprocess
python3 directional_morphing.py
You might also like...
Comments
  • Performance metrics

    Performance metrics

    First of all thank you for the paper and codes on github. I read the paper but could not understand the performance metrics. Could you please explain more clearly the statements precision and recall? Or can you share your code for precision and recall measurement? Thank you again.

    opened by alperdemir03 2
Owner
Berat Kurar Barakat
Berat Kurar Barakat