Skip to content

Commit 9005329

Browse files
Change expression for direction detection
1 parent d0ffc1b commit 9005329

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

deepface/detectors/DetectorWrapper.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def rotate_facial_area(
167167
# worry about rotations greater than 360 degrees.
168168
# We workaround the quirky behavior of the modulo operator
169169
# for negative angle values.
170-
direction = (1, -1)[angle < 0]
170+
direction = 1 if angle >= 0 else -1
171171
angle = abs(angle) % 360
172172
if angle == 0:
173173
return facial_area

0 commit comments

Comments
 (0)