W3cubDocs

/TensorFlow C++

tensorflow::ops::SampleDistortedBoundingBox::Attrs

#include <image_ops.h>

Optional attribute setters for SampleDistortedBoundingBox.

Summary

Public attributes
area_range_ = {0.05f, 1.0f}
gtl::ArraySlice< float >
aspect_ratio_range_ = {0.75f, 1.33f}
gtl::ArraySlice< float >
max_attempts_ = 100
int64
min_object_covered_ = 0.1f
float
seed2_ = 0
int64
seed_ = 0
int64
use_image_if_no_bounding_boxes_ = false
bool
Public functions
AreaRange(const gtl::ArraySlice< float > & x)
The cropped area of the image must contain a fraction of the supplied image within in this range.
AspectRatioRange(const gtl::ArraySlice< float > & x)
The cropped area of the image must have an aspect ratio = width / height within this range.
MaxAttempts(int64 x)
Number of attempts at generating a cropped region of the image of the specified constraints.
MinObjectCovered(float x)
The cropped area of the image must contain at least this fraction of any bounding box supplied.
Seed(int64 x)
If either seed or seed2 are set to non-zero, the random number generator is seeded by the given seed.
Seed2(int64 x)
A second seed to avoid seed collision.
UseImageIfNoBoundingBoxes(bool x)
Controls behavior if no bounding boxes supplied.

Public attributes

area_range_

gtl::ArraySlice< float > tensorflow::ops::SampleDistortedBoundingBox::Attrs::area_range_ = {0.05f, 1.0f}

aspect_ratio_range_

gtl::ArraySlice< float > tensorflow::ops::SampleDistortedBoundingBox::Attrs::aspect_ratio_range_ = {0.75f, 1.33f}

max_attempts_

int64 tensorflow::ops::SampleDistortedBoundingBox::Attrs::max_attempts_ = 100

min_object_covered_

float tensorflow::ops::SampleDistortedBoundingBox::Attrs::min_object_covered_ = 0.1f

seed2_

int64 tensorflow::ops::SampleDistortedBoundingBox::Attrs::seed2_ = 0

seed_

int64 tensorflow::ops::SampleDistortedBoundingBox::Attrs::seed_ = 0

use_image_if_no_bounding_boxes_

bool tensorflow::ops::SampleDistortedBoundingBox::Attrs::use_image_if_no_bounding_boxes_ = false

Public functions

AreaRange

Attrs tensorflow::ops::SampleDistortedBoundingBox::Attrs::AreaRange(
  const gtl::ArraySlice< float > & x
)

The cropped area of the image must contain a fraction of the supplied image within in this range.

Defaults to [0.05, 1]

AspectRatioRange

Attrs tensorflow::ops::SampleDistortedBoundingBox::Attrs::AspectRatioRange(
  const gtl::ArraySlice< float > & x
)

The cropped area of the image must have an aspect ratio = width / height within this range.

Defaults to [0.75, 1.33]

MaxAttempts

Attrs tensorflow::ops::SampleDistortedBoundingBox::Attrs::MaxAttempts(
  int64 x
)

Number of attempts at generating a cropped region of the image of the specified constraints.

After max_attempts failures, return the entire image.

Defaults to 100

MinObjectCovered

Attrs tensorflow::ops::SampleDistortedBoundingBox::Attrs::MinObjectCovered(
  float x
)

The cropped area of the image must contain at least this fraction of any bounding box supplied.

The value of this parameter should be non-negative. In the case of 0, the cropped area does not need to overlap any of the bounding boxes supplied.

Defaults to 0.1

Seed

Attrs tensorflow::ops::SampleDistortedBoundingBox::Attrs::Seed(
  int64 x
)

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.

Defaults to 0

Seed2

Attrs tensorflow::ops::SampleDistortedBoundingBox::Attrs::Seed2(
  int64 x
)

A second seed to avoid seed collision.

Defaults to 0

UseImageIfNoBoundingBoxes

Attrs tensorflow::ops::SampleDistortedBoundingBox::Attrs::UseImageIfNoBoundingBoxes(
  bool x
)

Controls behavior if no bounding boxes supplied.

If true, assume an implicit bounding box covering the whole input. If false, raise an error.

Defaults to false

© 2017 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/cc/struct/tensorflow/ops/sample-distorted-bounding-box/attrs.html