pub struct AugmentationConfig {Show 15 fields
pub crop_scale_min: f64,
pub crop_scale_max: f64,
pub aspect_ratio_min: f64,
pub aspect_ratio_max: f64,
pub horizontal_flip_prob: f64,
pub brightness: f64,
pub contrast: f64,
pub saturation: f64,
pub hue: f64,
pub color_jitter_prob: f64,
pub grayscale_prob: f64,
pub blur_kernel_size: u32,
pub blur_prob: f64,
pub blur_sigma_range: (f64, f64),
pub output_size: (u32, u32),
}Expand description
Configuration for contrastive augmentation.
Fields§
§crop_scale_min: f64Minimum crop scale (default: 0.08)
crop_scale_max: f64Maximum crop scale (default: 1.0)
aspect_ratio_min: f64Minimum aspect ratio (default: 0.75)
aspect_ratio_max: f64Maximum aspect ratio (default: 1.333)
horizontal_flip_prob: f64Probability of horizontal flip (default: 0.5)
brightness: f64Brightness jitter factor (default: 0.4)
contrast: f64Contrast jitter factor (default: 0.4)
saturation: f64Saturation jitter factor (default: 0.4)
hue: f64Hue jitter factor (default: 0.1)
color_jitter_prob: f64Probability of color jitter (default: 0.8)
grayscale_prob: f64Probability of grayscale conversion (default: 0.2)
blur_kernel_size: u32Gaussian blur kernel size (0 to disable)
blur_prob: f64Probability of Gaussian blur (default: 0.5)
blur_sigma_range: (f64, f64)Gaussian blur sigma range
output_size: (u32, u32)Target output size (width, height)
Trait Implementations§
Source§impl Clone for AugmentationConfig
impl Clone for AugmentationConfig
Source§fn clone(&self) -> AugmentationConfig
fn clone(&self) -> AugmentationConfig
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 moreSource§impl Debug for AugmentationConfig
impl Debug for AugmentationConfig
Source§impl Default for AugmentationConfig
impl Default for AugmentationConfig
Source§impl<'de> Deserialize<'de> for AugmentationConfig
impl<'de> Deserialize<'de> for AugmentationConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AugmentationConfig
impl RefUnwindSafe for AugmentationConfig
impl Send for AugmentationConfig
impl Sync for AugmentationConfig
impl Unpin for AugmentationConfig
impl UnsafeUnpin for AugmentationConfig
impl UnwindSafe for AugmentationConfig
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