elif FLAGS.dataset == 'scannet': sys.path.append(os.path.join(ROOT_DIR, 'scannet')) from scannet_detection_dataset import ScannetDetectionDataset, MAX_NUM_OBJ from model_util_scannet import ScannetDatasetConfig DATASET_CONFIG = ScannetDatasetConfig() TEST_DATASET = ScannetDetectionDataset('val', num_points=NUM_POINT, augment=False, use_color=FLAGS.use_color, use_height=(not FLAGS.no_height)) elif FLAGS.dataset == 'mp3d': sys.path.append(os.path.join(ROOT_DIR, 'mp3d')) from mp3d_detection_dataset_debug import MP3DDetectionDataset, MAX_NUM_OBJ from model_util_mp3d import MP3DDatasetConfig DATASET_CONFIG = MP3DDatasetConfig() TEST_DATASET = MP3DDetectionDataset(FLAGS.split, num_points=NUM_POINT, augment=False, use_color=FLAGS.use_color, use_height=(not FLAGS.no_height), overfit=FLAGS.overfit, data_type=FLAGS.data_type) else: print('Unknown dataset %s. Exiting...' % (FLAGS.dataset)) exit(-1) print(len(TEST_DATASET)) TEST_DATALOADER = DataLoader(TEST_DATASET, batch_size=BATCH_SIZE, shuffle=FLAGS.shuffle_dataset,
""" import open3d as o3d import os import sys import h5py import numpy as np from torch.utils.data import Dataset BASE_DIR = os.path.dirname(os.path.abspath(__file__)) ROOT_DIR = os.path.dirname(BASE_DIR) sys.path.append(ROOT_DIR) sys.path.append(os.path.join(ROOT_DIR, 'utils')) import pc_util from model_util_mp3d import rotate_aligned_boxes from model_util_mp3d import MP3DDatasetConfig DC = MP3DDatasetConfig() #TODO MAX_NUM_OBJ = 64 MAX_NUM_OBJ_FT = 256 MEAN_COLOR_RGB = np.array([109.8, 97.2, 83.8]) # for 800 training samples #MAX_NUM_OBJ: 28 #MAX_NUM_POINTS: 968435 #MEAN_NUM_POINTS: 193136.24625 #MEAN_RGB: [0.51826599 0.49850078 0.46754714] class MP3DDetectionDataset(Dataset): def __init__(self,