From 7f4cbcee089e0e6d2282cf6ca24928a914d6f547 Mon Sep 17 00:00:00 2001 From: felixdittrich92 Date: Fri, 25 Mar 2022 11:15:45 +0100 Subject: [PATCH] update --- docs/source/index.rst | 1 + doctr/datasets/mjsynth.py | 23 +++++++++++------------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/source/index.rst b/docs/source/index.rst index 980aa2e3a8..e0c3fc78fb 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -62,6 +62,7 @@ Supported datasets * IC03 from `ICDAR 2003 `_. * IC13 from `ICDAR 2013 `_. * IMGUR5K from `"TextStyleBrush: Transfer of Text Aesthetics from a Single Example" `_. +* MJSynth from `"Synthetic Data and Artificial Neural Networks for Natural Scene Text Recognition" `_. .. toctree:: diff --git a/doctr/datasets/mjsynth.py b/doctr/datasets/mjsynth.py index 7245907975..820e06a7b5 100644 --- a/doctr/datasets/mjsynth.py +++ b/doctr/datasets/mjsynth.py @@ -17,18 +17,17 @@ class MJSynth(AbstractDataset): """MJSynth dataset from `"Synthetic Data and Artificial Neural Networks for Natural Scene Text Recognition" `_. - Example:: - >>> # NOTE: This is a pure recognition dataset without bounding box labels. - >>> # NOTE: You need to download the dataset. - >>> from doctr.datasets import MJSynth - >>> train_set = MJSynth(img_folder="/path/to/mjsynth/mnt/ramdisk/max/90kDICT32px", - >>> label_path="/path/to/mjsynth/mnt/ramdisk/max/90kDICT32px/imlist.txt", - >>> train=True) - >>> img, target = train_set[0] - >>> test_set = MJSynth(img_folder="/path/to/mjsynth/mnt/ramdisk/max/90kDICT32px", - >>> label_path="/path/to/mjsynth/mnt/ramdisk/max/90kDICT32px/imlist.txt") - >>> train=False) - >>> img, target = test_set[0] + >>> # NOTE: This is a pure recognition dataset without bounding box labels. + >>> # NOTE: You need to download the dataset. + >>> from doctr.datasets import MJSynth + >>> train_set = MJSynth(img_folder="/path/to/mjsynth/mnt/ramdisk/max/90kDICT32px", + >>> label_path="/path/to/mjsynth/mnt/ramdisk/max/90kDICT32px/imlist.txt", + >>> train=True) + >>> img, target = train_set[0] + >>> test_set = MJSynth(img_folder="/path/to/mjsynth/mnt/ramdisk/max/90kDICT32px", + >>> label_path="/path/to/mjsynth/mnt/ramdisk/max/90kDICT32px/imlist.txt") + >>> train=False) + >>> img, target = test_set[0] Args: img_folder: folder with all the images of the dataset