Dense (N, H, W) bool masks cause OOM for aerial imagery (1000 objects x 4K image ~ 8.3 GB). CompactMask encodes each mask as a run-length sequence of its bounding-box crop, reducing typical usage to ~2 MB. * fix: correct bounding box coordinates in CompactMask doctests * feat: implement memory-efficient IoU and NMS with CompactMask integration * test: add extensive tests for CompactMask IoU, NMS, and InferenceSlicer integration * feat(examples): add CompactMask demo and benchmark * feat(examples): expand CompactMask benchmark with new stages and metrics * feat(tests): add detailed CompactMask tests for NMM, centroids, holes, and segments * feat(compact_mask): add repack(), fix merge perf, and add parity tests * fix(masks): handle empty crops by defaulting centroid to (0, 0) * feat(compact_mask): add `bbox_xyxy` property and improve type annotations * feat(compact_mask): enhance `with_offset` for clipping and add tests * docs(compact_mask): unwrap prose and add per-operation speedup analysis * perf(compact_mask): fast path in with_offset avoids decode/re-encode * fix(benchmark): count NMS mismatches and explain exact-vs-resize difference * test(compact_mask): add 121 parametrised random-scenario parity tests * refactor: rename single-char variables to descriptive names * fix(nms): remove resize-to-640 approximation from mask_non_max_suppression * docs(compact_mask): update README with fresh benchmark results * refactor(benchmark): improve summary table logic, add CSV export * docs(compact_mask): update README with revised benchmark speedups and cleanup --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: Codex <codex@openai.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Examples
Here, you'll find end-to-end examples that show how to solve common computer vision problems using Supervision.
For more information and examples, visit our documentation and explore our how-to guides and cookbooks. Join our Discord and meet other Supervision power users!