pub struct PreprocessedImage {
pub patches: Vec<f32>,
pub grid_h: usize,
pub grid_w: usize,
pub patch_dim: usize,
pub pixel_w: u32,
pub pixel_h: u32,
}Expand description
Flattened patch tensor [num_patches, C * patch_h * patch_w] and grid (h_patches, w_patches).
Fields§
§patches: Vec<f32>§grid_h: usize§grid_w: usize§patch_dim: usize§pixel_w: u32Width/height in pixels after rescale + pad (used for box coordinate scaling).
pixel_h: u32Implementations§
Source§impl PreprocessedImage
impl PreprocessedImage
pub fn num_patches(&self) -> usize
Trait Implementations§
Source§impl Clone for PreprocessedImage
impl Clone for PreprocessedImage
Source§fn clone(&self) -> PreprocessedImage
fn clone(&self) -> PreprocessedImage
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PreprocessedImage
impl RefUnwindSafe for PreprocessedImage
impl Send for PreprocessedImage
impl Sync for PreprocessedImage
impl Unpin for PreprocessedImage
impl UnsafeUnpin for PreprocessedImage
impl UnwindSafe for PreprocessedImage
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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