Code Monkey home page Code Monkey logo

ucr's Introduction

A Unified Character-Radical Dual-Supervision Framework for Accurate Chinese Character Recognition with Zero-Shot Learning Support

The official code of UCR (under review).

UCR effectively incorporate character- and radical-based Chinese character recognition approaches in a unified frawmework. Our proposed framework consists of three parts, including a character recognition module (CRM), a radical recognition module (RRM), and a confidence-based predictor module (CPM), which CRM performs character-based CCR, RRM performs radical-based CCR, and CPM integrates the predictions from two modules. Additionally, two custom modules (global feature aggregation and character feature reconstruction) are devised for different purposes in CRM and RRM, respectively. More importantly, we devise a dual supervision mechanism between CRM and RRM. The first supervision builds the cross-modal correspondences between the visual character features and the textual radical features, while the second supervision pulls the reconstructed character feature closer to the holistic feature.

Requirements

pip install -r requirements.txt

Training

You can train the UCR by this command: python train.py --gpu 0 -p 1500 --dataset <dataset_name> --data_root <your data path> --batch_size 64

Evaluation

Get the pretrained weights from BaiduNetdisk(passwd:rb9g). Two Chinese character Recognition competitions show the strength of our method:

The recognition results of these two datasets are saved in ./files/ctw-test and ./files/rects-test.

To evalute this method, you need prepare the test data according to the tutorial from the competition page, then you need download the pretrained weights and save it in ./checkpoint, finally, run the test command:

python ctw-test.py --gpu 0 --batch_size 1

or

python rects-test.py --gpu 0 --batch_size 1

ucr's People

Contributors

pandarenlql avatar

Stargazers

 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.