Skip to main content

Prompt based automatic annotation

Project description

pbaa

PyPI - Version PyPI - Python Version

Easy inference implementation of Grounded-Sam for Prompt-based automatic annotation


Table of Contents

Grounded-SAM

Most of code based on Grounded-Sam

Installation

pip install pbaa

Usage

Option

  • --source, -s : Path to source image or directory. (processing)
    • --source <Source image>
    • --source source_image.jpg
  • --prompt, -p : Space-separated a pair of prompt and target classe. (Multi)
    • --prompt "<Prompt>" <Class>
    • --prompt "black dog" dog

CLI

# pbaa -s <Source> -p <prompt> <class> -p <prompt> <class> ...

pbaa -s source_image.jpg -p "black dog" dog
pbaa -s source_image.jpg -p "black dog" dog -p "white cat" cat

Python

from pbaa import inference

inference("path/to/source_image.jpg", {"black dog": "dog", "white cat": "cat"})

License

pbaa is distributed under the terms of the Apache-2.0 license.

Acknowledgements

Grounded-Segment-Anything :https://github.com/IDEA-Research/Grounded-Segment-Anything

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

pbaa-1.0.0.tar.gz (18.3 kB view hashes)

Uploaded Source

Built Distribution

pbaa-1.0.0-py3-none-any.whl (12.0 kB view hashes)

Uploaded Python 3

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