From c059e7896f22b983b8fc0d3fbccc8532dd2a3c24 Mon Sep 17 00:00:00 2001 From: grmchn Date: Wed, 3 Sep 2025 16:48:57 +0900 Subject: [PATCH] Fix ProportionChanger Reference rendering to show black screen when pose detection fails MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove debug colored dots (red, green, blue) from DWPose render when no valid keypoints - Remove debug white circle when no valid keypoints detected - Failed pose detection now properly displays black screen instead of test markers - Affects ProportionChanger DWPose Render node when reference pose detection fails 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- utils/rendering.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/utils/rendering.py b/utils/rendering.py index 98717cb..d91af04 100644 --- a/utils/rendering.py +++ b/utils/rendering.py @@ -157,9 +157,8 @@ def draw_dwpose_body_and_foot(canvas, body_keypoints, W, H, pose_marker_size, sh debug_log(f"Body Debug - First 3 keypoints: {[(i, f'{keypoints[i][0]:.1f}, {keypoints[i][1]:.1f}', f'{confidences[i]:.3f}') for i in range(min(3, len(keypoints)))]}") if valid_keypoints == 0: - debug_log("Body Debug - No valid keypoints, drawing center test circle") - # Draw a small test circle to confirm canvas works - cv2.circle(canvas, (W//2, H//2), 10, (255, 255, 255), thickness=-1) + debug_log("Body Debug - No valid keypoints, returning black screen") + # Return black screen for failed pose detection return canvas # Draw limb connections (bones) @@ -214,11 +213,7 @@ def draw_dwpose_body_and_foot(canvas, body_keypoints, W, H, pose_marker_size, sh cv2.circle(canvas, (int(x), int(y)), pose_marker_size, colors[color_idx], thickness=-1) points_drawn += 1 - # Debug: if no points drawn, draw test points - if points_drawn == 0: - cv2.circle(canvas, (50, 50), 5, (255, 0, 0), thickness=-1) - cv2.circle(canvas, (W-50, 50), 5, (0, 255, 0), thickness=-1) - cv2.circle(canvas, (W//2, H-50), 5, (0, 0, 255), thickness=-1) + # No debug points - let failed poses show as black screen return canvas