From 2335b6fcd73cf893a98df90cfd91867ba1dda6b4 Mon Sep 17 00:00:00 2001 From: Felix Dittrich Date: Wed, 10 Nov 2021 16:18:35 +0100 Subject: [PATCH] docs: Fixed docstrings of datasets (#603) Co-authored-by: Felix --- doctr/datasets/detection.py | 3 ++- doctr/datasets/recognition.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/doctr/datasets/detection.py b/doctr/datasets/detection.py index ccc7e9dda9..cbb75746eb 100644 --- a/doctr/datasets/detection.py +++ b/doctr/datasets/detection.py @@ -21,7 +21,7 @@ class DetectionDataset(AbstractDataset): Example:: >>> from doctr.datasets import DetectionDataset - >>> train_set = DetectionDataset(img_folder=True, label_path="/path/to/labels.json") + >>> train_set = DetectionDataset(img_folder="/path/to/images", label_path="/path/to/labels.json") >>> img, target = train_set[0] Args: @@ -30,6 +30,7 @@ class DetectionDataset(AbstractDataset): sample_transforms: composable transformations that will be applied to each image rotated_bbox: whether polygons should be considered as rotated bounding box (instead of straight ones) """ + def __init__( self, img_folder: str, diff --git a/doctr/datasets/recognition.py b/doctr/datasets/recognition.py index 43d74a8395..635506190b 100644 --- a/doctr/datasets/recognition.py +++ b/doctr/datasets/recognition.py @@ -18,7 +18,7 @@ class RecognitionDataset(AbstractDataset): Example:: >>> from doctr.datasets import RecognitionDataset - >>> train_set = RecognitionDataset(img_folder=True, labels_path="/path/to/labels.json") + >>> train_set = RecognitionDataset(img_folder="/path/to/images", labels_path="/path/to/labels.json") >>> img, target = train_set[0] Args: @@ -26,6 +26,7 @@ class RecognitionDataset(AbstractDataset): labels_path: pathe to the json file containing all labels (character sequences) sample_transforms: composable transformations that will be applied to each image """ + def __init__( self, img_folder: str,