Skip to content

Commit

Permalink
Don't try to predict no stop for short tracks
Browse files Browse the repository at this point in the history
  • Loading branch information
Kalior committed Aug 29, 2018
1 parent 3fd5a4d commit 694fb8c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion live_prediction.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,10 @@ def write_chunk_to_file(video_name, video, frames, chunk, label, out_dir, i):
ChunkVisualiser().chunk_to_video_scene(video, chunk, out_file, frames, label)


def predict_no_stop(track, confidence_threshold, stop_threshold=10):
def predict_no_stop(track, confidence_threshold):
if len(track) < 50:
return False, ()

classifier_prediction = classifier_predict_no_stop(track, confidence_threshold)

# Copy last 200 frames to chunk for visusalisation.
Expand Down

0 comments on commit 694fb8c

Please sign in to comment.