Giter VIP home page Giter VIP logo

brl_data_tools's Introduction

brl_data_tools

Actions Status Code Coverage CodeFactor License

Tools for handling un-labeled training images for Angelina Braille Reader

Requirements

  • Linux Ubuntu or CygWin (other: not tested)
  • Git + Git LFS
  • Python 3.8

setup

substitute python with your system's Python3.8 command (may be python3, py3, etc).

Get the source code and pre-trained weights for the neural net:

git clone --recursive https://github.com/braille-systems/brl_data_tools.git
cd brl_data_tools
wget -O AngelinaReader/weights/model.t7 http://angelina-reader.ovdv.ru/retina_chars_eced60.clr.008
mkdir data

Then download data from Kaggle (https://www.kaggle.com/valeryzuev/unlabeled-braille-photos) and unzip to data directory that you've just created.

Then set up Python virtual environment:

python -m pip install --upgrade pip
python -m pip install virtualenv
python -m venv env
source env/bin/activate # CygWin: source env/Scripts/activate
python -m pip install --upgrade pip
python -m pip install -r requirements.txt

processing data

renaming and cropping

export PYTHONPATH=.
source env/bin/activate # CygWin: source env/Scripts/activate
python scripts/rename.py
python scripts/crop.py

pseudolabeling

python AngelinaReader/run_local.py data/2_renamed data/3_pseudolabeled -l EN -o --save_dev

pre-processing text files for alignment

python scripts/preprocess_text.py
python scripts/find_regions_of_interest.py

performing alignment & calculating statistics

python scripts/needleman_wunsch.py
python scripts/postprocess_text.py

saving not corrected, but filtered pseudo-labeled samples

python scripts/split_test_train.py
python scripts/filter_by_freq.py
python scripts/split_test_train.py

semi-supervised learning

setup

cd AngelinaReader
git clone --recursive https://github.com/braille-systems/brl_ocr.git
cd ..

naive SSL

source env/bin/activate # CygWin: source env/Scripts/activate
python scripts/split_test_train.py
cd AngelinaReader
# you may want to tweak `batch_size` in model/params.py
python model/train.py

brl_data_tools's People

Contributors

zuevval avatar

Watchers

 avatar  avatar

brl_data_tools's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.