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
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>
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