Skip to content

braille-systems/AngelinaReader

 
 

Repository files navigation

Angelina braille reader

Actions Status Code style: black Code Coverage CodeFactor

A modification of IlyaOvodov/AngelinaReader

Requirements

  • Git with Git LFS
  • Python 3.6-3.8

Setup for development

Installation

  1. Run from the command line (MacOS / Linux / CygWin / Msys2):

    git clone --recursive https://github.com/braille-systems/AngelinaReader.git
    cd AngelinaReader
    git clone --recursive https://github.com/braille-systems/brl_ocr.git
    python -m pip install --upgrade pip
    python -m pip install virtualenv
    python -m venv env
    

    Substitute python with your system's Python3 command, which may be python, py or python3

  2. Activate a virtual environment:

    source env/bin/activate

    (on Linux/MacOs) or

    .\env\Scripts\activate

    (on Windows)

    Note: to work on this project, you need to re-activate the environment every time you restart the machine or open a new terminal session. To verify that you've successfully activated the environment, run which python (or where python on Windows). You should see <...>\AngelinaReader\env\Scripts\python.exe on Windows (and something alike on other platforms) at the top of the list.

  3. Install the dependencies:

    python -m pip install --upgrade pip
    pip install torch===1.5.0 torchvision===0.6.0 -f https://download.pytorch.org/whl/torch_stable.html
    pip install -r requirements.txt
    pip install -r model/requirements.txt
    

Running pre-trained inference

To ensure that you've done everything correctly, you may launch a pre-trained model:

wget -O weights/model.t7 http://angelina-reader.ovdv.ru/retina_chars_eced60.clr.008
python run_local.py brl_ocr\data\unlabeled\golubina\IMG_2503.JPG

Training

Execute the file: python model/train.py If you're getting CUDA errors, you may change device="cuda:0" to device="cpu" in model/params.py

This will run for a while. Results will appear under NN_results folder.

Labels

See brl_ocr/README.md#working-with-labels.

It's OK to install labelme in the same environment as other dependencies in this project.

About

Angelina Braille Reader. Braille photo -> text.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 88.9%
  • HTML 11.0%
  • Batchfile 0.1%