Skip to content
Open
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
8 changes: 4 additions & 4 deletions vision/transforms/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ class RandomSampleCrop(object):
"""

def __init__(self):
self.sample_options = (
self.sample_options = np.array([
# using entire original input image
None,
# sample a patch s.t. MIN jaccard w/ obj in .1,.3,.4,.7,.9
Expand All @@ -269,7 +269,7 @@ def __init__(self):
(0.9, None),
# randomly sample a patch
(None, None),
)
], dtype=object)

def __call__(self, image, boxes=None, labels=None):
height, width, _ = image.shape
Expand Down Expand Up @@ -364,7 +364,7 @@ class RandomSampleCrop_v2(object):
"""

def __init__(self):
self.sample_options = (
self.sample_options = np.array([
# using entire original input image
None,
# sample a patch s.t. MIN jaccard w/ obj in .1,.3,.4,.7,.9
Expand All @@ -374,7 +374,7 @@ def __init__(self):
(1, None),
(1, None),
(1, None),
)
], dtype=object)

def __call__(self, image, boxes=None, labels=None):
height, width, _ = image.shape
Expand Down