help='path to the trained model') parser.add_argument('--save_memory', action="store_true", help="use customized dataloader to save memory") parser.add_argument('--use_noise_channel', action="store_true", help="use noise channel or not") args = parser.parse_args() return args if __name__ == "__main__": args = parse_args() config_dict = load_configs_from_file(args.config) # dataset = CRUW(data_root=config_dict['dataset_cfg']['base_root']) dataset = CRUW(data_root=config_dict['dataset_cfg']['base_root'], sensor_config_name='sensor_config_rod2021') radar_configs = dataset.sensor_cfg.radar_cfg range_grid = dataset.range_grid angle_grid = dataset.angle_grid model_cfg = config_dict['model_cfg'] if model_cfg['type'] == 'CDC': from rodnet.models import RODNetCDC as RODNet elif model_cfg['type'] == 'HG': from rodnet.models import RODNetHG as RODNet elif model_cfg['type'] == 'HGwI': from rodnet.models import RODNetHGwI as RODNet else: raise NotImplementedError if not os.path.exists(args.log_dir):
action="store_true", help="use noise channel or not") parser = parse_cfgs(parser) args = parser.parse_args() return args if __name__ == "__main__": args = parse_args() config_dict = load_configs_from_file(args.config) config_dict = update_config_dict(config_dict, args) # update configs by args # dataset = CRUW(data_root=config_dict['dataset_cfg']['base_root']) dataset = CRUW(data_root=config_dict['dataset_cfg']['base_root'], sensor_config_name=args.sensor_config) radar_configs = dataset.sensor_cfg.radar_cfg range_grid = dataset.range_grid angle_grid = dataset.angle_grid model_cfg = config_dict['model_cfg'] if model_cfg['type'] == 'CDC': from rodnet.models import RODNetCDC as RODNet elif model_cfg['type'] == 'HG': from rodnet.models import RODNetHG as RODNet elif model_cfg['type'] == 'HGwI': from rodnet.models import RODNetHGwI as RODNet elif model_cfg['type'] == 'CDCv2': from rodnet.models import RODNetCDCDCN as RODNet elif model_cfg['type'] == 'HGv2': from rodnet.models import RODNetHGDCN as RODNet
import sys from cruw import CRUW from cruw.eval import evaluate_rod2021 if __name__ == '__main__': data_root = "/mnt/disk1/CRUW/ROD2021" dataset = CRUW(data_root=data_root, sensor_config_name='sensor_config_rod2021') submit_dir = sys.argv[1] truth_dir = sys.argv[2] evaluate_rod2021(submit_dir, truth_dir, dataset)
except Exception as e: print("Error while preparing %s: %s" % (seq_path, e)) if __name__ == "__main__": args = parse_args() data_root = args.data_root if args.split == '': splits = None else: splits = args.split.split(',') out_data_dir = args.out_data_dir os.makedirs(out_data_dir, exist_ok=True) overwrite = args.overwrite dataset = CRUW(data_root=data_root, sensor_config_name=args.sensor_config) config_dict = load_configs_from_file(args.config) config_dict = update_config_dict(config_dict, args) # update configs by args radar_configs = dataset.sensor_cfg.radar_cfg if splits == None: prepare_data(dataset, config_dict, out_data_dir, split=None, save_dir=out_data_dir, viz=False, overwrite=overwrite) else: for split in splits: