Skip to content

Commit

Permalink
chore: Remove obsolete clip_boxes argument in RandomPadFixedAR
Browse files Browse the repository at this point in the history
The `clip_boxes` argument in RandomPadFixedAR was obsolete and has been removed: Since the complete input image and all of its boxes are contained in the padded image in their entirety, there is nothing to clip.
  • Loading branch information
pierluigiferrari committed Mar 25, 2018
1 parent 499bc68 commit eed6632
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions data_generator/object_detection_2d_patch_sampling_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -830,15 +830,11 @@ class RandomPadFixedAR:

def __init__(self,
patch_aspect_ratio,
clip_boxes=False,
background=(0,0,0),
labels_format={'class_id': 0, 'xmin': 1, 'ymin': 2, 'xmax': 3, 'ymax': 4}):
'''
Arguments:
patch_aspect_ratio (float): The fixed aspect ratio that all sampled patches will have.
clip_boxes (bool, optional): Only relevant if ground truth bounding boxes are given.
If `True`, any ground truth bounding boxes will be clipped to lie entirely within the
sampled patch.
background (list/tuple, optional): A 3-tuple specifying the RGB color value of the potential
background pixels of the scaled images. In the case of single-channel images,
the first element of `background` will be used as the background pixel value.
Expand All @@ -848,7 +844,6 @@ def __init__(self,
'''

self.patch_aspect_ratio = patch_aspect_ratio
self.clip_boxes = clip_boxes
self.background = background
self.labels_format = labels_format

Expand Down Expand Up @@ -876,7 +871,7 @@ def __call__(self, image, labels=None, return_inverter=False):
box_filter=None,
image_validator=None,
n_trials_max=1,
clip_boxes=self.clip_boxes,
clip_boxes=False,
background=self.background,
prob=1.0,
labels_format=self.labels_format)
Expand Down

0 comments on commit eed6632

Please sign in to comment.