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§
- Segment
Anything - The segment anything model.
- Segment
Anything Builder - A builder for
SegmentAnything
. - Segment
Anything Inference Settings - Settings for running inference on
SegmentAnything
. - Segment
Anything Source - The source of the model.
Enums§
- Load
Segment Anything Error - An error that can occur when loading a
SegmentAnything
model. - Segment
Anything Inference Error - An error that can occur when running a
SegmentAnything
model.