Giter VIP home page Giter VIP logo

korean_ocr_using_paddleocr's Introduction

Korean OCR using paddleOCR

This is a Korean OCR Python code using the paddleOCR library

Requirements

  • Python 3.7+
  • paddlepaddle
  • paddleocr

You can install it from PyPI:

pip install paddlepaddle # for gpu user please install paddlepaddle-gpu
pip install paddleocr

PaddleOCR

Awesome multilingual OCR toolkits based on PaddlePaddle (practical ultra lightweight OCR system, support 80+ languages recognition, provide data annotation and synthesis tools, support training and deployment among server, mobile, embedded and IoT devices)

This repository is simply configured for PaddleOCR functionality and inspection. If you want to check out the various features of paddleOCR, please refer to the paddleOCR repository.

from main import MyPaddleOCR
 
ocr = MyPaddleOCR()

지원 가능한 언어 목록을 조회하는 기능입니다.

ocr.get_available_langs()

Output :

Available Language : ['ch', 'en', 'korean', 'japan', 'chinese_cht', 'ta', 'te', 'ka', 'latin', 'arabic', 'cyrillic', 'devanagari', 'french', 'german', 'structure']

사용가능한 Model을 조회하는 기능입니다.

ocr.get_available_models()

Output :

#1 Model Vesion : [PP-OCRv3] - Language : ['ch', 'en', 'korean', 'japan', 'chinese_cht', 'ta', 'te', 'ka', 'latin', 'arabic', 'cyrillic', 'devanagari']
#2 Model Vesion : [PP-OCRv2] - Language : ['ch']
#3 Model Vesion : [PP-OCR] - Language : ['ch', 'en', 'french', 'german', 'korean', 'japan', 'chinese_cht', 'ta', 'te', 'ka', 'latin', 'arabic', 'cyrillic', 'devanagari', 'structure']

OCR (Optical Character Recognition)

img_path = 'assets/images/test_image_3.jpg'
ocr.run_ocr(img_path, debug=True)

Output :

[2023/07/06 00:10:29] ppocr DEBUG: dt_boxes num : 4, elapse : 0.8806350231170654
[2023/07/06 00:10:29] ppocr DEBUG: rec_res num  : 4, elapse : 0.25487518310546875
['아래한글', '한글문서', '디자인', '202204']

korean_ocr_using_paddleocr's People

Contributors

yunwoong7 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

korean_ocr_using_paddleocr's Issues

UnboundLocalError: local variable 'font' referenced before assignment

UnboundLocalError Traceback (most recent call last)
in <cell line: 7>()
5 ocr.get_available_models()
6 img_path = 'assets/images/test_image_1.jpg'
----> 7 ocr.run_ocr(img_path, debug=True)

2 frames
/content/korean_ocr_using_paddleOCR/utils/image_util.py in put_text(image, text, x, y, color, font_size)
54 font = 'malgun.ttf'
55
---> 56 image_font = ImageFont.truetype(font , font_size)
57 font = ImageFont.load_default()
58 draw = ImageDraw.Draw(image)

UnboundLocalError: local variable 'font' referenced before assignment

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.