Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion tracklab/engine/offline.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import logging

from tracklab.engine import TrackingEngine
from tracklab.engine.engine import merge_dataframes
from tracklab.utils.cv2 import cv2_load_image

log = logging.getLogger(__name__)
Expand All @@ -19,7 +20,11 @@ def video_loop(self, tracker_state, video, video_id):
model_names = self.module_names
for model_name in model_names:
if self.models[model_name].level == "video":
detections = self.models[model_name].process(detections, image_pred)
batch_detections = self.models[model_name].process(detections, image_pred)
if isinstance(batch_detections, tuple):
batch_detections, batch_metadata = batch_detections
image_pred = merge_dataframes(image_pred, batch_metadata)
detections = merge_dataframes(detections, batch_detections)
continue
self.datapipes[model_name].update(image_filepaths, image_pred, detections)
self.callback(
Expand Down