Skip to main content

Efficient and distributed polygon Non-Maximum Suppression (NMS) library

Project description

PolyGoneNMS

PolyGoneNMS is a library for efficient and distributed polygon Non-Maximum Suppression (NMS) in Python. It supports various NMS methods, intersection calculations, and can handle large numbers of polygons in 1D, 2D, and 3D spaces. PolyGoneNMS uses R-tree data structures and shapely polygon objects for optimal performance.

Benchmark Plots

Benchmark results

Features

  • Efficient polygon NMS for large numbers of polygons.
  • Support for various NMS methods: Default, Soft, and Class Agnostic.
  • Support for different intersection methods: IOU, IOS, and Dice.
  • R-tree data structure for efficient spatial indexing and querying.
  • Distributed processing support using Ray and Dask.
  • Comprehensive documentation and examples.

Installation

You can install PolyGoneNMS using pip:

pip install polygone-nms

Quickstart

import numpy as np
from polygone_nms import polygone_nms

# Example input data
data = np.array([
    [0, 0, 1, 1, 0, 1, 0, 0, 1, 0.9],
    [0.5, 0.5, 1.5, 1.5, 0.5, 1.5, 0, 0, 1, 0.8],
])

# Apply NMS
results = nms(data, distributed=None, nms_method="Default", intersection_method="IOU")

print("Filtered indices:", results)

# Filtered data
print("Filtered data:")
print(data[results])

For a more detailed guide on using PolyGoneNMS, please see the Quickstart in the documentation.

Documentation

Detailed documentation is available at: Docs

Contributing

We welcome contributions to the project! Please follow the usual GitHub process for submitting issues or pull requests.

License

This project is licensed under the MIT License.

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

polygone-nms-0.1.7.tar.gz (14.4 kB view details)

Uploaded Source

Built Distribution

polygone_nms-0.1.7-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file polygone-nms-0.1.7.tar.gz.

File metadata

  • Download URL: polygone-nms-0.1.7.tar.gz
  • Upload date:
  • Size: 14.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for polygone-nms-0.1.7.tar.gz
Algorithm Hash digest
SHA256 2400ba8f2085dbf738e3e89ca431723ba005c4f808025a4484f34ddd2d86b11f
MD5 cdddf05a1586e992fb5c8ac8ec75d1cc
BLAKE2b-256 fe687ad39b4953740d390f982468d34a651670d5cdb737a7825597fe1bff21bd

See more details on using hashes here.

File details

Details for the file polygone_nms-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: polygone_nms-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for polygone_nms-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 f43702df9fbe33172384f54fe010bff301ad719b5b2379ca307cc3a96486b6f7
MD5 e185d34dfcb1dd1edc177236c4ef5896
BLAKE2b-256 b086546d7e32a63925a7b1efa4f9073daf364dabcf5e8a190bbc3edc6fc05366

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