open-mmlab / mmocr

OpenMMLab Text Detection, Recognition and Understanding Toolbox
https://mmocr.readthedocs.io/en/dev-1.x/
Apache License 2.0
4.18k stars 735 forks source link
abcnet abinet crnn dbnet deep-learning fcenet key-information-extraction maskrcnn ocr pan panet psenet pytorch sar sdmg-r segmentation-based-text-recognition spts svtr text-detection text-recognition
 
OpenMMLab website HOT      OpenMMLab platform TRY IT OUT
 
[![build](https://github.com/open-mmlab/mmocr/workflows/build/badge.svg)](https://github.com/open-mmlab/mmocr/actions) [![docs](https://readthedocs.org/projects/mmocr/badge/?version=dev-1.x)](https://mmocr.readthedocs.io/en/dev-1.x/?badge=dev-1.x) [![codecov](https://codecov.io/gh/open-mmlab/mmocr/branch/main/graph/badge.svg)](https://codecov.io/gh/open-mmlab/mmocr) [![license](https://img.shields.io/github/license/open-mmlab/mmocr.svg)](https://github.com/open-mmlab/mmocr/blob/main/LICENSE) [![PyPI](https://badge.fury.io/py/mmocr.svg)](https://pypi.org/project/mmocr/) [![Average time to resolve an issue](https://isitmaintained.com/badge/resolution/open-mmlab/mmocr.svg)](https://github.com/open-mmlab/mmocr/issues) [![Percentage of issues still open](https://isitmaintained.com/badge/open/open-mmlab/mmocr.svg)](https://github.com/open-mmlab/mmocr/issues) [📘Documentation](https://mmocr.readthedocs.io/en/dev-1.x/) | [🛠️Installation](https://mmocr.readthedocs.io/en/dev-1.x/get_started/install.html) | [👀Model Zoo](https://mmocr.readthedocs.io/en/dev-1.x/modelzoo.html) | [🆕Update News](https://mmocr.readthedocs.io/en/dev-1.x/notes/changelog.html) | [🤔Reporting Issues](https://github.com/open-mmlab/mmocr/issues/new/choose)
English | [简体中文](README_zh-CN.md)

Latest Updates

The default branch is now main and the code on the branch has been upgraded to v1.0.0. The old main branch (v0.6.3) code now exists on the 0.x branch. If you have been using the main branch and encounter upgrade issues, please read the Migration Guide and notes on Branches .

v1.0.0 was released in 2023-04-06. Major updates from 1.0.0rc6 include:

  1. Support for SCUT-CTW1500, SynthText, and MJSynth datasets in Dataset Preparer
  2. Updated FAQ and documentation
  3. Deprecation of file_client_args in favor of backend_args
  4. Added a new MMOCR tutorial notebook

To know more about the updates in MMOCR 1.0, please refer to What's New in MMOCR 1.x, or Read Changelog for more details!

Introduction

MMOCR is an open-source toolbox based on PyTorch and mmdetection for text detection, text recognition, and the corresponding downstream tasks including key information extraction. It is part of the OpenMMLab project.

The main branch works with PyTorch 1.6+.

Major Features

Installation

MMOCR depends on PyTorch, MMEngine, MMCV and MMDetection. Below are quick steps for installation. Please refer to Install Guide for more detailed instruction.

conda create -n open-mmlab python=3.8 pytorch=1.10 cudatoolkit=11.3 torchvision -c pytorch -y
conda activate open-mmlab
pip3 install openmim
git clone https://github.com/open-mmlab/mmocr.git
cd mmocr
mim install -e .

Get Started

Please see Quick Run for the basic usage of MMOCR.

Model Zoo

Supported algorithms:

BackBone - [x] [oCLIP](configs/backbone/oclip/README.md) (ECCV'2022)
Text Detection - [x] [DBNet](configs/textdet/dbnet/README.md) (AAAI'2020) / [DBNet++](configs/textdet/dbnetpp/README.md) (TPAMI'2022) - [x] [Mask R-CNN](configs/textdet/maskrcnn/README.md) (ICCV'2017) - [x] [PANet](configs/textdet/panet/README.md) (ICCV'2019) - [x] [PSENet](configs/textdet/psenet/README.md) (CVPR'2019) - [x] [TextSnake](configs/textdet/textsnake/README.md) (ECCV'2018) - [x] [DRRG](configs/textdet/drrg/README.md) (CVPR'2020) - [x] [FCENet](configs/textdet/fcenet/README.md) (CVPR'2021)
Text Recognition - [x] [ABINet](configs/textrecog/abinet/README.md) (CVPR'2021) - [x] [ASTER](configs/textrecog/aster/README.md) (TPAMI'2018) - [x] [CRNN](configs/textrecog/crnn/README.md) (TPAMI'2016) - [x] [MASTER](configs/textrecog/master/README.md) (PR'2021) - [x] [NRTR](configs/textrecog/nrtr/README.md) (ICDAR'2019) - [x] [RobustScanner](configs/textrecog/robust_scanner/README.md) (ECCV'2020) - [x] [SAR](configs/textrecog/sar/README.md) (AAAI'2019) - [x] [SATRN](configs/textrecog/satrn/README.md) (CVPR'2020 Workshop on Text and Documents in the Deep Learning Era) - [x] [SVTR](configs/textrecog/svtr/README.md) (IJCAI'2022)
Key Information Extraction - [x] [SDMG-R](configs/kie/sdmgr/README.md) (ArXiv'2021)
Text Spotting - [x] [ABCNet](projects/ABCNet/README.md) (CVPR'2020) - [x] [ABCNetV2](projects/ABCNet/README_V2.md) (TPAMI'2021) - [x] [SPTS](projects/SPTS/README.md) (ACM MM'2022)

Please refer to model_zoo for more details.

Projects

Here are some implementations of SOTA models and solutions built on MMOCR, which are supported and maintained by community users. These projects demonstrate the best practices based on MMOCR for research and product development. We welcome and appreciate all the contributions to OpenMMLab ecosystem.

Contributing

We appreciate all contributions to improve MMOCR. Please refer to CONTRIBUTING.md for the contributing guidelines.

Acknowledgement

MMOCR is an open-source project that is contributed by researchers and engineers from various colleges and companies. We appreciate all the contributors who implement their methods or add new features, as well as users who give valuable feedbacks. We hope the toolbox and benchmark could serve the growing research community by providing a flexible toolkit to reimplement existing methods and develop their own new OCR methods.

Citation

If you find this project useful in your research, please consider cite:

@article{mmocr2021,
    title={MMOCR:  A Comprehensive Toolbox for Text Detection, Recognition and Understanding},
    author={Kuang, Zhanghui and Sun, Hongbin and Li, Zhizhong and Yue, Xiaoyu and Lin, Tsui Hin and Chen, Jianyong and Wei, Huaqiang and Zhu, Yiqin and Gao, Tong and Zhang, Wenwei and Chen, Kai and Zhang, Wayne and Lin, Dahua},
    journal= {arXiv preprint arXiv:2108.06543},
    year={2021}
}

License

This project is released under the Apache 2.0 license.

OpenMMLab Family

Welcome to the OpenMMLab community

Scan the QR code below to follow the OpenMMLab team's Zhihu Official Account and join the OpenMMLab team's QQ Group, or join the official communication WeChat group by adding the WeChat, or join our Slack

We will provide you with the OpenMMLab community

The OpenMMLab community looks forward to your participation! 👬