mirror of
https://github.com/serengil/deepface.git
synced 2025-06-09 21:07:09 +00:00
Change expression for direction detection
This commit is contained in:
parent
d0ffc1bfde
commit
90053295cb
@ -167,7 +167,7 @@ def rotate_facial_area(
|
||||
# worry about rotations greater than 360 degrees.
|
||||
# We workaround the quirky behavior of the modulo operator
|
||||
# for negative angle values.
|
||||
direction = (1, -1)[angle < 0]
|
||||
direction = 1 if angle >= 0 else -1
|
||||
angle = abs(angle) % 360
|
||||
if angle == 0:
|
||||
return facial_area
|
||||
|
Loading…
x
Reference in New Issue
Block a user