Skip to main content

Segment Anything High Quality (SAM HQ) model for use with Autodistill

Project description

Autodistill Segment Anything HQ Module

This repository contains the code supporting the Segment Anything base model for use with Autodistill.

SAM HQ is a zero-shot segmentation model capable of producing detailed masks, developed by ETH VIS. SAM HQ can segment an entire image into masks, or use points to segment specific parts of an object. You can use Segment Anything with Autodistill to segment objects. Segment Anything does not assign classes, so you should use SAM HQ model with a tool like Grounding DINO or GPT-4V.

Read the full Autodistill documentation.

Read the SAM HQ Autodistill documentation.

Installation

To use SAM HQ with autodistill, you need to install the following dependency:

pip3 install autodistill-sam-hq

Quickstart

from autodistill_sam_hq import HQSAM

base_model = HQSAM(None)

masks = base_model.predict("./image.jpeg")

print(masks)

License

This project is licensed under an Apache 2.0 license.

🏆 Contributing

We love your input! Please see the core Autodistill contributing guide to get started. Thank you 🙏 to all our contributors!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

autodistill-sam-hq-0.1.1.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

autodistill_sam_hq-0.1.1-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file autodistill-sam-hq-0.1.1.tar.gz.

File metadata

  • Download URL: autodistill-sam-hq-0.1.1.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for autodistill-sam-hq-0.1.1.tar.gz
Algorithm Hash digest
SHA256 afa881dd325e923472f3858c3193217b9c13415a493de7fb76a0d9985a35f83b
MD5 45fe7589fbd9ec1c5116018a24161243
BLAKE2b-256 695a42aefd1780f26ae994eca9e3cefff4a7158d977f5de96c1d2db6612f6ba8

See more details on using hashes here.

File details

Details for the file autodistill_sam_hq-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for autodistill_sam_hq-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 143005c7450087a638ebbcb290815509826e82ec0b498324e5a45b653eec2c5a
MD5 638af2b7ac55419cffb68969423f4dbc
BLAKE2b-256 eeda72c21fb1431467d9326115084ad0ca359540e3925c681f5365b9bc033c2b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page