Need help with PMTD?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

211 Stars 218 Forks 1 Commits 16 Opened issues


Pyramid Mask Text Detector designed by SenseTime Video Intelligence Research team.

Services available


Need anything else?

Contributors list

PMTD: Pyramid Mask Text Detector

This project hosts the inference code for implementing the PMTD algorithm for text detection, as presented in our paper:

Pyramid Mask Text Detector;
Liu Jingchao, Liu Xuebo, Sheng Jie, Liang Ding, Li Xin and Liu Qingjie;
arXiv preprint arXiv:1903.11800 (2019).

The full paper is available at:


Check for installation instructions.

Trained model

We provide trained model on ICDAR 2017 MLT dataset here and ICDAR 2015 dataset here for downloading. Note that the result is slightly different from we reported in the paper, because PMTD is based on a private codebase, we reimplement inference code based on maskrcnn-benchmark.

ICDAR 2017


Precision Recall F-measure
This project 85.13% 72.85% 78.51%
Paper reported 85.15% 72.77% 78.48%

ICDAR 2015


Precision Recall F-measure
This project 87.48% 91.26% 89.33%
Paper reported 87.43% 91.30% 89.33%

A quick demo

python demo/ \
--image_path=datasets/icdar2017mlt/ch8_validation_images/img_1.jpg \

Perform testing on ICDAR 2017 MLT dataset

Prepare dataset

We recommend to symlink ICDAR 2017 MLT dataset to

as follows ```bash

eg: ~/Projects/PMTD


mkdir -p datasets/icdar2017mlt cd datasets/icdar2017mlt

symlink for images and annotations

ln -s /pathtoicdar2017mltdataset/ch8test_images ```

Generate coco label for dataset

# ${PWD} = datasets/icdar2017mlt
mkdir annotations
python demo/utils/
# label will output to PROJECT_ROOT/datasets/icdar2017mlt/annotations/test_coco.json

Test images

In the test stage, we use one GPU of TITANX 11G with a batch size 4. When encountering the out-of-memory (OOM) error, you may need to modify TEST.IMSPERBATCH in

. ```bash

the download model should place in the path: models/PMTD_ICDAR2017MLT.pth

python tools/ --config=configs/e2ePMTDR50FPN1xICDAR2017MLTtest.yaml

results will output to PROJECTROOT/inference/icdar2017mlttest/

- bbox.json // when using coco evaluation criterion

- segm.json // when using coco evaluation criterion

- dataset.pth

- predictions.pth

- results_{scale}.pth, in default setting, scale=1600

### Convert results to ICDAR 2017 submission format
python demo/utils/
# results will output to PROJECT_ROOT/inference/icdar_2017_mlt_test/
# -

submit to ICDAR 2017 MLT


Please consider citing our paper in your publications if this project helps your research. BibTeX reference is as follows.

  title={Pyramid Mask Text Detector},
  author={Liu, Jingchao and Liu, Xuebo and Sheng, Jie and Liang, Ding and Li, Xin and Liu, Qingjie},
  journal={arXiv preprint arXiv:1903.11800},



Maskrcnn-benchmark is released under the MIT license. PMTD is released under the Apache 2.0 license.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.