public static class SampleDistortedBoundingBox.Options extends Object
SampleDistortedBoundingBox
Modifier and Type | Method and Description |
---|---|
SampleDistortedBoundingBox.Options |
areaRange(List<Float> areaRange) |
SampleDistortedBoundingBox.Options |
aspectRatioRange(List<Float> aspectRatioRange) |
SampleDistortedBoundingBox.Options |
maxAttempts(Long maxAttempts) |
SampleDistortedBoundingBox.Options |
seed(Long seed) |
SampleDistortedBoundingBox.Options |
seed2(Long seed2) |
SampleDistortedBoundingBox.Options |
useImageIfNoBoundingBoxes(Boolean useImageIfNoBoundingBoxes) |
public SampleDistortedBoundingBox.Options seed(Long seed)
seed
- If either `seed` or `seed2` are set to non-zero, the random number
generator is seeded by the given `seed`. Otherwise, it is seeded by a random
seed.public SampleDistortedBoundingBox.Options seed2(Long seed2)
seed2
- A second seed to avoid seed collision.public SampleDistortedBoundingBox.Options aspectRatioRange(List<Float> aspectRatioRange)
aspectRatioRange
- The cropped area of the image must have an aspect ratio =
width / height within this range.public SampleDistortedBoundingBox.Options areaRange(List<Float> areaRange)
areaRange
- The cropped area of the image must contain a fraction of the
supplied image within this range.public SampleDistortedBoundingBox.Options maxAttempts(Long maxAttempts)
maxAttempts
- Number of attempts at generating a cropped region of the image
of the specified constraints. After `max_attempts` failures, return the entire
image.public SampleDistortedBoundingBox.Options useImageIfNoBoundingBoxes(Boolean useImageIfNoBoundingBoxes)
useImageIfNoBoundingBoxes
- Controls behavior if no bounding boxes supplied.
If true, assume an implicit bounding box covering the whole input. If false,
raise an error.Copyright © 2022. All rights reserved.