ImageProcessor

Trait ImageProcessor 

Source
pub trait ImageProcessor: Send + Sync {
    // Required methods
    fn process_image(&self, image_path: &Path) -> RragResult<ProcessedImage>;
    fn extract_features(&self, image_path: &Path) -> RragResult<VisualFeatures>;
    fn generate_caption(&self, image_path: &Path) -> RragResult<String>;
    fn generate_clip_embedding(&self, image_path: &Path) -> RragResult<Vec<f32>>;
}
Expand description

Image processor trait

Required Methods§

Source

fn process_image(&self, image_path: &Path) -> RragResult<ProcessedImage>

Process image

Source

fn extract_features(&self, image_path: &Path) -> RragResult<VisualFeatures>

Extract features

Source

fn generate_caption(&self, image_path: &Path) -> RragResult<String>

Generate caption

Source

fn generate_clip_embedding(&self, image_path: &Path) -> RragResult<Vec<f32>>

Generate CLIP embedding

Implementors§