def check_gradients(): log_file = open('datasets/synth_street_small/gradients.txt', 'w+') img_range = range(10, 11) for key_img in img_range: info = 'Key: ' + str(key_img) + '\n' log_file.write(info) print(info + '\n') ref_img = key_img + 1 runner = RUNNER.Runner(stereo_pair_builder, runtime_settings, key_img, [ref_img], root_dir) runner.check_gradient(log_file, post_process=True, debug_mode=False, skip_guards=False) log_file.close()
def bulk_run(): log_file = open('datasets/ipad_small/log_file.txt', 'w+') img_range = range(361, 800) for key_img in img_range: info = 'Key: ' + str(key_img) + '\n' print(info + '\n') log_file.write(info) ref_img = key_img + 1 runner = RUNNER.Runner(stereo_pair_builder, runtime_settings, key_img, [ref_img], root_dir) runner.run_check_pixels(log_file, post_process=True, debug_mode=False, skip_guards=True) log_file.close()
image_loader = IMAGE_LOADER.ImageLoader(root_dir + dataset + type + sequence + images_dir) vo = VO_PARSER.VoParserSynth(root_dir, dataset + type + sequence + odom_path) runtime_settings = SETTINGS.Settings( 10, 0.0001, 0.9, 5, 0.05, -1.0) # -1.0 for z (or general motion eq.) TODO investigate ref_count = 8 step = 1 ref_list = [] for count in range(step, ref_count + 1, step): ref_list.append(key + count) stereo_pair_builder = STEREO_PAIR_BUILDER.StereoPairBuilder( cm, image_loader, vo, 0, runtime_settings) runner = RUNNER.Runner(stereo_pair_builder, runtime_settings, key, ref_list, root_dir) # ground_truth = POST.Evaluation.load_ground_truth(depth_file, 424, 512,flip_across_y=True) # inverted_ground_truth = POST.Evaluation.calc_inverse_ground_truth(ground_truth, runtime_settings,max_thresh=2500,isIpad=True) inverted_ground_truth = None # VISUALIZE.show_frame(inverted_ground_truth, runtime_settings, path=root_dir, name='ground_truth', cmap='nipy_spectral') runner.run(VISUALIZE.visualize_enum.SHOW_DEPTH, inverted_ground_truth, normalize=True, calc_error_metrics=False, post_process=True, regularize=True, show_frame=True, debug_mode=False, skip_guards=True)