Crate segment_anything_rs

Source
Expand description

§Segment Anything RS

A rust wrapper for Segment Anything

§Usage

use segment_anything_rs::*;

let model = SegmentAnything::builder().build().unwrap();
let image = image::open("examples/landscape.jpg").unwrap();
let images = model.segment_everything(image).unwrap();
for (i, img) in images.iter().enumerate() {
    img.save(&format!("{}.png", i)).unwrap();
}

Structs§

SegmentAnything
The segment anything model.
SegmentAnythingBuilder
A builder for SegmentAnything.
SegmentAnythingInferenceSettings
Settings for running inference on SegmentAnything.
SegmentAnythingSource
The source of the model.

Enums§

LoadSegmentAnythingError
An error that can occur when loading a SegmentAnything model.
SegmentAnythingInferenceError
An error that can occur when running a SegmentAnything model.