Giter Site home page Giter Site logo

chinese_character_recognition's Introduction

Chinese character recognition

Pytorch 实现中文手写汉字识别

Environment

Ubuntu: 16.04

Python: 3.5.2

PyTorch: 1.0.1 gpu

Dataset

Divide the data into train and test folders. In each folder, put the images of the same class in the same sub-folder, and label them with integers. Like this:

In this project, we use a data set from train_set, test_set. Also can download it using:

wget http://www.nlpr.ia.ac.cn/databases/download/feature_data/HWDB1.1trn_gnt.zip
wget http://www.nlpr.ia.ac.cn/databases/download/feature_data/HWDB1.1tst_gnt.zip

This dataset contains 3755 classes in total.

To process it, we use a python program from a blog.

This blog also implement recognition of this dataset, but using TensorFlow.

Usage

Run command:

python3 chinese_character_rec.py [option] [param]

where options and params are:

options type default help chiose
--root type=str default='/home/XXX/data' help='path to data set'
--mode type=str default='train' choices=['train', 'validation', 'inference']
--log_path type=str default=os.path.abspath('.') + '/log.pth' help='dir of checkpoints'
--restore' type=bool default=True help='whether to restore checkpoints'
--batch_size' type=int default=16 help='size of mini-batch'
--image_size' type=int default=64 help='resize image'
--epoch' type=int default=100
--num_class' type=int default=100 choices=range(10, 3755)

Specific indroduction

See: https://blog.csdn.net/qq_31417941/article/details/97915035

chinese_character_recognition's People

Contributors

chenyr0021 avatar

Watchers

 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.