About this project
EasyOCR is an open-source optical character recognition (OCR) library designed to be ready to use out of the box. According to its README, it supports more than 80 languages and all popular writing scripts, including Latin, Chinese, Arabic, Devanagari and Cyrillic.
Installation is done via pip (`pip install easyocr`), and a Dockerfile is also provided. On Windows, users are advised to install PyTorch and torchvision first. Model weights for selected languages are downloaded automatically or can be placed manually in the `~/.EasyOCR/model` folder.
The basic Python usage loads a reader once and then processes images:
```python
import easyocr
reader = easyocr.Reader(['ch_sim','en'])
result = reader.readtext('chinese.jpg')
```
Output is a list of items, each containing a bounding box, the detected text and a confidence score. A `detail=0` option returns just the recognized strings. Inputs can be file paths, OpenCV/numpy image objects, image bytes, or a URL to a raw image. CPU-only mode is available with `gpu=False`. A command-line interface is also included, for example `easyocr -l ch_sim en -f chinese.jpg --detail=1 --gpu=True`.
The README notes that multiple languages can be passed at once, though not all combinations are compatible; English is described as compatible with every language, and languages sharing common characters are usually compatible with each other.
Under the hood, detection uses the CRAFT algorithm and recognition uses a CRNN composed of feature extraction (ResNet/VGG), sequence labeling (LSTM) and CTC decoding, all executed with PyTorch. The project acknowledges several upstream research repositories and papers. Users can train or use their own recognition and detection models, with documentation linked for both.
The roadmap mentions planned handwritten text support and a restructuring to allow swappable detection and recognition algorithms. Contributions are welcomed through pull requests, issue reports and language additions; adding a new language requires character and dictionary files. The README also notes that issues older than six months may be closed automatically, and that enterprise support is offered by Jaided AI.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.