Skip to content

AniketGurav/hebrew_word_spotting_using_siamese_network

 
 

Repository files navigation

hebrew_word_spotting_using_siamese_network

Installations for running keras-tensoflow on GPU

  1. Upgrade pip and install opencv2
cd ~
pip install --upgrade pip
pip install opencv-python
  1. Upgrade keras and set tensorflow background
pip uninstall keras
pip install keras==2.1.2
pip uninstall python-dateutil
pip install python-dateutil
vi ~/.keras/keras.json
  {
    "backend": "tensorflow",
    "image_data_format": "channels_last",
    "floatx": "float32",
    "epsilon": 1e-07
  }
  1. Uninstall tensorflow and install tensorflow-gpu which is necessary to run on GPU
pip uninstall tensorflow
pip install tensorflow-gpu==1.2
  1. Run python on a specific GPU
import os
os.environ["CUDA_VISIBLE_DEVICES"]="2"

How to run the project

  1. Download the Pinkas dataset
  2. Balance train set at 30 samples
python3 balance_train.ipynb
  1. Train siamese network on 100 same pairs and 100 different pairs from each class
pinkas_siamese_random_pairs.ipynb
  1. Train siamese network on hard pairs
pinkas_siamese_hard_pairs.ipynb

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 99.9%
  • Python 0.1%