@@ -93,7 +93,7 @@ def __init__(self,
9393 'x' : [],
9494 'y' : [],
9595 'euclideanDistance' : [],
96- 'pitch ' : []
96+ 'roll ' : []
9797 }
9898 self .bboxes = {
9999 'Men' : [],
@@ -319,19 +319,19 @@ def calculate_score(self) -> None:
319319 x = self .bboxes ['Woman' ][i ][0 ] - self .bboxes ['Men' ][i ][0 ]
320320 y = self .bboxes ['Men' ][i ][1 ] - self .bboxes ['Woman' ][i ][1 ]
321321 if x >= 0 and y >= 0 :
322- self .score ['pitch ' ].append (np .arctan (np .array (y / max ((10e-3 , x )))))
322+ self .score ['roll ' ].append (np .arctan (np .array (y / max ((10e-3 , x )))))
323323 elif x >= 0 and y < 0 :
324- self .score ['pitch ' ].append (- 1.0 * np .arctan (np .array (y / max ((10e-3 , x )))))
324+ self .score ['roll ' ].append (- 1.0 * np .arctan (np .array (y / max ((10e-3 , x )))))
325325 elif x < 0 and y < 0 :
326- self .score ['pitch ' ].append (math .pi + - 1.0 * np .arctan (np .array (y / x )))
326+ self .score ['roll ' ].append (math .pi + - 1.0 * np .arctan (np .array (y / x )))
327327 elif x < 0 and y >= 0 :
328- self .score ['pitch ' ].append (math .pi + np .arctan (np .array (y / x )))
328+ self .score ['roll ' ].append (math .pi + np .arctan (np .array (y / x )))
329329 else :
330330 # this should never happen
331331 self .logger .error ('Calculate score not implement for x=%d, y=%d' , x , y )
332332
333333 # invert because math angle is ccw
334- self .score ['pitch ' ] = [- 1.0 * item for item in self .score ['pitch ' ]]
334+ self .score ['roll ' ] = [- 1.0 * item for item in self .score ['roll ' ]]
335335
336336
337337 else :
@@ -341,7 +341,7 @@ def calculate_score(self) -> None:
341341 self .score ['x' ] = sp .scale_signal (self .score ['x' ], 0 , 100 )
342342 self .score ['y' ] = sp .scale_signal (self .score ['y' ], 0 , 100 )
343343 self .score ['euclideanDistance' ] = sp .scale_signal (self .score ['euclideanDistance' ], 0 , 100 )
344- self .score ['pitch ' ] = sp .scale_signal (self .score ['pitch ' ], 0 , 100 )
344+ self .score ['roll ' ] = sp .scale_signal (self .score ['roll ' ], 0 , 100 )
345345
346346
347347 def scale_score (self , status : str , metric : str = 'y' ) -> None :
0 commit comments