fix names of splits
This commit is contained in:
parent
cb344c4664
commit
3235e9d138
@ -112,7 +112,8 @@ data/kitti/images`
|
||||
Download nuScenes dataset (any version: Mini, Teaser or TrainVal) from [nuScenes](https://www.nuscenes.org/download),
|
||||
save it anywhere and soft link it in `data/nuscenes`
|
||||
|
||||
|
||||
### 3) Train Val Splits
|
||||
Fo
|
||||
|
||||
### Input joints for training
|
||||
MonoLoco is trained using 2D human pose joints detected by pifpaf and matched with the ground truth location provided by
|
||||
|
||||
@ -23,8 +23,8 @@ class RunKitti:
|
||||
self.n_samples = 100
|
||||
|
||||
list_ann = glob.glob(os.path.join(dir_ann, '*.json'))
|
||||
self.dir_kk = os.path.join('data', 'baselines', 'calib')
|
||||
self.dir_out = os.path.join('data', 'baselines', 'monoloco')
|
||||
self.dir_kk = os.path.join('data', 'kitti', 'calib')
|
||||
self.dir_out = os.path.join('data', 'kitti', 'monoloco')
|
||||
if not os.path.exists(self.dir_out):
|
||||
os.makedirs(self.dir_out)
|
||||
print("Created output directory for txt files")
|
||||
|
||||
@ -17,7 +17,7 @@ class PreprocessKitti:
|
||||
self.iou_thresh = iou_thresh
|
||||
self.dir_gt = os.path.join('data', 'kitti', 'gt')
|
||||
self.names_gt = os.listdir(self.dir_gt)
|
||||
self.dir_kk = os.path.join('data', 'baselines', 'calib')
|
||||
self.dir_kk = os.path.join('data', 'kitti', 'calib')
|
||||
self.list_gt = glob.glob(self.dir_gt + '/*.txt')
|
||||
assert os.path.exists(self.dir_gt), "Ground truth dir does not exist"
|
||||
assert os.path.exists(self.dir_ann), "Annotation dir does not exist"
|
||||
@ -27,8 +27,8 @@ class PreprocessKitti:
|
||||
dir_out = os.path.join('data', 'arrays')
|
||||
self.path_joints = os.path.join(dir_out, 'joints-kitti-' + now_time + '.json')
|
||||
self.path_names = os.path.join(dir_out, 'names-kitti-' + now_time + '.json')
|
||||
path_train = os.path.join('data', 'baselines', 'train.txt')
|
||||
path_val = os.path.join('data', 'baselines', 'val.txt')
|
||||
path_train = os.path.join('splits', 'kitti_train.txt')
|
||||
path_val = os.path.join('splits', 'kitti_val.txt')
|
||||
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
self.logger = logging.getLogger(__name__)
|
||||
|
||||
@ -73,11 +73,11 @@ class PreprocessNuscenes:
|
||||
|
||||
elif dataset == 'nuscenes_teaser':
|
||||
self.nusc = NuScenes(version='v1.0-trainval', dataroot=dir_nuscenes, verbose=True)
|
||||
with open("data/baselines/teaser_scenes.txt", "r") as ff:
|
||||
with open("splits/nuscenes_teaser_scenes.txt", "r") as ff:
|
||||
teaser_scenes = ff.read().splitlines()
|
||||
self.scenes = self.nusc.scene
|
||||
self.scenes = [scene for scene in self.scenes if scene['token'] in teaser_scenes]
|
||||
with open("data/baselines/split_teaser_scenes.json", "r") as ff:
|
||||
with open("data/splits/split_nuscenes_teaser.json", "r") as ff:
|
||||
dic_split = json.load(ff)
|
||||
self.split_train = [scene['name'] for scene in self.scenes if scene['token'] in dic_split['train']]
|
||||
self.split_val = [scene['name'] for scene in self.scenes if scene['token'] in dic_split['val']]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user