fix default printer parameters
This commit is contained in:
parent
f5d350e7b0
commit
3b06399d7d
@ -36,7 +36,7 @@ def cli():
|
|||||||
help='what to output: json keypoints skeleton for Pifpaf'
|
help='what to output: json keypoints skeleton for Pifpaf'
|
||||||
'json bird front or multi for MonStereo')
|
'json bird front or multi for MonStereo')
|
||||||
predict_parser.add_argument('--no_save', help='to show images', action='store_true')
|
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,
|
predict_parser.add_argument('--long-edge', default=None, type=int,
|
||||||
help='rescale the long side of the image (aspect ratio maintained)')
|
help='rescale the long side of the image (aspect ratio maintained)')
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,6 @@
|
|||||||
|
|
||||||
|
# File adapted from https://github.com/vita-epfl/openpifpaf
|
||||||
|
|
||||||
from contextlib import contextmanager
|
from contextlib import contextmanager
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|||||||
@ -28,7 +28,7 @@ def image_attributes(dpi, output_types):
|
|||||||
fontsize_num=round(22 * c),
|
fontsize_num=round(22 * c),
|
||||||
fontsize_ax=round(16 * c),
|
fontsize_ax=round(16 * c),
|
||||||
linewidth=round(8 * c),
|
linewidth=round(8 * c),
|
||||||
markersize=round(16 * c),
|
markersize=round(13 * c),
|
||||||
y_box_margin=round(24 * math.sqrt(c)),
|
y_box_margin=round(24 * math.sqrt(c)),
|
||||||
stereo=dict(color='deepskyblue',
|
stereo=dict(color='deepskyblue',
|
||||||
numcolor='darkorange',
|
numcolor='darkorange',
|
||||||
@ -77,7 +77,7 @@ class Printer:
|
|||||||
# Set maximum distance
|
# Set maximum distance
|
||||||
self.dd_pred = dic_ann['dds_pred']
|
self.dd_pred = dic_ann['dds_pred']
|
||||||
self.dd_real = dic_ann['dds_real']
|
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
|
# Do not print instances outside z_max
|
||||||
self.zz_gt = [xx[2] if xx[2] < self.z_max - self.stds_epi[idx] else 0
|
self.zz_gt = [xx[2] if xx[2] < self.z_max - self.stds_epi[idx] else 0
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user