pub struct ContrastiveAugmentationBuilder { /* private fields */ }Expand description
Builder for ContrastiveAugmentation.
Implementations§
Source§impl ContrastiveAugmentationBuilder
impl ContrastiveAugmentationBuilder
Sourcepub fn crop_scale(self, min: f64, max: f64) -> Self
pub fn crop_scale(self, min: f64, max: f64) -> Self
Set the crop scale range.
Sourcepub fn aspect_ratio(self, min: f64, max: f64) -> Self
pub fn aspect_ratio(self, min: f64, max: f64) -> Self
Set the aspect ratio range.
Sourcepub fn horizontal_flip_prob(self, prob: f64) -> Self
pub fn horizontal_flip_prob(self, prob: f64) -> Self
Set the horizontal flip probability.
Sourcepub fn color_jitter(
self,
brightness: f64,
contrast: f64,
saturation: f64,
hue: f64,
) -> Self
pub fn color_jitter( self, brightness: f64, contrast: f64, saturation: f64, hue: f64, ) -> Self
Set the color jitter parameters.
Sourcepub fn color_jitter_prob(self, prob: f64) -> Self
pub fn color_jitter_prob(self, prob: f64) -> Self
Set the color jitter probability.
Sourcepub fn grayscale_prob(self, prob: f64) -> Self
pub fn grayscale_prob(self, prob: f64) -> Self
Set the grayscale probability.
Sourcepub fn gaussian_blur(self, kernel_size: u32, sigma_range: (f64, f64)) -> Self
pub fn gaussian_blur(self, kernel_size: u32, sigma_range: (f64, f64)) -> Self
Enable Gaussian blur with the specified kernel size.
Sourcepub fn output_size(self, width: u32, height: u32) -> Self
pub fn output_size(self, width: u32, height: u32) -> Self
Set the output size.
Sourcepub fn build(self) -> ContrastiveAugmentation
pub fn build(self) -> ContrastiveAugmentation
Build the ContrastiveAugmentation instance.
Trait Implementations§
Source§impl Clone for ContrastiveAugmentationBuilder
impl Clone for ContrastiveAugmentationBuilder
Source§fn clone(&self) -> ContrastiveAugmentationBuilder
fn clone(&self) -> ContrastiveAugmentationBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ContrastiveAugmentationBuilder
impl RefUnwindSafe for ContrastiveAugmentationBuilder
impl Send for ContrastiveAugmentationBuilder
impl Sync for ContrastiveAugmentationBuilder
impl Unpin for ContrastiveAugmentationBuilder
impl UnsafeUnpin for ContrastiveAugmentationBuilder
impl UnwindSafe for ContrastiveAugmentationBuilder
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