feature/core-classes-and-functions#1
Merged
Merged
Conversation
- 🎨 DEFAULT_COLOR_PALETTE, Color and ColorPalette classes - 📐 initial implementation of Point, Vector and Rect classes - 🎬 VideoInfo and VideoSink classes as well as get_video_frames_generator - 📓 show_frame_in_notebook util
- style and check_code_quality done
SkalskiP
marked this pull request as ready for review
January 18, 2023 18:47
2 tasks
Borda
added a commit
to Clemens-E/supervision
that referenced
this pull request
Mar 30, 2026
- Replace hardcoded `cv2.mean(roi)[:3]` with ndim-aware fill: scalar for grayscale, channel-matched tuple for colour images; avoids shape mismatch broadcast error on single-channel frames [resolve roboflow#1] Review comment by @Copilot (PR roboflow#709): "If scene/roi is a single-channel (grayscale) array, this will fail due to shape mismatch..." --- Co-authored-by: Claude Code <noreply@anthropic.com>
Borda
added a commit
that referenced
this pull request
Mar 30, 2026
- Break error message string at line 686 to stay within 88-char ruff E501 limit - Add explicit npt.NDArray[np.float32] | None annotation on conf_selected; use cast() at the branch assignment to prevent mypy widening to Optional[Any] (mypy 1.19.1 + numpy 2.x stubs treat npt.NDArray as Any, so narrowing via `if conf_selected is not None` requires a concrete type from cast, and the self.confidence access needs its own is-not-None guard inside the loop) [resolve #1] /review finding by sw-engineer (report: _outputs/2026/03/output-review-2026-03-30-5.md): "conf_selected inferred as Optional[Any]; mypy pre-commit hook fails" [resolve #3] /review finding by linting-expert (report: _outputs/2026/03/output-review-2026-03-30-5.md): "ruff E501: line too long (89 > 88) at core.py:686" --- Co-authored-by: Claude Code <noreply@anthropic.com>
Borda
added a commit
to 0xD4rky/supervision
that referenced
this pull request
Mar 31, 2026
- Add test_yolo_polygon_mask_precision_no_coord_drift verifying that load → save round-trip keeps coordinate drift under 0.005 normalised units [resolve roboflow#1] Review comment by @Borda (PR roboflow#1746): "could you pls add a test to demonstrate the previous issue and that your fix resolves it"
Borda
added a commit
to 0xD4rky/supervision
that referenced
this pull request
Mar 31, 2026
- Add test_polygons_to_masks_multiple_polygons_shape: verifies (N, H, W) output shape with fractional pixel coords and disjoint mask assertion - Add test_yolo_polygon_mask_precision_no_coord_drift: round-trip load/save with odd resolution (101x97) to ensure non-integer pixel coordinates [resolve roboflow#1] Review comment by @Borda (PR roboflow#1746): "could you pls add a test to demonstrate the previous issue and that your fix resolves it"
Borda
added a commit
that referenced
this pull request
Apr 13, 2026
- Remove frame_rate argument from ByteTrack() in smoother.py docstring - Remove frame_rate argument from 4 example scripts (speed_estimation, heatmap_and_track) - heatmap_and_track already passes lost_track_buffer explicitly; frame_rate=fps was redundant [resolve #1] Review comment by @Copilot (gh): `frame_rate` is removed from `__init__`, but there are still in-repo call sites that pass `frame_rate=`... --- Co-authored-by: Claude Code <noreply@anthropic.com>
Borda
added a commit
to farukalamai/supervision
that referenced
this pull request
Apr 13, 2026
The else branch added by the original fix used hasattr(value, "__getitem__")
to decide whether to slice custom_data values per detection. This incorrectly
indexes dicts by integer 0, raising KeyError when custom_data contains dict
values (e.g. {"metadata": {"sensor_id": 101}}).
Non-ndarray types (dicts, scalars, lists used as a single value per detection)
should be written as-is. Only np.ndarray values require per-row indexing.
[resolve roboflow#1] /review finding by sw-engineer (report: .temp/output-review-fix-csv-json-sink-custom-data-array-slicing-2026-04-13.md): CSVSink else branch KeyError:0 on dict custom_data at csv_sink.py:153
---
Co-authored-by: Claude Code <noreply@anthropic.com>
Borda
added a commit
that referenced
this pull request
Apr 14, 2026
[resolve #1] Review comment by @Copilot (gh): "mask from rle_to_mask is a boolean array, but masks is annotated as list[npt.NDArray[np.uint8]]..." --- Co-authored-by: Claude Code <noreply@anthropic.com>
Borda
added a commit
to shaun0927/supervision
that referenced
this pull request
Apr 17, 2026
…ings - Describe broadcast vs. per-row slicing rules for custom_data values in CSVSink.append() and JSONSink.append() [resolve roboflow#1] /review finding by foundry:sw-engineer + foundry:doc-scribe (report: .temp/output-review-fix-sinks-slice-list-values-2026-04-17.md) --- Co-authored-by: Claude Code <noreply@anthropic.com> Co-authored-by: OpenAI Codex <codex@openai.com>
Borda
added a commit
that referenced
this pull request
Apr 20, 2026
- /0.*/ block was misplaced after GoogleOther group (blank line ends a group in robots.txt), making it a dangling directive most parsers would ignore; move it into User-agent:* so all crawlers respect it [resolve #1] Review comment by @Copilot (PR #2224): "Disallow: /0.*/ directive is currently under the User-agent: GoogleOther group, so it only applies to that crawler..." --- Co-authored-by: Claude Code <noreply@anthropic.com>
Borda
added a commit
that referenced
this pull request
Apr 24, 2026
[resolve #1] Review comment by @Copilot (PR #2232): "The cookbook card title has a spelling error (\"Underestand\"). This is user-facing text and will be indexed/visible in the docs UI; please correct the display name while keeping the existing slug if that path is intentional." - Fixed heading in docs/notebooks/underestand-visitors-with-yolo-world.ipynb - Slug/filename preserved as Copilot instructed --- Co-authored-by: Claude Code <noreply@anthropic.com>
Borda
added a commit
to satishkc7/supervision
that referenced
this pull request
May 19, 2026
…r (report: .reports/review/2026-05-19T10-05-17Z/review-report.md): add timeout=300 to subprocess.run Without a timeout, ffmpeg can hang indefinitely on malformed containers or stalled filesystems, silently freezing the caller's program. The existing `except Exception` block already catches `subprocess.TimeoutExpired`, so adding `timeout=300` is the minimal fix — it logs a warning and returns. 300 s is a conservative cap sufficient for typical video remux workloads. --- Co-authored-by: Claude Code <noreply@anthropic.com>
Borda
added a commit
that referenced
this pull request
May 21, 2026
[resolve #1] Review by @Copilot (PR #2260): "_extract_class_names() removed isinstance(data, dict) guard; can raise AttributeError on malformed YAML" Challenge: evidence=VALID (self-verified) suggestion=VALID resolution=as-suggested - Restore isinstance(data, dict) check before .get("names") in yolo.py - Fix pre-existing [no-any-return] mypy error in annotators/core.py:_load_icon --- Co-authored-by: Claude Code <noreply@anthropic.com>
Borda
added a commit
that referenced
this pull request
May 22, 2026
Relocates test_from_coco_multi_segment_masks out of TestClassNamePopulation (scoped to CLASS_NAME_DATA_FIELD propagation) into a new TestFromCocoMasks class in tests/dataset/formats/test_coco.py. - Adds TestFromCocoMasks class + coco_data_with_multi_segment_segmentation fixture in tests/dataset/formats/test_coco.py - Test now calls DetectionDataset.from_coco without force_masks (default False) — exercises _with_seg_mask auto-detection, the natural user path - Removes fixture, test, and unused `import json` from tests/dataset/test_core.py Resolves [resolve #1] @copilot-pull-request-reviewer (gh): move test out of TestClassNamePopulation --- Co-authored-by: Claude Code <noreply@anthropic.com>
Borda
added a commit
to madhavcodez/supervision
that referenced
this pull request
May 22, 2026
…fault to 0.0 Pre-existing default of 0.75 caused aggressive polygon simplification for direct callers while as_coco used 0.0 — inconsistent behavior for the same param. [resolve roboflow#1] /review finding by foundry:solution-architect (report: .reports/review/2026-05-22T18-44-11Z/review-report.md): --- Co-authored-by: Claude Code <noreply@anthropic.com>
Borda
added a commit
to Ace3Z/supervision
that referenced
this pull request
May 27, 2026
…roboflow_result Update three parametrize entries to use np.empty(0, dtype=str) instead of np.empty(0) for expected class_name on empty-predictions paths. Add explicit dtype equality assertion alongside the existing np.array_equal check so future regressions at the helper layer are caught (np.array_equal is dtype-blind on zero-length arrays). [resolve roboflow#1] /review finding by foundry:qa-specialist (report: .reports/review/2026-05-27T06-06-27Z/review-report.md) --- Co-authored-by: Claude Code <noreply@anthropic.com>
Borda
added a commit
that referenced
this pull request
Jun 6, 2026
[resolve #1] Review by @Copilot (PR #2294): "_validate_keypoint_confidence validates a 2D array with shape (n, m), but expected_shape uses f"({n, m})" (set literal) and message says 1D" Challenge: evidence=VALID suggestion=VALID resolution=as-suggested - Fix f"({n, m})" -> f"({n}, {m})" (set literal -> proper shape string) - Fix error message "1D" -> "2D" to match actual array dimensionality --- Co-authored-by: Claude Code <noreply@anthropic.com>
8 tasks
Borda
added a commit
to RubenHaisma/supervision
that referenced
this pull request
Jul 1, 2026
…ocstring - Broaden param types: `list[list[float]]` → `Sequence[Sequence[float]]`, `list[bool]` → `Sequence[bool]` (item roboflow#8) - Add `from collections.abc import Callable, Sequence` import - Add `Note:` block warning callers that this function uses `[x, y, w, h]` (COCO convention) while all sibling batch-IoU functions use xyxy (item roboflow#1) - Document NaN propagation behaviour in the Note block (item roboflow#7) - Fix `Returns` section: replace internal names `dt`/`gt` with public param names `boxes_detection`/`boxes_true`; add row/column orientation description (item roboflow#3) --- Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Borda
added a commit
that referenced
this pull request
Jul 3, 2026
- Guard empty average_precisions in from_tensors: return 0.0 for map50/map75/map50_95 when no GT classes exist (all-background dataset) - Fix dtype of empty GT class array: np.zeros((0,), dtype=np.float32) to match explicit-dtype pattern at line 1408 and avoid float64 upcasting [resolve #1] Copilot + /review — foundry:qa-specialist + foundry:challenger (gh) [resolve #6] /review finding by foundry:linting-expert (report) --- Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Borda
added a commit
that referenced
this pull request
Jul 15, 2026
[resolve group] PR #2432 — items 1 2 Item #1 (@Copilot): contour.mean(axis=0) can fall outside concave contours, corrupting the parent/child hierarchy in _parents. Now uses a scanline-midpoint interior point. Item #2 (@Copilot): remapped_parents used ordered_indices.index() in a comprehension (O(n^2)). Now precomputes an index_map for O(1) lookups. Challenge: both evidence=VALID suggestion=VALID resolution=as-suggested --- Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Borda
added a commit
that referenced
this pull request
Jul 16, 2026
…ents Import cv2 in a try/except matching tests/cv2/test_color.py and test_constants.py, instead of failing with ImportError.
Borda
added a commit
to mvanhorn/supervision
that referenced
this pull request
Jul 20, 2026
[resolve group] PR roboflow#2374 — items 1, 2, 3, 7 Detection_area's dense-mask branch now delegates to the shared count_mask_pixels SIMD-popcount helper instead of a duplicated np.count_nonzero(axis=(1,2)) reduction, restoring the ~6x fast path also used by metrics.utils.object_size (item roboflow#1). Relocates detection_area/detection_iou from the pure-array detection/utils/ package to detection/geometry_dispatch.py, since both consume Detections objects rather than raw arrays — this also resolves the module-name collision with the top-level supervision.geometry package (item roboflow#2, item roboflow#7's module-rename part). Documents detection_iou's shared-geometry, box-IoU-last-resort fallback and its asymmetry vs detection_area's per-operand dispatch (item roboflow#3). Renames detection_iou's detections_true/detections_detection params to detections_a/detections_b — the sole caller passes two peer merge candidates with no true/pred relationship (item roboflow#7's param-rename part). --- Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> Co-authored-by: OpenAI Codex <codex@openai.com>
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.
Description