Skip to content

Commit

Permalink
black
Browse files Browse the repository at this point in the history
  • Loading branch information
getzze committed Nov 26, 2024
1 parent 35a5f55 commit c430585
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions sleap/nn/tracking.py
Original file line number Diff line number Diff line change
Expand Up @@ -653,10 +653,7 @@ def infer_next_timestep(self, t: Optional[int] = None) -> int:
self.track_matching_queue_dict,
key=lambda track: len(self.track_matching_queue_dict[track]),
)
return (
self.track_matching_queue_dict[track_with_max_instances][-1].t
+ 1
)
return 1 + self.track_matching_queue_dict[track_with_max_instances][-1].t

# Default to last timestep + 1 if available.
if not self.has_max_tracking and len(self.track_matching_queue) > 0:
Expand Down Expand Up @@ -1521,7 +1518,9 @@ def run_tracker(frames: List[LabeledFrame], tracker: BaseTracker) -> List[Labele
# Run tracking on every frame
for lf in frames:
# Use only the predicted instances
instances = [inst for inst in lf.instances if isinstance(inst, PredictedInstance)]
instances = [
inst for inst in lf.instances if isinstance(inst, PredictedInstance)
]

# Clear the tracks
for inst in instances:
Expand Down

0 comments on commit c430585

Please sign in to comment.