mirror of
https://github.com/serengil/deepface.git
synced 2025-06-13 23:07:11 +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.
|
# worry about rotations greater than 360 degrees.
|
||||||
# We workaround the quirky behavior of the modulo operator
|
# We workaround the quirky behavior of the modulo operator
|
||||||
# for negative angle values.
|
# for negative angle values.
|
||||||
direction = (1, -1)[angle < 0]
|
direction = 1 if angle >= 0 else -1
|
||||||
angle = abs(angle) % 360
|
angle = abs(angle) % 360
|
||||||
if angle == 0:
|
if angle == 0:
|
||||||
return facial_area
|
return facial_area
|
||||||
|
Loading…
x
Reference in New Issue
Block a user