test(viz): pin stabilizer defaults, fix seams
CI build oscope-of / build-check (push) Has been cancelled
CI build oscope-of / build-check (push) Has been cancelled
Detection v3 review follow-ups: pin hand_persist_grace/near_off/ hold_frames defaults; use the module-level route_hands (restores the monkeypatch seam, drops the dead local alias); document the grace count-inheritance window in the gate docstring.
This commit is contained in:
@@ -243,8 +243,7 @@ class ActionHeadPublisher(threading.Thread):
|
||||
without going through _tick).
|
||||
"""
|
||||
hands, chir, _, _ = self._pick_hands()
|
||||
from data_only_viz.hand_slots import route_hands as _rh
|
||||
raw = _rh(
|
||||
raw = route_hands(
|
||||
hands, chir or None,
|
||||
swap=getattr(self, "_hand_swap_lr", False),
|
||||
near_min=0.0,
|
||||
|
||||
@@ -271,8 +271,11 @@ class HandPersistenceGate:
|
||||
|
||||
Known limit: matching is greedy nearest-track — two hands crossing
|
||||
within `radius` can inherit each other's track (and a ghost appearing
|
||||
exactly where a real hand just left inherits its count). Acceptable
|
||||
for a display gate; do not reuse for gesture-state tracking.
|
||||
exactly where a real hand just left inherits its count). Grace widens
|
||||
that inheritance window to `grace` frames after the hand leaves, and a
|
||||
ghost re-flashing at one spot every (grace+1)th frame can accumulate to
|
||||
min_frames. Acceptable for a display gate; do not reuse for
|
||||
gesture-state tracking.
|
||||
"""
|
||||
|
||||
def __init__(self, min_frames: int = 3, radius: float = 0.15, grace: int = 0) -> None:
|
||||
|
||||
@@ -66,6 +66,10 @@ def test_defaults_hand_display():
|
||||
assert cfg.hand_near_min == pytest.approx(0.10)
|
||||
assert cfg.arkit_bone_max == pytest.approx(0.5)
|
||||
assert cfg.arkit_full_skeleton is True
|
||||
# detection v3 stabilizer knobs
|
||||
assert cfg.hand_persist_grace == 2
|
||||
assert cfg.hand_near_off == pytest.approx(0.08)
|
||||
assert cfg.hand_hold_frames == 2
|
||||
|
||||
|
||||
def test_defaults_misc():
|
||||
|
||||
Reference in New Issue
Block a user