Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Fixed docstrings of datasets #603

Merged
merged 1 commit into from
Nov 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
"""

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious here, why was this needed? (all style checks are passing)

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
"""

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

def __init__(
self,
img_folder: str,
Expand Down