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§
Sourcefn process_image(&self, image_path: &Path) -> RragResult<ProcessedImage>
fn process_image(&self, image_path: &Path) -> RragResult<ProcessedImage>
Process image
Sourcefn extract_features(&self, image_path: &Path) -> RragResult<VisualFeatures>
fn extract_features(&self, image_path: &Path) -> RragResult<VisualFeatures>
Extract features
Sourcefn generate_caption(&self, image_path: &Path) -> RragResult<String>
fn generate_caption(&self, image_path: &Path) -> RragResult<String>
Generate caption
Sourcefn generate_clip_embedding(&self, image_path: &Path) -> RragResult<Vec<f32>>
fn generate_clip_embedding(&self, image_path: &Path) -> RragResult<Vec<f32>>
Generate CLIP embedding