pub struct DefaultImageProcessor { /* private fields */ }Expand description
Default image processor implementation
Implementations§
Source§impl DefaultImageProcessor
impl DefaultImageProcessor
Sourcepub fn new(config: ImageProcessingConfig) -> RragResult<Self>
pub fn new(config: ImageProcessingConfig) -> RragResult<Self>
Create new image processor
Trait Implementations§
Source§impl ImageProcessor for DefaultImageProcessor
impl ImageProcessor for DefaultImageProcessor
Source§fn process_image(&self, image_path: &Path) -> RragResult<ProcessedImage>
fn process_image(&self, image_path: &Path) -> RragResult<ProcessedImage>
Process image
Source§fn extract_features(&self, image_path: &Path) -> RragResult<VisualFeatures>
fn extract_features(&self, image_path: &Path) -> RragResult<VisualFeatures>
Extract features
Source§fn generate_caption(&self, image_path: &Path) -> RragResult<String>
fn generate_caption(&self, image_path: &Path) -> RragResult<String>
Generate caption
Source§fn generate_clip_embedding(&self, image_path: &Path) -> RragResult<Vec<f32>>
fn generate_clip_embedding(&self, image_path: &Path) -> RragResult<Vec<f32>>
Generate CLIP embedding
Auto Trait Implementations§
impl Freeze for DefaultImageProcessor
impl RefUnwindSafe for DefaultImageProcessor
impl Send for DefaultImageProcessor
impl Sync for DefaultImageProcessor
impl Unpin for DefaultImageProcessor
impl UnwindSafe for DefaultImageProcessor
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