ezsam


Nameezsam JSON
Version 0.5.0 PyPI version JSON
download
home_pageNone
SummaryExtract foreground from images or video via text prompt
upload_time2024-08-01 08:20:31
maintainerNone
docs_urlNone
authorNone
requires_python<3.13,>=3.10
licenseAGPL-3.0-only
keywords groundingdino segment-anything sam sam-hq grounded-segment-anything subject object foreground background filter extract select remove prompt subtract
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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)**

<p>
  <img src="examples/car-3.gui.png" height=200 />
  <img src="examples/food.gif" height=200 alt="A large table with plates of Thanksgiving food including a whole turkey on a conveyor-style lazy susan." />
  <img src="examples/food.turkey.gif" height=200 alt="A whole cooked turkey flying through the void." />
</p>

<img src="examples/car-3.both.png" width=150 />

<img src="examples/car-3.black.png" width=150 />

<img src="examples/car-3.nowheels.png" width=150 />

## Why?

Meta's [Segment Anything](https://github.com/facebookresearch/segment-anything) is a powerful tool for separating parts of images,
but requires coordinate prompts&mdash;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)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "ezsam",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<3.13,>=3.10",
    "maintainer_email": "ae9is <aegis.opensource@gmail.com>",
    "keywords": "GroundingDINO, Segment-Anything, SAM, SAM-HQ, Grounded-Segment-Anything, subject, object, foreground, background, filter, extract, select, remove, prompt, subtract",
    "author": null,
    "author_email": "ae9is <aegis.opensource@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/8e/d5/df56f7d0c5101e1612fb08b650662f66659fb06868fea0ca4cfac95e919a/ezsam-0.5.0.tar.gz",
    "platform": null,
    "description": "# ezsam (easy segment anything model)\n\nA command line and gui tool to segment images and video via text prompts.\n\nInput images and videos, describe the subjects or objects you want to keep, and output new images and videos with the background removed.\n\n**Check out the docs! [ezsam.org](https://www.ezsam.org)**\n\n<p>\n  <img src=\"examples/car-3.gui.png\" height=200 />\n  <img src=\"examples/food.gif\" height=200 alt=\"A large table with plates of Thanksgiving food including a whole turkey on a conveyor-style lazy susan.\" />\n  <img src=\"examples/food.turkey.gif\" height=200 alt=\"A whole cooked turkey flying through the void.\" />\n</p>\n\n<img src=\"examples/car-3.both.png\" width=150 />\n\n<img src=\"examples/car-3.black.png\" width=150 />\n\n<img src=\"examples/car-3.nowheels.png\" width=150 />\n\n## Why?\n\nMeta's [Segment Anything](https://github.com/facebookresearch/segment-anything) is a powerful tool for separating parts of images,\nbut requires coordinate prompts&mdash;either bounding boxes or points.\nAnd manual prompt generation is tedious for large collections of still images or video.\n\nIn contrast, text-based prompts describing the object(s) in the foreground to segment can be constant.\nInspired by [Grounded-Segment-Anything](https://github.com/IDEA-Research/Grounded-Segment-Anything),\nthis project tries to package a simpler to use tool.\n\nIf you're not interested in text-based prompts with Segment Anything, \ncheck out [rembg](https://github.com/danielgatis/rembg).\n\n## How does it work?\n\nThe foreground is selected using text prompts to [GroundingDINO](https://github.com/IDEA-Research/GroundingDINO) to detect objects.\nImage segments are generated using [Segment Anything](https://github.com/facebookresearch/segment-anything) \nor [Segment Anything HQ (SAM-HQ)](https://github.com/SysCV/SAM-HQ).\n\n## Quick start\n\n```bash\n# Ubuntu 22.04, Python 3.9 - 3.11\npip install ezsam\nsudo apt install ffmpeg imagemagick\nezsam --help\nezsam-gui\n```\n\nFor more detailed info, see the documentation site here: [ezsam.org](https://www.ezsam.org)\n",
    "bugtrack_url": null,
    "license": "AGPL-3.0-only",
    "summary": "Extract foreground from images or video via text prompt",
    "version": "0.5.0",
    "project_urls": {
        "Bug reports": "https://github.com/ae9is/ezsam/issues",
        "Homepage": "https://www.ezsam.org",
        "Source": "https://github.com/ae9is/ezsam"
    },
    "split_keywords": [
        "groundingdino",
        " segment-anything",
        " sam",
        " sam-hq",
        " grounded-segment-anything",
        " subject",
        " object",
        " foreground",
        " background",
        " filter",
        " extract",
        " select",
        " remove",
        " prompt",
        " subtract"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fa1f825f904da27551ae6f1e0307a67b29423c296482a14fbabc9b87f33c4bd8",
                "md5": "d090ed97bce5f5d79c7f45dd189cee9d",
                "sha256": "ec03f96085616821f2632ee784b97ede1b65dcc340c576bfe2b9e579c1f52622"
            },
            "downloads": -1,
            "filename": "ezsam-0.5.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d090ed97bce5f5d79c7f45dd189cee9d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.13,>=3.10",
            "size": 35780,
            "upload_time": "2024-08-01T08:20:29",
            "upload_time_iso_8601": "2024-08-01T08:20:29.367663Z",
            "url": "https://files.pythonhosted.org/packages/fa/1f/825f904da27551ae6f1e0307a67b29423c296482a14fbabc9b87f33c4bd8/ezsam-0.5.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8ed5df56f7d0c5101e1612fb08b650662f66659fb06868fea0ca4cfac95e919a",
                "md5": "02ff954775e6092172df3e7e33a2aec8",
                "sha256": "2d754bfef2e024e563db9d3a316a69fc262cb4ce474a6fd7ee02a2ad53364dcb"
            },
            "downloads": -1,
            "filename": "ezsam-0.5.0.tar.gz",
            "has_sig": false,
            "md5_digest": "02ff954775e6092172df3e7e33a2aec8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.13,>=3.10",
            "size": 65703,
            "upload_time": "2024-08-01T08:20:31",
            "upload_time_iso_8601": "2024-08-01T08:20:31.792803Z",
            "url": "https://files.pythonhosted.org/packages/8e/d5/df56f7d0c5101e1612fb08b650662f66659fb06868fea0ca4cfac95e919a/ezsam-0.5.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-01 08:20:31",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ae9is",
    "github_project": "ezsam",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "ezsam"
}
        
Elapsed time: 3.34164s