Skip to content

Commit

Permalink
fix(classifier): stage range error
Browse files Browse the repository at this point in the history
  • Loading branch information
williamfzc committed Mar 1, 2020
1 parent 22aef44 commit 4511213
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions stagesepx/classifier/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,9 @@ def get_stage_range(self) -> typing.List[typing.List[SingleClassifierResult]]:
assert len(result) > 0, "video seems to only contain one stage"

last = self.data[-1]
if result[-1][-1] != last:
result.append(self.data[cur.frame_id - 1 : last.frame_id - 1 + 1])
last_result = result[-1][-1]
if last_result != last:
result.append(self.data[last_result.frame_id - 1: last.frame_id - 1 + 1])
return result

def get_specific_stage_range(
Expand Down

0 comments on commit 4511213

Please sign in to comment.