Skip to content

Commit

Permalink
docs: Fixed docstrings of datasets (#603)
Browse files Browse the repository at this point in the history
Co-authored-by: Felix <felix.dittrich@memoresa.de>
  • Loading branch information
felixdittrich92 and Felix committed Nov 10, 2021
1 parent d117ea7 commit 2335b6f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion doctr/datasets/detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion doctr/datasets/recognition.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@ 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:
img_folder: path to the images folder
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,
Expand Down

0 comments on commit 2335b6f

Please sign in to comment.