Skip to main content

OpenMMLab Text Detection, OCR, and NLP Toolbox

Project description

English | 简体中文

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

  • Comprehensive Pipeline

    The toolbox supports not only text detection and text recognition, but also their downstream tasks such as key information extraction.

  • Multiple Models

    The toolbox supports a wide variety of state-of-the-art models for text detection, text recognition and key information extraction.

  • Modular Design

    The modular design of MMOCR enables users to define their own optimizers, data preprocessors, and model components such as backbones, necks and heads as well as losses. Please refer to Getting Started for how to construct a customized model.

  • Numerous Utilities

    The toolbox provides a comprehensive set of utilities which can help users assess the performance of models. It includes visualizers which allow visualization of images, ground truths as well as predicted bounding boxes, and a validation tool for evaluating checkpoints during training. It also includes data converters to demonstrate how to convert your own data to the annotation files which the toolbox supports.

What's New

While the stable version (0.6.2) and the preview version (1.0.0) are being maintained concurrently now, the former version will be deprecated by the end of 2022. Therefore, we recommend users upgrade to MMOCR 1.0 to fruitful new features and better performance brought by the new architecture. Check out our maintenance plan for how we will maintain them in the future.

💎 Stable version

v0.6.2 was released in 2022-10-14.

  1. It's now possible to train/test models through Python Interface.
  2. ResizeOCR now fully supports all the parameters in mmcv.impad.

Read Changelog for more details!

🌟 Preview of 1.x version

A brand new version of MMOCR v1.0.0rc2 was released in 2022-10-14:

  1. New engines. MMOCR 1.x is based on MMEngine, which provides a general and powerful runner that allows more flexible customizations and significantly simplifies the entrypoints of high-level interfaces.

  2. Unified interfaces. As a part of the OpenMMLab 2.0 projects, MMOCR 1.x unifies and refactors the interfaces and internal logics of train, testing, datasets, models, evaluation, and visualization. All the OpenMMLab 2.0 projects share the same design in those interfaces and logics to allow the emergence of multi-task/modality algorithms.

  3. Cross project calling. Benefiting from the unified design, you can use the models implemented in other OpenMMLab projects, such as MMDet. We provide an example of how to use MMDetection's Mask R-CNN through MMDetWrapper. Check our documents for more details. More wrappers will be released in the future.

  4. Stronger visualization. We provide a series of useful tools which are mostly based on brand-new visualizers. As a result, it is more convenient for the users to explore the models and datasets now.

  5. More documentation and tutorials. We add a bunch of documentation and tutorials to help users get started more smoothly. Read it here.

Find more new features in 1.x branch. Issues and PRs are welcome!

Installation

MMOCR depends on PyTorch, 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
mim install mmcv-full
mim install mmdet
git clone https://github.com/open-mmlab/mmocr.git
cd mmocr
pip3 install -e .

Get Started

Please see Getting Started for the basic usage of MMOCR.

Model Zoo

Supported algorithms:

Text Detection
Text Recognition
Key Information Extraction
Named Entity Recognition

Please refer to model_zoo for more details.

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.

Projects in OpenMMLab

  • MMCV: OpenMMLab foundational library for computer vision.
  • MIM: MIM installs OpenMMLab packages.
  • MMClassification: OpenMMLab image classification toolbox and benchmark.
  • MMDetection: OpenMMLab detection toolbox and benchmark.
  • MMDetection3D: OpenMMLab's next-generation platform for general 3D object detection.
  • MMRotate: OpenMMLab rotated object detection toolbox and benchmark.
  • MMSegmentation: OpenMMLab semantic segmentation toolbox and benchmark.
  • MMOCR: OpenMMLab text detection, recognition, and understanding toolbox.
  • MMPose: OpenMMLab pose estimation toolbox and benchmark.
  • MMHuman3D: OpenMMLab 3D human parametric model toolbox and benchmark.
  • MMSelfSup: OpenMMLab self-supervised learning toolbox and benchmark.
  • MMRazor: OpenMMLab model compression toolbox and benchmark.
  • MMFewShot: OpenMMLab fewshot learning toolbox and benchmark.
  • MMAction2: OpenMMLab's next-generation action understanding toolbox and benchmark.
  • MMTracking: OpenMMLab video perception toolbox and benchmark.
  • MMFlow: OpenMMLab optical flow toolbox and benchmark.
  • MMEditing: OpenMMLab image and video editing toolbox.
  • MMGeneration: OpenMMLab image and video generative models toolbox.
  • MMDeploy: OpenMMLab model deployment framework.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mmocr-0.6.2.tar.gz (287.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mmocr-0.6.2-py2.py3-none-any.whl (546.0 kB view details)

Uploaded Python 2Python 3

File details

Details for the file mmocr-0.6.2.tar.gz.

File metadata

  • Download URL: mmocr-0.6.2.tar.gz
  • Upload date:
  • Size: 287.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.14

File hashes

Hashes for mmocr-0.6.2.tar.gz
Algorithm Hash digest
SHA256 212cd6b41ba265248737d1e31ae9aa10de553818e78dd1327b3df953176bce91
MD5 dcce47e2b04dd314fc7fb1d069934445
BLAKE2b-256 96c9008d4c01fac81945374f41229c94a3e753daec6f845ad0a8e599dd143b4c

See more details on using hashes here.

File details

Details for the file mmocr-0.6.2-py2.py3-none-any.whl.

File metadata

  • Download URL: mmocr-0.6.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 546.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.14

File hashes

Hashes for mmocr-0.6.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a31e3793eef54a64f573b089676444f71402d24afbfc1c95c940af3e7927a07c
MD5 d5afef49edf39e0fe6a8823b31acec2b
BLAKE2b-256 597d1692b0760b6832350f4864b66bbd2190a11e8031522af582b1afce7ca659

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page