pub struct PixelBatch {
pub width: usize,
pub height: usize,
pub channels: usize,
pub data: Vec<f32>,
}Expand description
A preprocessed image: planar CHW f32, normalized, ready for
Tensor::from_data(TensorData::new(data, [1, c, h, w])).
Fields§
§width: usizeImage width (pixels, after resize+pad).
height: usizeImage height (pixels, after resize+pad).
channels: usizeChannel count (3 = RGB).
data: Vec<f32>Planar CHW data, normalized with the preprocessor’s mean/std.
Implementations§
Trait Implementations§
Source§impl Clone for PixelBatch
impl Clone for PixelBatch
Source§fn clone(&self) -> PixelBatch
fn clone(&self) -> PixelBatch
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 PixelBatch
impl RefUnwindSafe for PixelBatch
impl Send for PixelBatch
impl Sync for PixelBatch
impl Unpin for PixelBatch
impl UnsafeUnpin for PixelBatch
impl UnwindSafe for PixelBatch
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