Module segment_anything

Module segment_anything 

Source
Expand description

Segment Anything Model (SAM)

SAM is an architecture for image segmentation, capable of segmenting any object in an image based on prompts like points or boxes. //! This model provides a robust and fast image segmentation pipeline that can be tweaked via some prompting (requesting some points to be in the target mask, requesting some points to be part of the background so not in the target mask, specifying some bounding box).

§Example

cargo run --example segment-anything --release -- \
    --image candle-examples/examples/yolo-v8/assets/bike.jpg
    --use-tiny --point 0.6,0.6 --point 0.6,0.55

Original; Prompt with --point 0.6,0.55; Prompt with --point 0.6,0.6 --point 0.6,0.55

Re-exports§

pub use crate::models::with_tracing::Linear;

Modules§

image_encoder
mask_decoder
prompt_encoder
sam
tiny_vit
transformer

Structs§

LayerNorm2d
MlpBlock

Functions§

linear