A Real-Time ML Powered Segmentation Library for SwiftUI.
- SwiftUI components to integrate segmentation prompt and display seamlessly (iOS 17)
- tools to perform segmentation programmatically (iOS 15)
Backed on EdgeSAM
➡️ Full Documentation ➡️ Demo Repository
demo_edge_segmentation_480.mov
- All-in-one ✨ fully customizable segmentation prompt view
- Segment:
- drawing a box 📦
- tapping to add inclusion ✅ and exclusion ❌ points
- without any extra controls
- Drag to share cropped segmentation ✉️
- Zoom to position points precisely 🔍
- Customizable segmentation overlay displaying path 🎨
- Customizable edition decorations 👨🎨
- Fit / fill image display 🏞️
➕ Full control to implement specific behaviors or exotic UI needs thanks to a high modularity 👌
- Segmentation editor with ability to drag to share
SegmentationEditor(image: image, draggableSegmentation: true)
- Segmentation editor with feedback through binding
@State var segmentation: Segmentation?
func body() -> some View {
SegmentationEditor(image: image, segmentation: $segmentation)
}
- Segmentation display (no edition)
SegmentationView(image: image, segmentation: segmentation)
- Programmatic segmentation
let segmentor = Segmentor(image: image)
try await segmentor.processImage()
let input = SegmentationInput(positive: [inclusionPoint], negative: [exclusionPoint], box: CGRect(origin: somePoint, size: someSize))
let segmentation = try await segmentor.segmentation(for: input)
// Access CGPath for any display ratio, compute cropped segmentation image...
Contact me for more information