pub struct SuperResConfig {
pub scale_factor: usize,
pub tile_size: usize,
pub overlap: usize,
pub batch_size: usize,
}Expand description
Configuration for super-resolution
Fields§
§scale_factor: usizeUpscale factor (2x or 4x)
tile_size: usizeTile size (width and height in pixels)
overlap: usizeOverlap between tiles (in pixels)
batch_size: usizeBatch size for processing multiple tiles
Implementations§
Source§impl SuperResConfig
impl SuperResConfig
Sourcepub fn new(scale_factor: usize, tile_size: usize, overlap: usize) -> Self
pub fn new(scale_factor: usize, tile_size: usize, overlap: usize) -> Self
Creates a new super-resolution configuration
§Arguments
scale_factor- Upscale factor (2 or 4)tile_size- Size of tiles for processingoverlap- Overlap between tiles in pixels
§Example
use oxigdal_ml::superres::SuperResConfig;
let config = SuperResConfig::new(2, 256, 32);
assert_eq!(config.scale_factor, 2);
assert_eq!(config.tile_size, 256);
assert_eq!(config.overlap, 32);Sourcepub fn with_batch_size(self, batch_size: usize) -> Self
pub fn with_batch_size(self, batch_size: usize) -> Self
Set batch size for parallel processing
Trait Implementations§
Source§impl Clone for SuperResConfig
impl Clone for SuperResConfig
Source§fn clone(&self) -> SuperResConfig
fn clone(&self) -> SuperResConfig
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 SuperResConfig
impl Debug for SuperResConfig
Source§impl Default for SuperResConfig
impl Default for SuperResConfig
Source§impl<'de> Deserialize<'de> for SuperResConfig
impl<'de> Deserialize<'de> for SuperResConfig
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 SuperResConfig
impl RefUnwindSafe for SuperResConfig
impl Send for SuperResConfig
impl Sync for SuperResConfig
impl Unpin for SuperResConfig
impl UnsafeUnpin for SuperResConfig
impl UnwindSafe for SuperResConfig
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> 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