diff --git a/monstereo/run.py b/monstereo/run.py index 3ae3862..29b6546 100644 --- a/monstereo/run.py +++ b/monstereo/run.py @@ -36,7 +36,7 @@ def cli(): help='what to output: json keypoints skeleton for Pifpaf' 'json bird front or multi for MonStereo') predict_parser.add_argument('--no_save', help='to show images', action='store_true') - predict_parser.add_argument('--dpi', help='image resolution', type=int, default=100) + predict_parser.add_argument('--dpi', help='image resolution', type=int, default=150) predict_parser.add_argument('--long-edge', default=None, type=int, help='rescale the long side of the image (aspect ratio maintained)') diff --git a/monstereo/visuals/pifpaf_show.py b/monstereo/visuals/pifpaf_show.py index 95139f0..fc7811e 100644 --- a/monstereo/visuals/pifpaf_show.py +++ b/monstereo/visuals/pifpaf_show.py @@ -1,3 +1,6 @@ + +# File adapted from https://github.com/vita-epfl/openpifpaf + from contextlib import contextmanager import numpy as np diff --git a/monstereo/visuals/printer.py b/monstereo/visuals/printer.py index fa933de..008a404 100644 --- a/monstereo/visuals/printer.py +++ b/monstereo/visuals/printer.py @@ -28,7 +28,7 @@ def image_attributes(dpi, output_types): fontsize_num=round(22 * c), fontsize_ax=round(16 * c), linewidth=round(8 * c), - markersize=round(16 * c), + markersize=round(13 * c), y_box_margin=round(24 * math.sqrt(c)), stereo=dict(color='deepskyblue', numcolor='darkorange', @@ -77,7 +77,7 @@ class Printer: # Set maximum distance self.dd_pred = dic_ann['dds_pred'] self.dd_real = dic_ann['dds_real'] - self.z_max = int(min(self.z_max + 4, max(max(self.dd_pred), max(self.dd_real, default=0)))) + self.z_max = int(min(self.z_max, 4 + max(max(self.dd_pred), max(self.dd_real, default=0)))) # Do not print instances outside z_max self.zz_gt = [xx[2] if xx[2] < self.z_max - self.stds_epi[idx] else 0