Luigi commited on
Commit
e8f08e3
1 Parent(s): 6dfe441

Improve Debug Message Layout in Validate Funciton

Browse files
Files changed (1) hide show
  1. convert_to_mixed.py +7 -9
convert_to_mixed.py CHANGED
@@ -36,16 +36,14 @@ def compare_result(res1, res2):
36
 
37
  from termcolor import colored
38
 
39
- for d1, d2 in zip(keypoints1, keypoints2):
 
40
  for i, (j1, j2) in enumerate(zip(d1, d2)):
41
- x1, y1 = j1
42
- x2, y2 = j2
43
- print(f"Joint-{i}: X: {colored(x1,'green')} VS {colored(x2, 'blue')} Y: {colored(y1, 'green')} VS {colored(y2, 'blue')}")
44
-
45
- for d1, d2 in zip(scores1, scores2):
46
- for i, (s1, s2) in enumerate(zip(d1, d2)):
47
- print(f"Joint-{i}: S: {colored(s1,'green')} VS {colored(s2, 'blue')}")
48
-
49
 
50
  def validate_pose(res1, res2, postprocess=None):
51
 
 
36
 
37
  from termcolor import colored
38
 
39
+ for j, (d1, d2) in enumerate(zip(keypoints1, keypoints2)):
40
+ print(f'Detection {j}: ')
41
  for i, (j1, j2) in enumerate(zip(d1, d2)):
42
+ (x1, y1), (x2, y2) = j1, j2
43
+ s1, s2 = scores1[j][i], scores2[j][i]
44
+ print(f"Joint-{i:2d}:")
45
+ print(f'\tOriginal ({colored("x", "blue")},{colored("y","green")},{colored("score", "red")}) = ({colored("{:4.1f}".format(x1),"blue")}, {colored("{:4.1f}".format(y1),"green")}, {colored("{:5.4f}".format(s1),"red")})')
46
+ print(f'\tConverted ({colored("x", "blue")},{colored("y","green")},{colored("score", "red")}) = ({colored("{:4.1f}".format(x2),"blue")}, {colored("{:4.1f}".format(y2),"green")}, {colored("{:5.4f}".format(s2),"red")})')
 
 
 
47
 
48
  def validate_pose(res1, res2, postprocess=None):
49