hercules261188 / segment-anything-video

MetaSeg: Packaged version of the Segment Anything repository

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MetaSeg: Packaged version of the Segment Anything repository

teaser
downloads pypi version HuggingFace Spaces

This repo is a packaged version of the segment-anything model.

Installation

pip install metaseg

Usage

from metaseg import SegAutoMaskGenerator

# If gpu memory is not enough, reduce the points_per_side and points_per_batch.

# For image

autoseg_image = SegAutoMaskGenerator().save_image(
    source="image.jpg",
    model_type="vit_l",
    points_per_side=16, 
    points_per_batch=64,
    min_area=0,
)

# For video

autoseg_video = SegAutoMaskGenerator().save_video(
    source="video.mp4",
    model_type="vit_l",
    points_per_side=16, 
    points_per_batch=64,
    min_area=1000,
)

Extra Features

  • Support for video files
  • Support for pip installation
  • Support for web application
  • Support for automatic download model weights

About

MetaSeg: Packaged version of the Segment Anything repository

License:Apache License 2.0


Languages

Language:Python 99.9%Language:Shell 0.1%