Skip to content

feature/initial-line-counter-api - #4

Merged
SkalskiP merged 1 commit into
mainfrom
feature/initial-line-counter-api
Jan 19, 2023
Merged

SkalskiP merged 1 commit into
mainfrom
feature/initial-line-counter-api

Conversation

@SkalskiP

Copy link
Copy Markdown
Collaborator

Description

  • 🧮 initial implementation of LineCounter and LineCounterAnnotator classes

@SkalskiP
SkalskiP merged commit 0e4c97a into main Jan 19, 2023
@SkalskiP
SkalskiP deleted the feature/initial-line-counter-api branch August 8, 2023 09:12
Borda added a commit that referenced this pull request Mar 30, 2026
[resolve #4] Review comment by @copilot (PR #2185):
"iscrowd is still derived solely from contains_holes/contains_multiple_segments, ignoring data[iscrowd] from COCO"
Borda added a commit that referenced this pull request Mar 30, 2026
Validate that the mask shape matches (n_objects, n_keypoints) before
processing. A row-count mismatch now raises ValueError with a clear message
instead of a confusing IndexError; a column-count mismatch similarly raises
ValueError instead of silently producing incorrect results.

[resolve #4] /review finding by sw-engineer (report: _outputs/2026/03/output-review-2026-03-30-5.md):
"No shape validation between index and self.xy — mismatched masks silently misfilter or raise IndexError"

---
Co-authored-by: Claude Code <[email protected]>
Borda added a commit that referenced this pull request Mar 31, 2026
…egression

- [resolve #4] Add test asserting detection.mask is None when force_masks=True, is_obb=True
- [resolve #5] Add regression test confirming is_obb=False with polygon annotation still produces masks

---
Co-authored-by: Claude Code <[email protected]>
Borda added a commit that referenced this pull request Apr 13, 2026
- Import deprecated_parameter from supervision.utils.internal
- Decorate __init__ to emit SupervisionWarning when frame_rate= is passed
- Maps frame_rate value to lost_track_buffer via int() for backward compatibility

[resolve #4] /review finding by sw-engineer (report: .temp/output-review-fix-l100-003-bytetrack-frame-rate-2026-04-13.md): No deprecation path for external users — ByteTrack is a public API...

---
Co-authored-by: Claude Code <[email protected]>
Borda added a commit to abritton2002/supervision that referenced this pull request Apr 13, 2026
- Case 4: [TEST_DET_NONE] now returns Detections.empty() — zero-length xyxy is empty
- Case 8: [TEST_DET_ZERO_LENGTH x2] now returns Detections.empty() — same reason
- Case 9: [TEST_DET_1, TEST_DET_NONE] now returns TEST_DET_1 with DoesNotRaise() —
  the ValueError was an artifact of the bug; empty operand is now stripped before
  merge's field-compatibility check, so merge succeeds cleanly

[resolve roboflow#2] /review finding by sw-engineer + qa-specialist (report: .temp/output-review-fix-is-empty-tracker-id-2026-04-13.md)
[resolve roboflow#4] /review finding by sw-engineer (report: .temp/output-review-fix-is-empty-tracker-id-2026-04-13.md)

---
Co-authored-by: Claude Code <[email protected]>
Borda added a commit to abritton2002/supervision that referenced this pull request Apr 13, 2026
The fixture created a real video at 23.976 fps but was orphaned when
the test_video_info_float_fps test was updated to use monkeypatching
instead (commit 65f4df3), leaving the fixture unreachable by any test.

[resolve roboflow#4] /review finding by sw-engineer (report: .temp/output-review-fix-video-info-fps-float-2026-04-13.md):
"float_fps_video_path at tests/utils/test_video.py:22 creates a real video but no test uses it"

---
Co-authored-by: Claude Code <[email protected]>
Borda added a commit to farukalamai/supervision that referenced this pull request Apr 13, 2026
Exercises all three dispatch branches of the custom_data handler
simultaneously: np.ndarray values are sliced per detection row while
scalar values (int, str, etc.) are broadcast as-is to every row.

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

---
Co-authored-by: Claude Code <[email protected]>
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 <[email protected]>
Borda added a commit that referenced this pull request Apr 15, 2026
Replace FutureWarning with warn_deprecated so the LMM deprecation
respects the SUPERVISON_DEPRECATION_WARNING env var filter, consistent
with other deprecations across the library.

[resolve #4] Review comment by @copilot (PR #2214):
"Same as Detections.from_lmm: this uses the standard FutureWarning..."

---
Co-authored-by: Claude Code <[email protected]>
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 <[email protected]>
Borda added a commit that referenced this pull request Apr 15, 2026
Replace FutureWarning with warn_deprecated so the LMM deprecation
respects the SUPERVISON_DEPRECATION_WARNING env var filter, consistent
with other deprecations across the library.

[resolve #4] Review comment by @copilot (PR #2214):
"Same as Detections.from_lmm: this uses the standard FutureWarning..."

---
Co-authored-by: Claude Code <[email protected]>
Borda added a commit to shaun0927/supervision that referenced this pull request Apr 17, 2026
- Verify CSVSink/JSONSink slice list values from detections.data per row

[resolve roboflow#4] /review finding by foundry:qa-specialist (report: .temp/output-review-fix-sinks-slice-list-values-2026-04-17.md)

---
Co-authored-by: Claude Code <[email protected]>
Co-authored-by: OpenAI Codex <[email protected]>
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 <[email protected]>
Borda added a commit that referenced this pull request Apr 22, 2026
[resolve #4] /review finding by oss (report: .temp/output-review-rle-refactor-2026-04-22.md):
"CHANGELOG: Not updated. Should be updated before merge..."

---
Co-authored-by: Claude Code <[email protected]>
Borda added a commit that referenced this pull request Apr 22, 2026
…ounts

- Calling .view(np.uint8) on a non-1-byte dtype (int32, float32) reinterprets
  the underlying bytes and produces incorrect run boundaries (silent mis-encoding).
  Using np.asarray(mask_2d, dtype=np.bool_) before ravel() keeps the
  fast uint8-view path while accepting any truthy array.

[resolve #4] Review comment by @Copilot (PR #2230):
"_mask_to_rle_counts computes np.diff(flat.view(np.uint8)) without ensuring
flat is a 1-byte-per-element boolean/uint8 array..."

---
Co-authored-by: Claude Code <[email protected]>
Borda added a commit that referenced this pull request Apr 22, 2026
…rity

- _resize_dense_to_shape: switch from np.linspace to arange * src // dst
  floor-division indexing, matching _rle_resize strategy and eliminating
  the 1-px rounding mismatch that made correctness checks compare two
  different nearest-neighbour implementations
- stage_resize: pass parallel=1 to time_reps for compact timing to avoid
  nested ThreadPoolExecutor oversubscription (CompactMask.resize already
  uses its own thread pool for N >= _PARALLEL_THRESHOLD)
- stage_resize: update docstring to correctly describe the sparse/dense
  dispatch paths in CompactMask.resize() rather than "decode/re-encode"

[resolve #4] @Copilot (gh): "stage_resize docstring says compact path decodes each RLE crop..."
[resolve #5] @Copilot (gh): "time_reps() can run concurrently in a thread pool..."
[resolve #13] /review by perf-optimizer: "np.linspace rounds differently than cv2 floor-division"

---
Co-authored-by: Claude Code <[email protected]>
Borda added a commit that referenced this pull request Apr 24, 2026
[resolve #4] Review comment by @Copilot (PR #2232):
"The JSON-LD SearchAction target is hard-coded to the /latest/ search path. On /develop/ or tag builds, this points to a different version..."

- Replace hard-coded /latest/search/ with {{ config.site_url }}search/
- Now resolves correctly for each deployed version

---
Co-authored-by: Claude Code <[email protected]>
Borda added a commit to satishkc7/supervision that referenced this pull request May 19, 2026
…ame-dir for atomic replace

- Move `tempfile.mkstemp` + `os.close` inside `try` block so OSError (disk full,
  unwritable dir) is caught by the existing `except Exception` handler instead of
  propagating to the caller, preserving the warn-and-degrade contract
- Pass `dir=os.path.dirname(os.path.abspath(video_path))` so the temp file is on
  the same filesystem as the output, restoring `os.rename` semantics in `shutil.move`
- Initialise `tmp_path = None` before `try`; guard `finally` with
  `tmp_path is not None` to satisfy mypy and avoid referencing an unbound name

---
Co-authored-by: Claude Code <[email protected]>
Borda added a commit that referenced this pull request May 22, 2026
Precision, Recall, F1Score, MeanAverageRecall all raise ValueError when
predictions/targets.class_id is None or predictions.confidence is None.

[resolve #4] /review finding by foundry:qa-specialist (report: .reports/review/2026-05-22T05-56-29Z/review-report.md)

---
Co-authored-by: Claude Code <[email protected]>
Co-authored-by: OpenAI Codex <[email protected]>
Borda added a commit to madhavcodez/supervision that referenced this pull request May 22, 2026
…annotations

Chaining fixes integer ID uniqueness only; file_name uses bare basename so
splits with identical filenames still collide when COCO files are merged.
Note added to Returns section to prevent false assumptions.

[resolve roboflow#4] /review finding by foundry:challenger (report: .reports/review/2026-05-22T18-44-11Z/review-report.md):

---
Co-authored-by: Claude Code <[email protected]>
Borda added a commit to Ace3Z/supervision that referenced this pull request May 27, 2026
Add null-safety assertion (class_name is not None), full key-set + dtype parity check
across all data keys, and concatenation assertion covering the downstream mixed-batch
scenario. Replaces single dtype.kind check with structural invariant that guards future
key or dtype drift.

[resolve roboflow#4] [resolve roboflow#5] [resolve roboflow#8] /review findings by foundry:qa-specialist and foundry:challenger (report: .reports/review/2026-05-27T06-06-27Z/review-report.md)

---
Co-authored-by: Claude Code <[email protected]>
Borda added a commit that referenced this pull request Jun 4, 2026
[resolve #4] Review by @Copilot (PR #2290):
"KeyPoints.from_detections indexes kp.shape[2] without ndim/shape check..."
Challenge: evidence=VALID suggestion=VALID resolution=as-suggested

---
Co-authored-by: Claude Code <[email protected]>
Co-authored-by: OpenAI Codex <[email protected]>
Borda added a commit to kounelisagis/supervision that referenced this pull request Jun 8, 2026
- [resolve roboflow#4] test_with_nmm_falls_back_to_box_nmm_without_obb_data: regression
  guard that non-OBB Detections still collapse via box NMM path.
  Challenge: evidence=VALID suggestion=VALID resolution=as-suggested
- [resolve roboflow#10] boundary tests: empty/single, iou_threshold=0.0/1.0, IOS metric
  end-to-end NMS, and OBB NMM empty/single — converted threshold test to
  parametrize(expected_keep) removing if-branch from test body.
  Challenge: evidence=VALID suggestion=VALID resolution=as-suggested
- Added test_with_nmm_obb_merged_xyxy_matches_winner_aabb verifying the
  item roboflow#3 contract: merged xyxy == winner's AABB, not union of all members.

[resolve group] PR roboflow#2303 — items 4, 10

---
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: OpenAI Codex <[email protected]>
Borda added a commit that referenced this pull request Jun 10, 2026
…d placement

- Fix LineZone listed under detection/tools/ — lives in detection/line_zone.py; add as separate tree entry
- Fix unsafe git stash baseline: save refs/stash before push, only pop if ref changed after
- Clarify warn_deprecated goes in deprecated module's own __init__.py, not supervision/__init__.py
- Item #4 (style: commit type) already addressed: commit type list removed; CONTRIBUTING.md cross-ref covers it

---
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Borda added a commit that referenced this pull request Jun 16, 2026
… race

- [resolve #4] fix docstring: show() raises ModuleNotFoundError (not
  AttributeError) when python3-tk absent; add apt-get/brew install hint
- [resolve #5] clear _key_queue in _reset_window_refs() so stale
  keypresses from a previous session don't fire after close()+show()
- [resolve #6] wait_key() returns None immediately when _root is None
  and queue is empty — matches cv2.waitKey() contract (no ghost window)
- [resolve #9] re-check _key_queue before wait_variable in
  _wait_for_key_or_close() to close the _on_key arrival race window

---
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Borda added a commit to RubenHaisma/supervision that referenced this pull request Jul 1, 2026
…fast path

- Replace `assert len(is_crowd) == len(boxes_true)` with `raise ValueError(...)` so the guard fires under `python -O` and carries a descriptive message (item roboflow#9)
- Fix empty-return: `np.array([])` shape `(0,)` → `np.empty((N,0)/(0,M), dtype=float64)` matching documented `(len(boxes_detection), len(boxes_true))` contract (item roboflow#2)
- Add `if not np.any(crowd)` fast path to skip the `np.where` eager double-branch evaluation when no crowd GT present (>99% of COCO calls); use `np.divide(..., out=iou)` for in-place result buffer reuse on the hot path (items roboflow#4 + roboflow#12)

---
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Borda added a commit that referenced this pull request Jul 3, 2026
- Add test_all_background_images_return_zero_not_nan: verifies that a
  dataset with only background images (no GT objects anywhere) returns
  map50=0.0 rather than NaN after the from_tensors fix
- Strengthen test_background_false_positives_lower_map: add upper-bound
  assertion (map50 < 0.5), add map75 and map50_95 penalization checks

[resolve #2] Copilot + /review — foundry:qa-specialist (gh)
[resolve #4] /review finding by foundry:qa-specialist (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 4

Item #4 (@Copilot): _contains_holes was imported into the fallback
facade but never used or re-exported there, which trips
unused-import lint checks. Removed from the import list.
Challenge: evidence=VALID suggestion=VALID resolution=codex-direct

---
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: OpenAI Codex <[email protected]>
Borda added a commit to mvanhorn/supervision that referenced this pull request Jul 20, 2026
[resolve group] PR roboflow#2374 — items 4, 5, 7

Splits the changelog bullet that fused the merge-IoU bugfix with the
unrelated mask-area perf change into two, names the affected APIs, adds
the PR link, and drops the "batched reduction" framing that
mischaracterized a measured regression as an improvement (item roboflow#4).
Restores the blank line before ### Added that this PR's diff had
removed (item roboflow#7's changelog part).

Rewords the confusing filter_detections.md sentence so "if oriented-box
coordinates are present" reads as a condition rather than the data
field acting as the sentence's subject (item roboflow#5).

---
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: OpenAI Codex <[email protected]>
Borda added a commit to Ace3Z/supervision that referenced this pull request Jul 21, 2026
Narrow reader() to `except Exception` so KeyboardInterrupt/SystemExit no
longer masquerade as normal EOF (item roboflow#3). Document the RuntimeError
raised on decode/open failure, the GIL precondition for the prefetch
speedup, and the deferred error-delivery latency when prefetch>0
(items roboflow#4, roboflow#12).

[resolve roboflow#3,roboflow#4,roboflow#12] PR roboflow#2273 — Copilot (gh) + foundry:sw-engineer,
foundry:doc-scribe (review): reader-thread exception scope, RuntimeError
docs, GIL/benchmark/latency docstring hardening

---
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: OpenAI Codex <[email protected]>
Borda added a commit to aminmiral/supervision that referenced this pull request Oct 6, 2026
- roboflow#4: docs(changelog): drop duplicate roboflow#2663 entry left by the merge
- roboflow#7: reject nan and infinite YOLO box values with one finite-value error before the extent check
- roboflow#8: make YOLO line dispatch exhaustive so every parsed line appends exactly one box

[resolve group] PR roboflow#2665 — items 4 7 8

---
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Codex <[email protected]>
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