samv2-webcam


Namesamv2-webcam JSON
Version 0.0.3 PyPI version JSON
download
home_pageNone
SummaryCPU compatible fork of the official SAMv2 implementation with Webcam support
upload_time2025-01-24 05:31:41
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords deep-learning pytorch
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <a href="https://colab.research.google.com/github/SauravMaheshkar/samv2/blob/main/examples/notebooks/samv2_prompted_segmentation_with_wandb_tables.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
[![Build and Tests](https://github.com/SauravMaheshkar/samv2/actions/workflows/ci.yml/badge.svg)](https://github.com/SauravMaheshkar/samv2/actions/workflows/ci.yml) [![](https://img.shields.io/badge/Weights_&_Biases-FFCC33?&logo=WeightsAndBiases&logoColor=black)](https://wandb.ai/sauravmaheshkar/samv2)

CPU **compatible** fork of the official SAMv2 implementation with webcam support.

## Features 🚀

* CPU compatible
* ships with config files
* Run image and video, and webcam inference on CPUs
* [Example notebooks](../examples/notebooks/) showcasing inference using weights and biases.

## Installation

You can download it from [pypi](https://pypi.org/) using `pip` as follows:

```bash
pip install samv2-webcam
```

or from the repository:

```bash
pip install git+https://github.com/sonnyky/samv2.git
```

## Usage

After downloading the official weights, you can use the `load_model()` helper method to instantiate a model.

```python
from sam2 import load_model

model = load_model(
    variant="tiny",
    ckpt_path="artifacts/sam2_hiera_tiny.pt",
    device="cpu"
)
```

* [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/SauravMaheshkar/samv2/blob/main/examples/notebooks/samv2_prompted_segmentation_with_wandb_tables.ipynb) Example Notebook to run prompted segmentation on images logging predictions as W&B Tables.
* [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/SauravMaheshkar/samv2/blob/main/examples/notebooks/samv2_automatic_segmentation_with_wandb_tables.ipynb) Example Notebook to run automatic segmentation on images logging predictions as W&B Tables.

## Citation

```bibtex
@article{ravi2024sam2,
  title={SAM 2: Segment Anything in Images and Videos},
  author={Ravi, Nikhila and Gabeur, Valentin and Hu, Yuan-Ting and Hu, Ronghang and Ryali, Chaitanya and Ma, Tengyu and Khedr, Haitham and R{\"a}dle, Roman and Rolland, Chloe and Gustafson, Laura and Mintun, Eric and Pan, Junting and Alwala, Kalyan Vasudev and Carion, Nicolas and Wu, Chao-Yuan and Girshick, Ross and Doll{\'a}r, Piotr and Feichtenhofer, Christoph},
  journal={arXiv preprint},
  year={2024}
}
```


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "samv2-webcam",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "deep-learning, pytorch",
    "author": null,
    "author_email": "Sonny Kurniawan <sonny.kurniawan.yap@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/b4/b6/cf740481d42290a6884a21f540db94671086fd9a16e23163ed49e87ef704/samv2_webcam-0.0.3.tar.gz",
    "platform": null,
    "description": "<a href=\"https://colab.research.google.com/github/SauravMaheshkar/samv2/blob/main/examples/notebooks/samv2_prompted_segmentation_with_wandb_tables.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>\n[![Build and Tests](https://github.com/SauravMaheshkar/samv2/actions/workflows/ci.yml/badge.svg)](https://github.com/SauravMaheshkar/samv2/actions/workflows/ci.yml) [![](https://img.shields.io/badge/Weights_&_Biases-FFCC33?&logo=WeightsAndBiases&logoColor=black)](https://wandb.ai/sauravmaheshkar/samv2)\n\nCPU **compatible** fork of the official SAMv2 implementation with webcam support.\n\n## Features \ud83d\ude80\n\n* CPU compatible\n* ships with config files\n* Run image and video, and webcam inference on CPUs\n* [Example notebooks](../examples/notebooks/) showcasing inference using weights and biases.\n\n## Installation\n\nYou can download it from [pypi](https://pypi.org/) using `pip` as follows:\n\n```bash\npip install samv2-webcam\n```\n\nor from the repository:\n\n```bash\npip install git+https://github.com/sonnyky/samv2.git\n```\n\n## Usage\n\nAfter downloading the official weights, you can use the `load_model()` helper method to instantiate a model.\n\n```python\nfrom sam2 import load_model\n\nmodel = load_model(\n    variant=\"tiny\",\n    ckpt_path=\"artifacts/sam2_hiera_tiny.pt\",\n    device=\"cpu\"\n)\n```\n\n* [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/SauravMaheshkar/samv2/blob/main/examples/notebooks/samv2_prompted_segmentation_with_wandb_tables.ipynb) Example Notebook to run prompted segmentation on images logging predictions as W&B Tables.\n* [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/SauravMaheshkar/samv2/blob/main/examples/notebooks/samv2_automatic_segmentation_with_wandb_tables.ipynb) Example Notebook to run automatic segmentation on images logging predictions as W&B Tables.\n\n## Citation\n\n```bibtex\n@article{ravi2024sam2,\n  title={SAM 2: Segment Anything in Images and Videos},\n  author={Ravi, Nikhila and Gabeur, Valentin and Hu, Yuan-Ting and Hu, Ronghang and Ryali, Chaitanya and Ma, Tengyu and Khedr, Haitham and R{\\\"a}dle, Roman and Rolland, Chloe and Gustafson, Laura and Mintun, Eric and Pan, Junting and Alwala, Kalyan Vasudev and Carion, Nicolas and Wu, Chao-Yuan and Girshick, Ross and Doll{\\'a}r, Piotr and Feichtenhofer, Christoph},\n  journal={arXiv preprint},\n  year={2024}\n}\n```\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "CPU compatible fork of the official SAMv2 implementation with Webcam support",
    "version": "0.0.3",
    "project_urls": {
        "homepage": "https://github.com/sonnyky/samv2",
        "repository": "https://github.com/sonnyky/samv2"
    },
    "split_keywords": [
        "deep-learning",
        " pytorch"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "c109d4a3478e0070b42b12865b13eb6907238e4150cab1cc4ddb3871d2e29fcc",
                "md5": "d4a54f691ee5987053f246ec869ac4ca",
                "sha256": "4a1e302b2aa023db7362a57531ac64984a17f80345c35bf80a3c1e0abec00515"
            },
            "downloads": -1,
            "filename": "samv2_webcam-0.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d4a54f691ee5987053f246ec869ac4ca",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 86015,
            "upload_time": "2025-01-24T05:31:39",
            "upload_time_iso_8601": "2025-01-24T05:31:39.020741Z",
            "url": "https://files.pythonhosted.org/packages/c1/09/d4a3478e0070b42b12865b13eb6907238e4150cab1cc4ddb3871d2e29fcc/samv2_webcam-0.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "b4b6cf740481d42290a6884a21f540db94671086fd9a16e23163ed49e87ef704",
                "md5": "1f51d9cc5f963f43c91a97a0be928120",
                "sha256": "ee3b39ee8c71d83c66836f1baf6e61f49a83f9e271a1d05c3fc1f9130d3f4582"
            },
            "downloads": -1,
            "filename": "samv2_webcam-0.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "1f51d9cc5f963f43c91a97a0be928120",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 69475,
            "upload_time": "2025-01-24T05:31:41",
            "upload_time_iso_8601": "2025-01-24T05:31:41.433525Z",
            "url": "https://files.pythonhosted.org/packages/b4/b6/cf740481d42290a6884a21f540db94671086fd9a16e23163ed49e87ef704/samv2_webcam-0.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-24 05:31:41",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "sonnyky",
    "github_project": "samv2",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "samv2-webcam"
}
        
Elapsed time: 1.60124s