0.30.7
9001/copyparty0.30.7Oct 4, 2026by Borda
Upgrading?
AI Summary
This release focuses on fixing eight bugs that caused video processing, metrics calculation, and dataset export to hang or fail silently. It improves the accuracy of Mean Average Precision (mAP) calculations to match `pycocotools` and enhances dataset export capabilities.
Key Highlights
- process_video now raises errors instead of hanging when frames fail to write or callbacks return None.
- MeanAveragePrecision now matches pycocotools for precise threshold handling, affecting specific recall calculations.
- Dataset export functions now support writing back into the original folder without errors (in-place export).
- from_transformers now accepts semantic output with segmentation scores instead of raising an error.
New Features
- process_video raises exceptions on write failures
- MeanAveragePrecision matches pycocotools precision
- Dataset export allows overwriting original files
- from_transformers supports segmentation scores
Full Release Notes
# v0.30.7 — Fewer hangs, truer mAP
Eight bug fixes: video processing, dataset export, mAP and Transformers loading no longer fail or hang silently.
- **`process_video`** raises on a failed write instead of hanging.
- **`MeanAveragePrecision`** matches `pycocotools` where recall lands on a threshold.
- **Dataset export** can write back into the folder the images came from.
- **`from_transformers`** reads semantic output that includes per-pixel scores.
Drop-in upgrade, no code changes. Stored mAP baselines may shift slightly.
## ✨ Spotlights / highlights
**`sv.process_video` stops hanging** ([#2636](https://github.com/roboflow/supervision/pull/2636))
A frame the writer rejects, or a callback that returns `None`, now raises instead of blocking forever.
```python
import supervision as sv
def callback(frame, index):
sv.BoxAnnotator().annotate(frame.copy(), detections) # forgot `return`
sv.process_video("in.mp4", "out.mp4", callback)
# before: hangs after `writer_buffer` frames
# now: TypeError naming the frame
```
**`sv.metrics.MeanAveragePrecision` matches `pycocotools`** ([#2638](https://github.com/roboflow/supervision/pull/2638))
Recall thresholds and recall are float64, as in `COCOeval`. A class whose recall lands exactly on a threshold used to score slightly high: mAP@50 0.7470 instead of 0.7415 in one case.
**Datasets re-export in place** ([#2637](https://github.com/roboflow/supervision/pull/2637))
```python
ds = sv.DetectionDataset.from_coco(
images_directory_path="data",
annotations_path="data/_annotations.coco.json",
)
ds.as_coco(
images_directory_path="data",
annotations_path="data/_annotations.coco.json",
)
# before: shutil.SameFileError
# now: annotations rewritten, images left in place
```
**Transformers semantic output with scores** ([#2643](https://github.com/roboflow/supervision/pull/2643))
`sv.Detections.from_transformers` accepts results from `return_segmentation_scores=True` instead of raising `KeyError: 'segments_info'`.
## 🔄 Migration guide
No migration required for this release.
## 📝 Notable changes
### 🔧 Fixed
- `sv.process_video` raises `RuntimeError("Writer thread raised: ...")` or `TypeError` instead of hanging when a frame cannot be written or a callback returns `None`. ([#2636](https://github.com/roboflow/supervision/pull/2636))
- `sv.metrics.MeanAveragePrecision` computes IoU and recall thresholds, IoUs and recall in float64, matching `pycocotools`. mAP changes only for classes whose recall lands exactly on one of the 101 thresholds, by up to about 0.007 mAP@50. ([#2638](https://github.com/roboflow/supervision/pull/2638))
- `sv.DetectionDataset.as_yolo`, `as_pascal_voc`, `as_coco`, `as_createml` and `as_labelme` export into the folder the images were loaded from instead of failing with `shutil.SameFileError`. ([#2637](https://github.com/roboflow/supervision/pull/2637))
- `sv.Detections.from_transformers` accepts semantic segmentation output with `segmentation_scores`; per-pixel scores stay out of per-detection `confidence`. ([#2643](https://github.com/roboflow/supervision/pull/2643))
- `sv.crop_image` clips finite crop coordinates outside the 32-bit integer range to the image bounds, instead of wrapping to an empty crop. ([#2642](https://github.com/roboflow/supervision/pull/2642))
- `sv.DetectionDataset.as_labelme` gives disconnected components of one mask a shared group ID, so `from_labelme` rebuilds one detection. ([#2640](https://github.com/roboflow/supervision/pull/2640))
- `sv.DetectionDataset.as_labelme`, `as_yolo` and `as_pascal_voc` export in-memory grayscale `(height, width)` images. ([#2641](https://github.com/roboflow/supervision/pull/2641))
- `sv.KeyPoints.with_nms` keeps skeletons with zero joints instead of raising a zero-size reduction error. ([#2639](https://github.com/roboflow/supervision/pull/2639))
## 🏆 Contributors
- **kevin** (@kevin9327) — stopped `process_video` hangs, made mAP match `pycocotools`, and fixed in-place dataset export.
- **Marvel Harisson** (@INo-xious, [LinkedIn](https://www.linkedin.com/in/marvel-harisson-4102b7345/)) — fixed LabelMe grouping, grayscale dataset export and keypoint NMS.
- **NIKHIL** (@Nikhi00718) — fixed `crop_image` clipping and Transformers semantic output loading.
______________________________________________________________________
**Full changelog**: <https://github.com/roboflow/supervision/compare/0.30.6...0.30.7>
Related Repositories
public-apis/public-apis★ 491,129
A collective list of free APIs
NousResearch/hermes-agent★ 255,905
The agent that grows with you
yt-dlp/yt-dlp★ 200,003
A feature-rich command-line audio/video downloader
microsoft/markitdown★ 191,481
Python tool for converting files and office documents to Markdown.
Significant-Gravitas/AutoGPT★ 187,700
AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.