Skip to content

Commit

Permalink
Update doctring formatting for Compose. Add bbox_utils doctrings to S…
Browse files Browse the repository at this point in the history
…phinx docs.
  • Loading branch information
creafz committed Sep 21, 2018
1 parent 7090b77 commit 2907275
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
20 changes: 10 additions & 10 deletions albumentations/core/composition.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ class Compose(object):
preprocessing_transforms (list): list of transforms to run before transforms
postprocessing_transforms (list): list of transforms to run after transforms
p (float): probability of applying all list of transforms. Default: 1.0.
Other Parameters
bbox_params (dict): A `dict` with the following keys:
* format (str): format of bounding boxes. Should be 'coco' or 'pascal_voc'. If None - don't use bboxes.
label_fields (list): list of fields that are joined with boxes, e.g labels. Should be same type as boxes.
* min_area (float): minimum area of a bounding box. All bounding boxes whose visible area in pixels
is less than this value will be removed. Default: 0.0.
* min_visibility (float): minimum fraction of area for a bounding box to remain this box in list.
Default: 0.0.
bbox_params (dict): Parameters for bounding boxes transforms
**bbox_params** dictionary contains the following keys:
* **format** (*str*): format of bounding boxes. Should be 'coco' or 'pascal_voc'. If None - don't use bboxes.
* | **label_fields** (*list*): list of fields that are joined with boxes, e.g labels.
| Should be same type as boxes.
* | **min_area** (*float*): minimum area of a bounding box. All bounding boxes whose
| visible area in pixels is less than this value will be removed. Default: 0.0.
* | **min_visibility** (*float*): minimum fraction of area for a bounding box
| to remain this box in list. Default: 0.0.
"""

def __init__(self, transforms, preprocessing_transforms=[], postprocessing_transforms=[], bbox_params={}, p=1.0):
Expand Down
6 changes: 6 additions & 0 deletions docs/api/augmentations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,9 @@ Functional transforms
---------------------
.. automodule:: albumentations.augmentations.functional
:members:


Helper functions for working with bounding boxes
------------------------------------------------
.. automodule:: albumentations.augmentations.bbox_utils
:members:

0 comments on commit 2907275

Please sign in to comment.