heatmapcalc
heatmapcalc is a minimalistic python package that provides a fast function to
add circles to a numpy array, based on a list of bounding boxes.
It is written in Rust for performance.
Installation
Install with pip:
pip install heatmapcalc
With Rust installed, you can build the package from source:
pip install .
Usage
Here is a simple example:
from heatmapcalc import heatmapcalc
boxes = [
(10, 300, 100, 600),
(150, 300, 300, 600),
(250, 215, 450, 425),
(430, 215, 550, 425),
]
shape = (600, 800)
heatmap = heatmapcalc(boxes, shape)
This can now be used to visualize it and overlay it on an image.
This is shown in the example script.
Development
- Deploy: To deploy on PyPi, trigger the CI
workflow on GitHub with the latest commit tag. The workflow builds and uploads
the wheels for Linux and MacOS.
- Test: Test with
pytest.