Git Product home page Git Product logo

integer_convert's Introduction

Integer_convert

  • This project recognizes Chinese characters in a image file and convert them into Arabic numerals
    Check demo.ipynb for the whole process
  • Now the seperation is done with simple matrix multiplication labeling. To handle rotated input, use Spectral Clustering for number seperation. Define the similarity matrix with gaussian kernal and run the K-mean on the eigenspace.

Prerequisites

Pytorch
OpenCV
torchvision

Example

label 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
Chinese Character 亿
numeral 0 1 2 3 4 5 6 7 8 9 10 100 1000 10000 10-e8
  • Original photo

Screen Shot 2020-10-17 at 12 35 32 AM

  • After process

Screen Shot 2020-10-17 at 12 35 56 AM

Screen Shot 2020-10-17 at 12 36 06 AM

Screen Shot 2020-10-17 at 12 36 15 AM

Training Dataset

Chinese MNIST

Files

  • demo.ipynb a example to show how the program works.
  • src/
    • model.py Defination of class IntRec, the model trained to convert chinese character to Arabic numerals.
    • utils.py
      • Implementation of DataLoader, which load image files from dataset into tensor of shape
        [batch, channel, height, width] along with groundtruth label
      • HelperFunc a class of helper function to extract single characters from each image
    • train.py traning loops for the model, aumomatically use cuda if availiable. Tracking training and validation accuracy in train_acc.pickle and valid_acc.pickle
  • data/ containing training data images and a csv file chinese_mnist.csv, which contains paths to images and labels.
  • pictures/ the program will read image files from this folder and produce prediction

Author

  • Chen Li - Initial work -

integer_convert's People

Contributors

cchenli avatar

Stargazers

 avatar Leo avatar

Watchers

James Cloos avatar  avatar

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.