From b85a9c93a9fc7f626f05a6071d9aed559f893f6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=27=C3=A9lectron=20rare?= <108685187+electron-rare@users.noreply.github.com> Date: Thu, 2 Jul 2026 14:26:03 +0200 Subject: [PATCH] fix(viz): no body mesh when arkit is the source The body-mesh triangles (solid cyan blob reported live) were the one surface no filter covered: under iphone-usb persons_body is the ARKit conversion with c=1.0, so garbage/stale joints painted full triangles. Skip BODY_TRIANGLES whenever the ARKit topology is present (webcam MediaPipe path unchanged); the body stays the freshness-gated ARKit wireframe. --- data_only_viz/renderer.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/data_only_viz/renderer.py b/data_only_viz/renderer.py index 0f19ccd..6a6080e 100644 --- a/data_only_viz/renderer.py +++ b/data_only_viz/renderer.py @@ -589,8 +589,14 @@ class MetalRenderer(NSObject): ids_b = s.persons_body_ids or list(range(len(s.persons_body))) ids_f = s.persons_face_ids or list(range(len(s.persons_face))) - # Body - for i, body_kp in enumerate(s.persons_body): + # Body — SKIPPED whenever ARKit is the body source (iphone-usb: the + # ARKit topology arrived). persons_body is then the ARKit->MP33 + # conversion with c forced to 1.0, so garbage/stale joints would pass + # the confidence filter and paint solid triangles anywhere on screen + # (the "blue blob"). The body is the gated ARKit wireframe instead. + arkit_body = (getattr(self, "_arkit_full", ARKIT_FULL) + and bool(s.arkit_parents)) + for i, body_kp in enumerate([] if arkit_body else s.persons_body): pid = ids_b[i] if i < len(ids_b) else i for a, b, c in BODY_TRIANGLES: if not push_tri(body_kp, a, b, c, pid):