Fix detection medium review findings (#2400)
- Fixed detection medium findings across adapters, mask non-max merge, sinks, segmentation parsing, LineZone history, and mask ROI handling - Fixed mask non-max merge deprecation warnings to honor the standard warning opt-out and include version context - Fixed mask non-max merge validation for invalid IoU thresholds - Fixed CompactMask non-max merge grouping to update merged mask candidates correctly - Fixed selected and compacted detections to copy arrays and metadata, preventing mutations from leaking back to source detections - Fixed LineZone crossing history eviction to tolerate short tracking gaps and evict stale state per tracker/class key - Fixed semantic segmentation handling to preserve class ID 0 - Improved mask ROI conversion performance by avoiding unnecessary full-frame copies and repeated scans - Updated JSONSink changelog/docs to document native bool/int/float output while leaving CSVSink unchanged - Updated detection docstrings for mask parsing, selection copy semantics, validation errors, and argument readability guidance --------- Co-authored-by: Codex <codex@openai.com> Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
Codex
claude[bot]
pre-commit-ci[bot]
parent
8fd47a9ec6
commit
e13090f84b
@@ -246,6 +246,10 @@ Every docstring should include a usage example. When the example only uses `supe
|
||||
|
||||
Type hints are required on all new code. mypy is enforced by the pre-commit hook configured in `.pre-commit-config.yaml` — your PR will fail CI if mypy reports errors.
|
||||
|
||||
### Readability
|
||||
|
||||
Avoid multi-branch conditional expressions inside function or constructor arguments. If an argument needs more than a simple `a if condition else b`, assign it to a named local variable before the call.
|
||||
|
||||
### Performance
|
||||
|
||||
- Avoid unnecessary copies of NumPy arrays.
|
||||
|
||||
Reference in New Issue
Block a user