Giter Club home page Giter Club logo

emnist-pytorch's Introduction

emnist-pytorch

Handwritten character recognition using Pytorch and EMNIST

Environment and prerequisites

Create a conda environment with the packages listed in environment.yml.

To create an environment with the configuration from environment.yml, use the following command:

conda env create -f environment.yml

A new conda environment called "emnist" will be created.

Activate the conda environment:

conda activate emnist

Data preparation

The emnist handwritten character recornition dataset will be automatically downloaded by the code and the data will be organized into appropriate folder for pytorch to access.

It may take some minutes (~30) to organize the data. As an alternative, you can download the organized data zip file from https://drive.google.com/drive/folders/1JLE0kz9ctZ4HI2vA6gZbec1MY1so5QLK?usp=sharing (download size = ~420 MB, after extraction = 3.2 GB) and extract it in the folder ./data/emnist.

The data directory should have the following structure:

./data/emnist
   - train
      - 0/<images>
      - 1/<images>
      ...

   - test
      - 0/<images>
      - 1/<images>
      ...

Training and Testing

To train and test, run the following:

cd src/
python doall.py

The checkpoints are saved under the folder ./scratch/.

Demo

Demo notebook with a trained checkpoint is here: https://github.com/InnovArul/emnist-pytorch/blob/master/demos/character_recognition_demo.ipynb

Credits

Imbalanced Data Sampler is copied from https://github.com/ufoym/imbalanced-dataset-sampler

emnist-pytorch's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

brighthaozi

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.