parser.add_argument('train_config_path', type=str, help='Path to train_config') parser.add_argument('config_path', type=str, help='Path to config') parser.add_argument( '--dataset_root_dir', type=str, default='/home/wrjs/pc/kitti/', help='Path to KITTI dataset. Default="/home/wrjs/pc/kitti/"') parser.add_argument('--dataset_split_file', type=str, default='', help='Path to KITTI dataset split file.' 'Default="DATASET_ROOT_DIR/3DOP_splits' '/train_config["train_dataset"]"') args = parser.parse_args() train_config = load_train_config(args.train_config_path) DATASET_DIR = args.dataset_root_dir if args.dataset_split_file == '': DATASET_SPLIT_FILE = os.path.join( DATASET_DIR, '3DOP_splits/' + train_config['train_dataset']) else: DATASET_SPLIT_FILE = args.dataset_split_file config_complete = load_config(args.config_path) if 'train' in config_complete: config = config_complete['train'] else: config = config_complete # input function ============================================================== dataset = KittiDataset(os.path.join(DATASET_DIR, 'image/training/image_2'), os.path.join(DATASET_DIR, 'velodyne/training/velodyne/'),
from models.models import get_model from models.box_encoding import get_box_decoding_fn, get_box_encoding_fn, \ get_encoding_len from models import preprocess from util.config_util import load_config, load_train_config from util.summary_util import write_summary_scale parser = argparse.ArgumentParser( description='Repeated evaluation of PointGNN.') parser.add_argument('eval_config_path', type=str, help='Path to train_config') parser.add_argument('--dataset_root_dir', type=str, default='../dataset/kitti/', help='Path to KITTI dataset. Default="../dataset/kitti/"') args = parser.parse_args() eval_config = load_train_config(args.eval_config_path) DATASET_DIR = args.dataset_root_dir config_path = os.path.join(eval_config['train_dir'], eval_config['config_path']) while not os.path.isfile(config_path): print('No config file found in %s, waiting' % config_path) time.sleep(eval_config['eval_every_second']) config = load_config(config_path) if 'eval' in config: config = config['eval'] dataset = KittiDataset(os.path.join(DATASET_DIR, 'velodyne/val/'), os.path.join(DATASET_DIR, 'labels/val/'), num_classes=config['num_classes']) NUM_CLASSES = dataset.num_classes print(dataset)