pub struct SiglipPreprocessor { /* private fields */ }Expand description
SigLIP / Idefics3 single-image preprocessing (SmolVLM-256M/500M):
RGB → resize longest edge to image_size (aspect preserved, bilinear) →
pad to a square with 0.5 → rescale 1/255 → normalize mean/std 0.5.
(Padding at the normalization mean maps to 0 after normalization.)
Implementations§
Trait Implementations§
Source§impl ImagePreprocessor for SiglipPreprocessor
impl ImagePreprocessor for SiglipPreprocessor
Source§fn preprocess(&self, bytes: &[u8]) -> Result<PixelBatch>
fn preprocess(&self, bytes: &[u8]) -> Result<PixelBatch>
Decodes and preprocesses one image.
Auto Trait Implementations§
impl Freeze for SiglipPreprocessor
impl RefUnwindSafe for SiglipPreprocessor
impl Send for SiglipPreprocessor
impl Sync for SiglipPreprocessor
impl Unpin for SiglipPreprocessor
impl UnsafeUnpin for SiglipPreprocessor
impl UnwindSafe for SiglipPreprocessor
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