Skip to content

Commit 3fc44ed

Browse files
author
arch
committed
flip roll min max
1 parent e098c6e commit 3fc44ed

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

funscript_editor/algorithms/funscriptgenerator.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ def calculate_score(self, bboxes) -> None:
206206

207207
# invert because math angle is ccw, also scale to 0- 100
208208
tmp = score['roll'][tracker_number] # we can not override the list with listcomprehention in python
209-
score['roll'][tracker_number] = [-100*item/(math.pi) for item in tmp]
209+
score['roll'][tracker_number] = [-100*item/(math.pi) + 100 for item in tmp]
210210

211211
else:
212212
min_woman_x = min([x[0] for x in woman_center])
@@ -230,14 +230,14 @@ def calculate_score(self, bboxes) -> None:
230230
if metric in self.funscripts.keys() and self.funscripts[metric].is_inverted():
231231
if metric == 'roll':
232232
self.logger.info("%s: Get absolute inverted Score", metric)
233-
self.score[metric] = [abs(-1.0 * item) for item in score[metric]]
233+
self.score[metric] = [abs(item) for item in score[metric]]
234234
else:
235235
self.logger.info("%s: Scale Inverted Score to 0 - 100", metric)
236236
self.score[metric] = Signal.scale([-1.0 * x for x in score[metric]], 0, 100)
237237
else:
238238
if metric == 'roll':
239239
self.logger.info("%s: Get absolute Score", metric)
240-
self.score[metric] = [abs(item) for item in score[metric]]
240+
self.score[metric] = [abs(-1.0*item) for item in score[metric]]
241241
else:
242242
self.logger.info("%s: Scale Score to 0 - 100", metric)
243243
self.score[metric] = Signal.scale(score[metric], 0, 100)

0 commit comments

Comments
 (0)