Turi Create  4.0
turi::neural_net::image_augmenter::crop_options Struct Reference

#include <ml/neural_net/image_augmentation.hpp>

Public Attributes

float min_aspect_ratio = 0.8f
 
float max_aspect_ratio = 1.25f
 
float min_area_fraction = 0.15f
 
float max_area_fraction = 1.f
 
float min_object_covered = 0.f
 
size_t max_attempts = 50
 
float min_eject_coverage = 0.5f
 

Detailed Description

Parameters governing random crops.

Definition at line 90 of file image_augmentation.hpp.

Member Data Documentation

◆ max_area_fraction

float turi::neural_net::image_augmenter::crop_options::max_area_fraction = 1.f

Given a sampled aspect ratio, determines the upper bound of the uniformly sampled height.

Definition at line 108 of file image_augmentation.hpp.

◆ max_aspect_ratio

float turi::neural_net::image_augmenter::crop_options::max_aspect_ratio = 1.25f

Upper bound for the uniformly sampled aspect ratio (width/height)

Definition at line 96 of file image_augmentation.hpp.

◆ max_attempts

size_t turi::neural_net::image_augmenter::crop_options::max_attempts = 50

The maximum number of random crops to sample in an attempt to generate one that satisfies the min_object_covered constraint.

Definition at line 121 of file image_augmentation.hpp.

◆ min_area_fraction

float turi::neural_net::image_augmenter::crop_options::min_area_fraction = 0.15f

Given a sampled aspect ratio, determines the lower bound of the uniformly sampled height.

Definition at line 102 of file image_augmentation.hpp.

◆ min_aspect_ratio

float turi::neural_net::image_augmenter::crop_options::min_aspect_ratio = 0.8f

Lower bound for the uniformly sampled aspect ratio (width/height)

Definition at line 93 of file image_augmentation.hpp.

◆ min_eject_coverage

float turi::neural_net::image_augmenter::crop_options::min_eject_coverage = 0.5f

Given an accepted crop, the minimum fraction of each bounding box's area that must be included to keep the (potentially cropped) bounding box in the annotations (instead of discarding it).

Definition at line 128 of file image_augmentation.hpp.

◆ min_object_covered

float turi::neural_net::image_augmenter::crop_options::min_object_covered = 0.f

Given a sampled crop (aspect ratio, height, and location), specifies the minimum fraction of each bounding box's area that must be included to accept the crop. If 0.f, then the crop need not touch any object.

Definition at line 115 of file image_augmentation.hpp.


The documentation for this struct was generated from the following file: