From 6d775a338bc70a602e8a9ac676edd36e3bd084fd Mon Sep 17 00:00:00 2001 From: Lorenzo Date: Mon, 22 Mar 2021 15:07:23 +0100 Subject: [PATCH] fix dic_gt --- monoloco/network/process.py | 17 +++++++++-------- monoloco/visuals/printer.py | 1 + 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/monoloco/network/process.py b/monoloco/network/process.py index 9d28724..9e72b17 100644 --- a/monoloco/network/process.py +++ b/monoloco/network/process.py @@ -77,16 +77,17 @@ def factory_for_gt(im_size, focal_length=5.7, name=None, path_gt=None): dic_gt = dic_names[name] # Without ground-truth-file - else: - if im_size[0] / im_size[1] > 2.5: # KITTI default + elif im_size[0] / im_size[1] > 2.5: # KITTI default kk = [[718.3351, 0., 600.3891], [0., 718.3351, 181.5122], [0., 0., 1.]] # Kitti calibration + dic_gt = None logger.info("Using KITTI calibration matrix...") - else: # nuScenes camera parameters - kk = [ - [im_size[0]*focal_length/Sx, 0., im_size[0]/2], - [0., im_size[1]*focal_length/Sy, im_size[1]/2], - [0., 0., 1.]] - logger.info("Using a standard calibration matrix...") + else: # nuScenes camera parameters + kk = [ + [im_size[0]*focal_length/Sx, 0., im_size[0]/2], + [0., im_size[1]*focal_length/Sy, im_size[1]/2], + [0., 0., 1.]] + dic_gt = None + logger.info("Using a standard calibration matrix...") return kk, dic_gt diff --git a/monoloco/visuals/printer.py b/monoloco/visuals/printer.py index 8d5312c..b8c21be 100644 --- a/monoloco/visuals/printer.py +++ b/monoloco/visuals/printer.py @@ -59,6 +59,7 @@ class Printer: self.kk = kk self.output_types = args.output_types self.z_max = args.z_max # set max distance to show instances + self.show = args.show self.show_all = args.show_all self.save = not args.no_save