# OCR-tf2 **Repository Path**: darkyu/OCR-tf2 ## Basic Information - **Project Name**: OCR-tf2 - **Description**: this project implements text area detection and OCR - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-05-28 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # OCR-tf2 this project implements text area detection and OCR ## download the dataset for text area detection download the dataset prepared by the author of the paper "Detecting Text in Natural Image with Connectionist Text Proposal Network" [here](https://pan.baidu.com/s/1nbbCZwlHdgAI20_P9uw9LQ) ## create dataset for text area detection create with the following command ```bash python3 create_dataset.py ``` ## train the text area detector train with the following command ```bash python3 train.py ctpn ``` when the training process finishes, it will save the parameters in hdf5 format automatically. if you interrupt the training process, you can save the model with the following command ```bash python3 save_model.py ctpn ``` ## test the text area detector test the detector with ```bash python3 TextDetector.py ``` ## text area detection results here are some results of my model which is enclosed at model/ctpn.h5 .

Loss
train loss

Detection results

## train the ocr the OCR part of the project is an implement of CRNN introduced in paper "An End-to-End Trainable Neural Network for Image-based Sequence Recognition and Its Application to Scene Text Recognition" . train the model with the following command ```bash python3 train.py ocr ``` save the trained model with command ```bash python3 save_model.py ocr ```