https://github.com/ae9is/ezsam
Extract objects from images or video via text prompt
https://github.com/ae9is/ezsam
ai background extract filter foreground grounded-segment-anything groundingdino image-editing object-detection prompt remove segment segment-anything select subtract video-editing
Last synced: 5 months ago
JSON representation
Extract objects from images or video via text prompt
- Host: GitHub
- URL: https://github.com/ae9is/ezsam
- Owner: ae9is
- License: agpl-3.0
- Created: 2024-01-09T04:52:31.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-08-01T07:38:23.000Z (about 1 year ago)
- Last Synced: 2024-10-01T15:41:17.589Z (about 1 year ago)
- Topics: ai, background, extract, filter, foreground, grounded-segment-anything, groundingdino, image-editing, object-detection, prompt, remove, segment, segment-anything, select, subtract, video-editing
- Language: Python
- Homepage: https://www.ezsam.org/
- Size: 7.07 MB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
*Update: [SAM 2 extends SAM to video](https://github.com/facebookresearch/sam2). You might still find ezsam useful for small GIFs or image batches.*
# ezsam (easy segment anything model)
A command line and gui tool to segment images and video via text prompts.
Input images and videos, describe the subjects or objects you want to keep, and output new images and videos with the background removed.
**Check out the docs! [ezsam.org](https://www.ezsam.org)**
![]()
![]()
![]()
## Why?
Meta's [Segment Anything](https://github.com/facebookresearch/segment-anything) is a powerful tool for separating parts of images,
but requires coordinate prompts—either bounding boxes or points.
And manual prompt generation is tedious for large collections of still images or video.In contrast, text-based prompts describing the object(s) in the foreground to segment can be constant.
Inspired by [Grounded-Segment-Anything](https://github.com/IDEA-Research/Grounded-Segment-Anything),
this project tries to package a simpler to use tool.If you're not interested in text-based prompts with Segment Anything,
check out [rembg](https://github.com/danielgatis/rembg).## How does it work?
The foreground is selected using text prompts to [GroundingDINO](https://github.com/IDEA-Research/GroundingDINO) to detect objects.
Image segments are generated using [Segment Anything](https://github.com/facebookresearch/segment-anything)
or [Segment Anything HQ (SAM-HQ)](https://github.com/SysCV/SAM-HQ).## Quick start
```bash
# Ubuntu 22.04, Python 3.9 - 3.11
pip install ezsam
sudo apt install ffmpeg imagemagick
ezsam --help
ezsam-gui
```For more detailed info, see the documentation site here: [ezsam.org](https://www.ezsam.org)