Skip to content

feature/initial-detections-api#3

Merged
SkalskiP merged 13 commits intomainfrom
feature/initial-detections-api
Jan 19, 2023
Merged

feature/initial-detections-api#3
SkalskiP merged 13 commits intomainfrom
feature/initial-detections-api

Conversation

@SkalskiP
Copy link
Copy Markdown
Collaborator

Description

  • Initial version Detections and BoxAnnotator added

…into feature/initial-detections-api

# Conflicts:
#	supervision/draw/color.py
…into feature/initial-detections-api

# Conflicts:
#	supervision/tools/detections.py
…into feature/initial-detections-api

# Conflicts:
#	supervision/tools/detections.py
…into feature/initial-detections-api

# Conflicts:
#	supervision/tools/detections.py
…into feature/initial-detections-api

# Conflicts:
#	supervision/tools/detections.py
…into feature/initial-detections-api

# Conflicts:
#	supervision/tools/detections.py
…into feature/initial-detections-api

# Conflicts:
#	supervision/tools/detections.py
@SkalskiP SkalskiP merged commit e1008b9 into main Jan 19, 2023
@SkalskiP SkalskiP deleted the feature/initial-detections-api branch August 8, 2023 09:12
Borda added a commit that referenced this pull request Mar 30, 2026
[resolve #3] Review comment by @copilot (PR #2185):
"isinstance(..., int) won't fail if iscrowd is a bool (bool subclasses int)"
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 that referenced this pull request Apr 13, 2026
Restores the int() cast that was present in the old frame_rate formula,
guarding against callers passing a float (e.g. track_seconds * fps).

[resolve #3] Review comment by @Copilot (gh): max_time_lost was explicitly int(...)  before; callers who pass a non-int lost_track_buffer would silently produce a float.

---
Co-authored-by: Claude Code <noreply@anthropic.com>
Borda added a commit that referenced this pull request Apr 13, 2026
- test_byte_tracker_lost_track_buffer_reacquires_within_buffer: track absent
  fewer frames than the buffer is reacquired with the same tracker id
- test_byte_tracker_lost_track_buffer_expires_track: track absent more frames
  than the buffer gets a new id on re-detection
- test_byte_tracker_lost_track_buffer_accepts_float: float input is coerced to
  int without raising

[resolve #3] Review comment by @Copilot (gh): no tests asserting new behavior of lost_track_buffer...

---
Co-authored-by: Claude Code <noreply@anthropic.com>
Borda added a commit to farukalamai/supervision that referenced this pull request Apr 13, 2026
Adds a parametrized case to test_json_sink verifying that np.ndarray
values in custom_data are sliced per detection row (not written as the
full array on every row). Mirrors the existing CSV counterpart added
by the original PR.

[resolve roboflow#3] /review finding by qa-specialist (report: .temp/output-review-fix-csv-json-sink-custom-data-array-slicing-2026-04-13.md): Missing JSONSink test for numpy array custom_data slicing

---
Co-authored-by: Claude Code <noreply@anthropic.com>
Borda added a commit that referenced this pull request Apr 15, 2026
- Replace FutureWarning with warn_deprecated (SupervisionWarnings) in
  Detections.from_lmm to respect SUPERVISON_DEPRECATION_WARNING env var
- Align removal version from 0.30.0 to 0.31.0 for consistency with
  all other deprecations introduced in this PR

[resolve #3] Review comment by @copilot (PR #2214):
"Deprecation warning says from_lmm will be removed in supervision-0.30.0..."
[resolve #4] Review comment by @copilot (PR #2214):
"Emitting deprecation warnings with the standard FutureWarning here byp..."

---
Co-authored-by: Claude Code <noreply@anthropic.com>
Borda added a commit that referenced this pull request Apr 15, 2026
- Replace FutureWarning with warn_deprecated (SupervisionWarnings) in
  Detections.from_lmm to respect SUPERVISON_DEPRECATION_WARNING env var
- Align removal version from 0.30.0 to 0.31.0 for consistency with
  all other deprecations introduced in this PR

[resolve #3] Review comment by @copilot (PR #2214):
"Deprecation warning says from_lmm will be removed in supervision-0.30.0..."
[resolve #4] Review comment by @copilot (PR #2214):
"Emitting deprecation warnings with the standard FutureWarning here byp..."

---
Co-authored-by: Claude Code <noreply@anthropic.com>
Borda added a commit to shaun0927/supervision that referenced this pull request Apr 17, 2026
…NSink

- Document list/tuple slicing vs. broadcast semantics, Args, and Returns

[resolve roboflow#3] /review finding by 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 to shaun0927/supervision that referenced this pull request Apr 17, 2026
… in fallback

- Wrap splprep/splev in try/except ValueError so collinear unique
  points (e.g. perfectly straight-line motion) fall back to the raw
  polyline instead of crashing.
- Use unique_xy (deduplicated) instead of raw xy for the fallback
  spline_points assignment, making both paths semantically consistent.

[resolve roboflow#3] /review finding by sw-engineer (report: collinear splprep crash)
[resolve roboflow#4] /review finding by sw-engineer (report: fallback uses un-deduplicated xy)

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