def __init__(self, args): # parse mocap and save gt in desired format mocapPath = os.path.join(args.root, 'dataset-{}_512_16'.format(args.seq), 'mav0', 'mocap0', 'data.csv') groundtruthPath = get_xivo_gt_filename(args.dump, "tumvi", args.seq) self.saveMocapAs(mocapPath, groundtruthPath)
# Get neural network name, input mode, and covariance prediction type with open(neural_net + ".pkl", "rb") as fid: net_params = pickle.load(fid) network_input_mode = net_params["input_mode"] network_cov_type = net_params["cov_type"] assert (network_cov_type == args.cov_type) neural_net_name = neural_net.split('/')[-1] # Collect tumvi data for i, cam_id in enumerate(cam_ids): for j, seq in enumerate(sequences): idx_1 = i * len(sequences) + j estimator_data = get_xivo_output_filename( covdumpdir, "tumvi", seq, cam_id) gt_data = get_xivo_gt_filename(covdumpdir, "tumvi", seq) calib = CovarianceCalibration( seq, gt_data, estimator_data, three_sigma=False, start_ind=0, end_ind=None, point_cloud_registration='horn', plot_timesteps=False, cov_type=network_cov_type, adjust_startend_to_samplecov=True) calib.align_gt_to_est() calib.compute_errors()
num_timesteps = 0 num_1sigma = {cov_type: np.zeros(df[k]) for k, cov_type in enumerate(cov_list)} num_2sigma = {cov_type: np.zeros(df[k]) for k, cov_type in enumerate(cov_list)} num_3sigma = {cov_type: np.zeros(df[k]) for k, cov_type in enumerate(cov_list)} for cam_id in [0, 1]: for seq in ["room6"]: print("Cam {}, {}".format(cam_id, seq)) estimator_data = get_xivo_output_filename(args.dump, "tumvi", seq, cam_id=cam_id) gt_data = get_xivo_gt_filename(args.dump, "tumvi", seq) if args.cov_source == "original": adjust = False else: adjust = True calib = CovarianceCalibration(seq, gt_data, estimator_data, three_sigma=False, start_ind=0, end_ind=None, cov_type=args.cov_type, point_cloud_registration="horn", adjust_startend_to_samplecov=adjust) calib.align_gt_to_est()
plot_3D_error_cloud(vel_error, "Velocity Error Cloud (m/s)") def plot_gauge_group(self): time_plot(self.time_axis_orig, self.est.gauge_group, title="Reference Group ID", xlabel=self.time_axis_label) if __name__=="__main__": args = parser.parse_args() # get data files estimator_data = get_xivo_output_filename(args.dump, args.dataset, args.seq, cam_id=args.cam_id, sen=args.sen) gt_data = get_xivo_gt_filename(args.dump, args.dataset, args.seq, sen=args.sen) if args.point_cloud_registration=="teaser": import teaserpp_python as tpp # avoid analysis for covariance matrices for which we haven't computed a # sample covariance if (args.cov_source != "original") and (args.start_ind==0) \ and (args.end_ind is None): adjust_startend_to_samplecov = True else: adjust_startend_to_samplecov = False # cov_type can only be "all" for original or sampled if args.cov_type == "all":