data
BboxParams
BboxParams(format: str = 'pascal_voc', min_area: float = 0.0, min_visibility: float = 0.0, label_fields: tuple[str, ...] = ())Bounding-box handling policy for Compose (Albumentations-style).
When a Compose is constructed with bbox_params=...,
it records every lucid.utils.transforms.BoundingBoxes's
pre-pipeline area, runs the pipeline, then calls
lucid.utils.transforms._datatypes.filter_boxes on the
result with these thresholds. Out-of-frame / heavily-occluded
boxes — and their labels — are dropped in one place rather than
re-implemented inside every geometric transform.
Parameters
formatstr= "pascal_voc"Albumentations format name. Informational only; each
lucid.utils.transforms.BoundingBoxes already carries
its own format and conversion is handled per-instance.min_areafloat= 0.0Drop post-transform boxes whose absolute pixel area is below
this (units: pixels² in the post-transform canvas).
min_visibilityfloat= 0.0Drop boxes whose visible fraction (area / original area) falls
below this. The ratio is computed against the
lucid.utils.transforms._datatypes.box_areas snapshot
recorded before the pipeline ran.label_fieldstuple of str= ()Reserved for API parity with Albumentations; in Lucid, labels
already travel on
BoundingBoxes.labels and are trimmed
in lock-step. No-op here.Examples
>>> import lucid
>>> import lucid.utils.transforms as T
>>> tf = T.Compose(
... [T.Crop(0, 0, 50, 50)],
... bbox_params=T.BboxParams(min_area=10.0, min_visibility=0.5),
... )