Skip to main content

Open vocabulary detection and segmentation package

Project description

Open vocabulary segmentation

Installation

pip install ovsegmentation
pip install git+https://github.com/NVIDIA-AI-IOT/torch2trt.git

Models

  • GroundingDINO
  • MobileSAMv2

Usage

Get detection

from ovsegmentation import build_segmentator, visualize, get_waypoint, OVSegmentation
input_data = {
    "image": image,
    "text": ovd_prompt,
    "depth": depth_image,
    "intrinsics": intrinsics,
}
    
ovs = build_segmentator(weights_path='weights')

res = ovs.get_detections(input_data)

Visualize

annotated_image, labels = visualize(
    image, res, instance_random_color=True, draw_bbox=True
)
plt.figure(figsize=(15, 8))
plt.imshow(annotated_image)
plt.show()

Weights structure

Weights structure:

  • WEIGHTS_DIR/MobileSAMv2/l2_encoder.engine
  • WEIGHTS_DIR/MobileSAMv2/mobilesamv2_decoder.engine
  • WEIGHTS_DIR/MobileSAMv2/ObjectAwareModel.engine
  • WEIGHTS_DIR/GroundingDINO/groundingdino_swint_ogc.pth

weights_path: WEIGHTS_DIR

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

ovsegmentation-1.0.2-py3-none-any.whl (1.3 MB 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