Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #2220 +/- ##
=======================================
Coverage 78% 78%
=======================================
Files 66 66
Lines 8345 8347 +2
=======================================
+ Hits 6473 6475 +2
Misses 1872 1872 🚀 New features to boost your workflow:
|
fbd62d3 to
6ba9c19
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Release housekeeping for supervision==0.28.0, updating package/version metadata and publishing the 0.28.0 changelog, plus adding a deprecation shim for the denormalize_boxes argument rename.
Changes:
- Bump project version from
0.28.0rc1to0.28.0. - Mark changelog
0.28.0as released (date + consolidated release notes). - Add a deprecation decorator/alias parameter for
sv.denormalize_boxesargument rename support.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/supervision/detection/utils/boxes.py |
Adds a @deprecated(... args_mapping=...) wrapper and introduces normalized_xyxy in the function signature. |
pyproject.toml |
Updates the project version to 0.28.0. |
docs/changelog.md |
Publishes the 0.28.0 section with a release date and full bullet list. |
# Conflicts: # pyproject.toml
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
- Add 12 missing Fixed/Added entries to docs/changelog.md for 0.28.0 (PolygonZone, LineZone, process_video, DetectionDataset, ByteTrack, confusion matrix, MeanAverageRecall, COCO polygons, OBB memory, KeyPoints, as_coco, force_mask) - Add notebooks/release-demo_0-28.py: RF-DETR Seg + CompactMask demo (239x memory reduction), SAM3 via hosted API, VideoInfo.fps float, ByteTrack deprecation --- Co-authored-by: Claude Code <noreply@anthropic.com>
- Introduce `notebooks/convert_to_ipynb.sh` for automated `.py` to `.ipynb` conversion using `jupytext`. - Enhance `release-demo_0-28.py` by replacing conditional checks with assertions for improved robustness. - Streamline SAM3 integration by removing redundant `if-else` checks and reorganizing logic.
…nfig - Sort imports in `notebooks/release-demo_0-28.py` for better readability. - Add per-file ignores for `notebooks/**` in `pyproject.toml` lint configuration.
Borda
commented
Apr 30, 2026
Borda
commented
Apr 30, 2026
Co-authored-by: Jirka Borovec <6035284+Borda@users.noreply.github.com>
…ebook for improved robustness and consistency
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
supervision 0.28.0
Release date: 2026-04-30
🔦 Spotlight
Memory-efficient masks with
sv.CompactMaskSegmentation models produce one full-resolution bitmap per instance. On a 1920×1080 image with 28 detections that is ~55 MB of mask data. Most pixels are background.
sv.CompactMaskstores only the tight bounding-box crop, RLE-encoded — the same 28 masks drop to ~237 KB of crops, a 240× reduction before RLE kicks in.It's a drop-in replacement: annotators, filters, and
areaall work unchanged.SAM3 text-prompted segmentation
SAM3 segments objects by free-text prompt — no class list, no bounding boxes.
sv.Detections.from_sam3()parses both PCS (multi-prompt) and PVS (video) response formats into a standardsv.Detections, withclass_idset to the prompt index.🔄 Migration
VideoInfo.fpsis nowfloatNTSC frame rates (23.976, 29.97, 59.94) were silently truncated.
fpsis now the true float — cast at call sites that need an integer.Before
After
sv.ByteTrackdeprecated — useByteTrackTrackerTracker implementations now live in the dedicated
trackerspackage.sv.ByteTrackremains available in 0.28–0.29 withDeprecationWarning; removal in 0.30.0.Before
After
🚀 Added
Memory-efficient masks with
sv.CompactMask. Sparse segmentation masks are now stored as a crop region plus RLE-encoded data instead of full-resolution bitmaps, cutting memory use by 10–100× for typical instance-segmentation outputs. It's a drop-in change —sv.Detections.mask, filtering, merging, andareaall keep working without materialising the full array. (#2159)SAM3 detection and PVS support in
from_inference.sv.Detections.from_inferencenow parses SAM3 detection and point-video-segmentation outputs, both from the localinferencepackage and from Roboflow-hosted server responses. (#2103, #2152)Compressed COCO RLE masks in
from_inference. Inference responses withrleorrle_maskfields containing a compressed counts string (as produced bypycocotools) are decoded directly into binary masks, skipping the lossy polygon round-trip. (#2178)Standard
loggingmodule instead ofprint. Diagnostic output is now emitted under thesupervisionlogger, so applications can capture, filter, or silence it through standardloggingconfiguration. (#2154)RGBA hex codes in
sv.Color.sv.Color.from_hexaccepts 8-digit hex (#ff00ff80), andColor.as_hex()round-trips alpha when not fully opaque. New top-level helpers:sv.hex_to_rgba,sv.rgba_to_hex, andsv.is_valid_hex. (#2004)Dynamic kernel sizing in blur and pixelate annotators.
BlurAnnotator(kernel_size=None)andPixelateAnnotator(pixel_size=None)(the new default) compute the kernel per detection as a fraction of the shorter bounding-box side, giving visually consistent results across object scales. (#709)sv.ImageAssetsfor sample images. A counterpart to the existing video assets — downloads sample images for examples and tutorials. (#932)Boundary warnings in
InferenceSlicer. Emits a warning when callback detections fall outside tile boundaries, helping you spot coordinate-system bugs in custom callbacks early. (#2186)sv.VideoInfo.fpsis nowfloat, notint. Frame rates like 23.976, 29.97, and 59.94 are no longer truncated. If you passfpsto APIs that require an integer (deque(maxlen=...),TraceAnnotator(trace_length=...)), wrap withint(...). (#2210)sv.rle_to_maskreturnsbool, notuint8. This matches the long-declared signature. Code that doesmask * 255still works via NumPy broadcasting, but explicit casts likemask.view(np.uint8)will break. Add.astype(np.uint8)if you relied on the undocumented integer output. (#2178)See the migration guide below for before/after snippets.
🌱 Changed
Metric arrays use
float32instead offloat64.sv.MeanAveragePrecisionResultand related arrays (mAP_scores,ap_per_class,iou_thresholds, precision/recall) drop tofloat32, reducing memory and speeding up computation. Numerical results may differ in the last few digits. (#2169)rle_to_maskandmask_to_rlemoved. New canonical path:supervision.detection.utils.converters. The oldsupervision.dataset.utilsimport still works but is deprecated. (#2178)🗑️ Deprecated
normalized_xyxyargument renamed toxyxyindenormalize_boxes.sv.denormalize_boxes(normalized_xyxy=...)still works but emits aFutureWarning; switch toxyxy=. Scheduled for removal in 0.30.0.sv.ByteTrack→ByteTrackTracker(externaltrackerspackage). Install withpip install trackers; the method renames fromupdate_with_detections()toupdate(). Scheduled for removal in 0.30.0. (#2215)supervision.keypoint→supervision.key_points. Also deprecated: theLMMenum (useVLM),from_lmm(usefrom_vlm),create_tilesinsupervision.utils.image,ensure_cv2_image_for_processinginsupervision.utils.conversion, and the keypoint validators insupervision.validators. (#2214)🔧 Fixed
PolygonZoneno longer double-counts overlapping zones. When two polygons contain the same anchor, each zone now reflects its own containment instead of every zone claiming the detection. (#1991)LineZonerespects class identity across reused tracker IDs. Trackers that recycletracker_idacross classes no longer leak crossing state from one object to another. (#1868)process_videoraises immediately on callback errors. Previously the exception was swallowed and the process hung until the writer was flushed. (#2022)DetectionDatasetpopulatesclass_name. Loaded annotations now carrydata["class_name"], matching what model connectors produce. (#2156)ByteTrackpreserves externally assignedtracker_id. No longer overwrites caller-assigned IDs on the first update. (#1364)Confusion matrix double-counting fixed.
evaluate_detection_batchnow correctly matches multiple predictions to the same target, so FP/FN counts match expectations. (#1853)MeanAverageRecallmAR@K is now COCO-compliant. Computed using top-K detections per image; previous values were inflated relative topycocotools. (#2136)Detections.is_empty()handles emptytracker_id. ReturnsTruefor zero-row detections regardless of whethertracker_idisNoneor an empty array. (#2209)CSVSinkandJSONSinkslicecustom_dataper row. NumPy arrays, lists, and tuples whose length matches the detection count are now indexed per row, instead of being written whole for every detection. (#2199, #2216)TraceAnnotatorsmooth mode handles stationary tracks. Deduplicates anchor points and falls back to a raw polyline whensplprepcannot fit fewer than 4 unique points. (#2217)load_coco_annotationsrejects path-traversal annotations. Refusesfile_nameentries that escape the images directory via../or absolute paths. (#2218)OBB datasets no longer blow up memory. Loading oriented-bounding-box datasets stopped allocating full-image masks per box. (#2187)
KeyPointsboolean mask indexing fixed. Uniform-count selection now works correctly when all instances share the same keypoint count. (#2188)DetectionDataset.as_coco()preservesareaandiscrowd. No longer dropped silently in the round-trip. (#2185)force_mask=Trueprecision and COCO empty-polygon export. Annotation conversion no longer loses precision, and COCO export tolerates empty polygons across formats. (#1746, #1086, #265)🏆 Contributors
A huge thank you to everyone who shipped this release:
rle_to_maskcorrectnessVideoInfo.fpsas float andDetections.is_empty()fixclass_nameinDetectionDatasetCSVSinkNumPy slicingMeanAverageRecallPolygonZoneoverlap fixLineZoneclass-aware tracker IDsprocess_videoerror propagationByteTrackpreserves external tracker IDsforce_masksconsistencysv.Colorsv.ImageAssetsforce_mask=Trueprecision fixCompactMask, metrics float32, deprecationsFull changelog: 0.27.0...0.28.0