pub enum ImageAugmentation {
RandomHorizontalFlip {
probability: f64,
},
RandomVerticalFlip {
probability: f64,
},
RandomRotation {
min_angle: f64,
max_angle: f64,
fill_mode: FillMode,
},
RandomScale {
min_scale: f64,
max_scale: f64,
preserve_aspect_ratio: bool,
},
RandomCrop {
crop_height: usize,
crop_width: usize,
padding: Option<usize>,
},
ColorJitter {
brightness: Option<f64>,
contrast: Option<f64>,
saturation: Option<f64>,
hue: Option<f64>,
},
GaussianNoise {
mean: f64,
std: f64,
probability: f64,
},
RandomErasing {
probability: f64,
area_ratio_range: (f64, f64),
aspect_ratio_range: (f64, f64),
fill_value: f64,
},
ElasticDeformation {
alpha: f64,
sigma: f64,
probability: f64,
},
}
Expand description
Image augmentation transforms
Variants§
RandomHorizontalFlip
Random horizontal flip
RandomVerticalFlip
Random vertical flip
RandomRotation
Random rotation within angle range
Fields
RandomScale
Random scaling
Fields
RandomCrop
Random crop and resize
Fields
ColorJitter
Color jittering
Fields
GaussianNoise
Gaussian noise injection
Fields
RandomErasing
Random erasing (cutout)
Fields
ElasticDeformation
Elastic deformation
Trait Implementations§
Source§impl Clone for ImageAugmentation
impl Clone for ImageAugmentation
Source§fn clone(&self) -> ImageAugmentation
fn clone(&self) -> ImageAugmentation
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ImageAugmentation
impl Debug for ImageAugmentation
Source§impl PartialEq for ImageAugmentation
impl PartialEq for ImageAugmentation
impl StructuralPartialEq for ImageAugmentation
Auto Trait Implementations§
impl Freeze for ImageAugmentation
impl RefUnwindSafe for ImageAugmentation
impl Send for ImageAugmentation
impl Sync for ImageAugmentation
impl Unpin for ImageAugmentation
impl UnwindSafe for ImageAugmentation
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more