🛠️ Installation
pip install metasam
🤗 Model Hub
bash script/download_model.sh
⭐ Usage
from metasam import SAM2Wrapper
# Initialize SAM2Wrapper
sam = SAM2Wrapper("path/to/checkpoint", "path/to/config")
# Load an image
sam.set_image("path/to/your/image.jpg")
# Predict segmentation
masks, scores, logits = sam.predict(point_coords=[[500, 640]], point_labels=[1])
# Visualize results
sam.show_masks(masks, scores)
😍 Contributing
pip install pre-commit
pre-commit install
pre-commit run --all-files
📜 License
This project is licensed under the terms of the Apache License 2.0.
🤗 Citation
@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 arXiv:2408.00714},
url={https://arxiv.org/abs/2408.00714},
year={2024}
}
Metadata
Release files for metasam 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| metasam-0.0.3.tar.gz | 64.9 kB | Without provenance | Details for metasam-0.0.3.tar.gz |
Release files / metasam-0.0.3.tar.gz
| Download URL | metasam-0.0.3.tar.gz |
|---|---|
| Size | 64.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2c91e985158fdf40439266c46579671545114b5243388c526bc4e08c2d874616
|
|
BLAKE2b-256 checksum How to use checksums |
a262c5878d8396a5e41cabfa1a863f865249af4b7e5dc245f59488e7b90498ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.10.12
|
Security for metasam 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.