Changelog
0.7.0
API changes
- Ground-truth matching now returns a
MatchResultthat keeps box IDs, selected anchor indices, IoUs, masks, and matched boxes together. Its mappings are keyed by unique box IDs instead of class labels, preserving multiple objects of the same class. Pass stable application IDs such as UUIDs when identity must survive input reordering, or omit them to use zero-based positions. Existing three-value tuple unpacking remains supported. - Matching remains independent per ground-truth object, so the same anchor may intentionally match multiple objects.
MultiBx.coordsis now consistently stored as numeric(N, 4)coordinates; embedded labels are separated in the same order intoMultiBx.labels, and explicitly supplied labels take precedence. The existing singularMultiBx.labelremains available for compatibility.Bx.yolo()now returns full-precision coordinates, consistent withBx.xywh(). Width and height are applied only whennormalize=True.
Fixes
- Maximum-IoU matching now selects distinct anchors when IoU values tie. IoUs retain full precision during ranking.
- Matching returns full-precision IoUs without rounding and computes all ground-truth/anchor IoUs as a vectorized NumPy matrix instead of evaluating each pair in Python.
Dependencies
- Matplotlib and OpenCV are now optional. Install
pybx[viz],pybx[opencv], orpybx[all]as needed. Optional imports occur only when those features are used and report the corresponding installation command when unavailable.
0.6.0
Compatibility
- Added test coverage and package metadata for Python 3.8 through Python 3.14.
- Replaced exact NumPy and OpenCV runtime pins with compatible ranges so pip can select suitable wheels for each supported Python version.
Development
- Migrated project metadata, packaging, and documentation tooling to nbdev 3 and
pyproject.toml.
0.5.0
API changes
Python 3.8 remains the supported development and CI runtime. Bounding box parsing now accepts a single dictionary, a list of dictionaries, a JSON string, Python numeric coordinates, and NumPy numeric coordinates. A dictionary without a label receives the label "unknown":
from pybx.basics import get_bx
box = get_bx({"x_min": 130, "y_min": 63, "x_max": 225, "y_max": 180})
box.labelInputs are validated as Pascal VOC boxes: exactly four coordinates and an optional string or integer label, non-negative coordinates, and maxima greater than minima. For explicit construction, use bbx for coordinate lists, dbx for dictionaries, and jbx for JSON strings or dictionaries. The former lbx alias has been removed; use bbx instead.
Bx.xywh() and Bx.yolo() now include the label as the fifth value in their returned box. IoU values retain full floating-point precision.