Skip to content

feature/core-classes-and-functions#1

Merged
SkalskiP merged 4 commits into
mainfrom
feature/box-annotator
Jan 18, 2023
Merged

feature/core-classes-and-functions#1
SkalskiP merged 4 commits into
mainfrom
feature/box-annotator

Conversation

@SkalskiP

@SkalskiP SkalskiP commented Dec 2, 2022

Copy link
Copy Markdown
Collaborator

Description

  • ⓒ Add project license
  • 🎨 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
  • 🖌️ draw_line, draw_rectangle, draw_filled_rectangle utils added
  • style and check_code_quality done

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello there, thank you for opening an PR ! 🙏🏻 The team was notified and they will get back to you asap.

- 🎨 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
@SkalskiP SkalskiP self-assigned this Jan 18, 2023
@SkalskiP SkalskiP changed the title feature/add-box-annotator feature/core-classes-and-functions Jan 18, 2023
@SkalskiP SkalskiP marked this pull request as ready for review January 18, 2023 18:47
@SkalskiP SkalskiP merged commit 3c4c1a6 into main Jan 18, 2023
SkalskiP pushed a commit that referenced this pull request Jul 23, 2023
@SkalskiP SkalskiP deleted the feature/box-annotator branch August 8, 2023 09:12
SkalskiP pushed a commit that referenced this pull request Dec 6, 2023
Borda added a commit that referenced this pull request Mar 30, 2026
[resolve #1] Review comment by @copilot (PR #2185):
"isinstance(..., int) does not assert iscrowd isn't a bool because bool is a subclass of int"
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 that referenced this pull request Mar 31, 2026
- [resolve #1] RUF015: replace list(annotations.values())[0] with next(iter(annotations.values()))
- [resolve #2] E501: split assertion message to stay within 88-char limit
- [resolve #3] ruff format: committed formatted diff for test file

---
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant