Ejemplo n.º 1
0
 def test_parse_args_default(self):
     options = parse_args()
     assert isinstance(options, Namespace)
     assert np.isclose(options.baseline, 9.0)
     assert np.isclose(options.field_of_view, 71.86)
     assert np.isclose(options.rgb_field_of_view, 68.7938)
     assert np.isclose(options.rgb_baseline, 2.0)
     assert options.swap_lr is True
Ejemplo n.º 2
0
        'class_id': class_id,
        'name': label_name,
        'relative_coordinates': {
            'center_x': center_x,
            'center_y': center_y,
            'width': width,
            'height': height
        },
        'confidence': confidence
    })
    return json_dic


global args
try:
    args = vars(parse_args())
except:
    os._exit(2)

stream_list = args['streams']

if args['config_overwrite']:
    args['config_overwrite'] = json.loads(args['config_overwrite'])

print("Using Arguments=", args)

if args['force_usb2']:
    cli_print("FORCE USB2 MODE", PrintColors.WARNING)
    cmd_file = consts.resource_paths.device_usb2_cmd_fpath
else:
    cmd_file = consts.resource_paths.device_cmd_fpath