From 856aad8e21a745da4ffd9cff4648fd01718453cf Mon Sep 17 00:00:00 2001 From: Jim Martens Date: Tue, 23 Jul 2019 15:39:25 +0200 Subject: [PATCH] Added code to only take 30 frames of each trajectory in evaluation Signed-off-by: Jim Martens --- src/twomartens/masterthesis/data.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/twomartens/masterthesis/data.py b/src/twomartens/masterthesis/data.py index 2f07201..5106b12 100644 --- a/src/twomartens/masterthesis/data.py +++ b/src/twomartens/masterthesis/data.py @@ -424,8 +424,12 @@ def load_scenenet_data(photo_paths: Sequence[Sequence[str]], for image_path, frame_instances in zip(traj_image_paths, traj_instances): labels = [] - if not frame_instances: - continue # skip images that do not contain instances + if training: + if not frame_instances: + continue # skip images that do not contain instances + elif evaluation: + if i >= 30: + continue for instance in frame_instances: bbox = instance['bbox']