Skip to content

✏️Image text detection and Korean, English recognition model implementation in pytorch

License

Notifications You must be signed in to change notification settings

cjf8899/OCR_kor_en

Repository files navigation

OCR_kor_en

This repo is an End to End code that detection language in images and recognition Korean and English.

Demo

ocr_demo ocr_demo2

memoryblock

ocr_demo3 ocr_demo4

Getting Started

Download models

Video2img

Crop the video frame by frame and apply a morphology operation for increase the recognition rate.

memoryblock


Put your video name in video_name. (ex: ocr_test.mp4)

python video2img.py --video_name ocr_test.mp4

Also, you can use images, not video

the structures would like

~/OCR_kor_en/
    -- model
        -- craft_mlt_25k.pth
        -- classifi_97.29.pth
        -- kor_reg_97.42.pth
        -- TPS-ResNet-BiLSTM-Attn.pth
    -- sample_img
        -- your_img.jpg
    -- sample_video
        -- video_name
            -- 00000.jpg
            -- 00001.jpg
            -- 00002.jpg
            ...
        -- video_name_ori
            -- 00000.jpg
            -- 00001.jpg
            -- 00002.jpg
            ...
    -- main.py
    ....

Requirements

  • PyTorch>=0.4.1
  • torchvision>=0.2.1
  • opencv-python>=3.4.2
  • ...
pip install -r requirements.txt

Run

python main.py --test_folder ./sample_img/

or

python main.py --test_folder ./sample_video/video_name

Referenced. Thank you all:+1:

detection code : https://github.com/clovaai/CRAFT-pytorch
recognition code : https://github.com/clovaai/deep-text-recognition-benchmark
korean ocr code : https://github.com/parksunwoo/ocr_kor
aihub dataset : https://aihub.or.kr/aidata/133

About

✏️Image text detection and Korean, English recognition model implementation in pytorch

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages