pub struct AugmentationConfigBuilder { /* private fields */ }Expand description
Builder for augmentation configuration
Implementations§
Source§impl AugmentationConfigBuilder
impl AugmentationConfigBuilder
Sourcepub fn horizontal_flip(self, enable: bool) -> Self
pub fn horizontal_flip(self, enable: bool) -> Self
Enables horizontal flip
Sourcepub fn vertical_flip(self, enable: bool) -> Self
pub fn vertical_flip(self, enable: bool) -> Self
Enables vertical flip
Sourcepub fn rotation_angles(self, angles: Vec<f32>) -> Self
pub fn rotation_angles(self, angles: Vec<f32>) -> Self
Sets rotation angles
Sourcepub fn random_crop(self, enable: bool, size: Option<(u64, u64)>) -> Self
pub fn random_crop(self, enable: bool, size: Option<(u64, u64)>) -> Self
Enables random cropping
Sourcepub fn brightness_range(self, min: f32, max: f32) -> Self
pub fn brightness_range(self, min: f32, max: f32) -> Self
Sets brightness adjustment range
Sourcepub fn contrast_range(self, min: f32, max: f32) -> Self
pub fn contrast_range(self, min: f32, max: f32) -> Self
Sets contrast adjustment range
Sourcepub fn saturation_range(self, min: f32, max: f32) -> Self
pub fn saturation_range(self, min: f32, max: f32) -> Self
Sets saturation adjustment range
Sourcepub fn gaussian_noise(self, std_dev: f32) -> Self
pub fn gaussian_noise(self, std_dev: f32) -> Self
Sets Gaussian noise standard deviation
Sourcepub fn salt_pepper_noise(self, prob: f32) -> Self
pub fn salt_pepper_noise(self, prob: f32) -> Self
Sets salt and pepper noise probability
Sourcepub fn blur_kernel(self, size: usize) -> Self
pub fn blur_kernel(self, size: usize) -> Self
Sets blur kernel size
Sourcepub fn build(self) -> AugmentationConfig
pub fn build(self) -> AugmentationConfig
Builds the configuration
Trait Implementations§
Source§impl Debug for AugmentationConfigBuilder
impl Debug for AugmentationConfigBuilder
Source§impl Default for AugmentationConfigBuilder
impl Default for AugmentationConfigBuilder
Source§fn default() -> AugmentationConfigBuilder
fn default() -> AugmentationConfigBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AugmentationConfigBuilder
impl RefUnwindSafe for AugmentationConfigBuilder
impl Send for AugmentationConfigBuilder
impl Sync for AugmentationConfigBuilder
impl Unpin for AugmentationConfigBuilder
impl UnsafeUnpin for AugmentationConfigBuilder
impl UnwindSafe for AugmentationConfigBuilder
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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