Unverified Commit cf6f4732 authored by Xiang Xu's avatar Xiang Xu Committed by GitHub
Browse files

[Feature] File I/O migration and reconstruction (#2319)

* refactor leio

* update mmengine and mmcv version

* update

* update docs

* update version
parent b2e5ad6b
...@@ -9,6 +9,8 @@ data_root = 'data/kitti/' ...@@ -9,6 +9,8 @@ data_root = 'data/kitti/'
class_names = ['Car'] class_names = ['Car']
point_cloud_range = [0, -40, -5, 70, 40, 3] point_cloud_range = [0, -40, -5, 70, 40, 3]
input_modality = dict(use_lidar=True, use_camera=False) input_modality = dict(use_lidar=True, use_camera=False)
backend_args = None
db_sampler = dict( db_sampler = dict(
data_root=data_root, data_root=data_root,
info_path=data_root + 'kitti_dbinfos_train.pkl', info_path=data_root + 'kitti_dbinfos_train.pkl',
...@@ -17,17 +19,20 @@ db_sampler = dict( ...@@ -17,17 +19,20 @@ db_sampler = dict(
classes=class_names, classes=class_names,
sample_groups=dict(Car=15), sample_groups=dict(Car=15),
points_loader=dict( points_loader=dict(
type='LoadPointsFromFile', coord_type='LIDAR', load_dim=4, use_dim=4)) type='LoadPointsFromFile',
coord_type='LIDAR',
file_client_args = dict(backend='disk') load_dim=4,
# Uncomment the following if use ceph or other file clients. use_dim=4,
# See https://mmcv.readthedocs.io/en/latest/api.html#mmcv.fileio.FileClient backend_args=backend_args),
# for more details. backend_args=backend_args)
# file_client_args = dict(
# backend='petrel', path_mapping=dict(data='s3://kitti_data/'))
train_pipeline = [ train_pipeline = [
dict(type='LoadPointsFromFile', coord_type='LIDAR', load_dim=4, use_dim=4), dict(
type='LoadPointsFromFile',
coord_type='LIDAR',
load_dim=4,
use_dim=4,
backend_args=backend_args),
dict(type='LoadAnnotations3D', with_bbox_3d=True, with_label_3d=True), dict(type='LoadAnnotations3D', with_bbox_3d=True, with_label_3d=True),
dict(type='PointsRangeFilter', point_cloud_range=point_cloud_range), dict(type='PointsRangeFilter', point_cloud_range=point_cloud_range),
dict(type='ObjectRangeFilter', point_cloud_range=point_cloud_range), dict(type='ObjectRangeFilter', point_cloud_range=point_cloud_range),
...@@ -52,7 +57,12 @@ train_pipeline = [ ...@@ -52,7 +57,12 @@ train_pipeline = [
] ]
test_pipeline = [ test_pipeline = [
dict(type='LoadPointsFromFile', coord_type='LIDAR', load_dim=4, use_dim=4), dict(
type='LoadPointsFromFile',
coord_type='LIDAR',
load_dim=4,
use_dim=4,
backend_args=backend_args),
dict( dict(
type='MultiScaleFlipAug3D', type='MultiScaleFlipAug3D',
img_scale=(1333, 800), img_scale=(1333, 800),
......
...@@ -6,6 +6,21 @@ point_cloud_range = [0, -40, -3, 70.4, 40, 1] ...@@ -6,6 +6,21 @@ point_cloud_range = [0, -40, -3, 70.4, 40, 1]
input_modality = dict(use_lidar=True, use_camera=False) input_modality = dict(use_lidar=True, use_camera=False)
metainfo = dict(classes=class_names) metainfo = dict(classes=class_names)
# Example to use different file client
# Method 1: simply set the data root and let the file I/O module
# automatically infer from prefix (not support LMDB and Memcache yet)
# data_root = 's3://openmmlab/datasets/detection3d/kitti/'
# Method 2: Use backend_args, file_client_args in versions before 1.1.0rc4
# backend_args = dict(
# backend='petrel',
# path_mapping=dict({
# './data/': 's3://openmmlab/datasets/detection3d/',
# 'data/': 's3://openmmlab/datasets/detection3d/'
# }))
backend_args = None
db_sampler = dict( db_sampler = dict(
data_root=data_root, data_root=data_root,
info_path=data_root + 'kitti_dbinfos_train.pkl', info_path=data_root + 'kitti_dbinfos_train.pkl',
...@@ -16,14 +31,20 @@ db_sampler = dict( ...@@ -16,14 +31,20 @@ db_sampler = dict(
classes=class_names, classes=class_names,
sample_groups=dict(Car=12, Pedestrian=6, Cyclist=6), sample_groups=dict(Car=12, Pedestrian=6, Cyclist=6),
points_loader=dict( points_loader=dict(
type='LoadPointsFromFile', coord_type='LIDAR', load_dim=4, use_dim=4)) type='LoadPointsFromFile',
coord_type='LIDAR',
load_dim=4,
use_dim=4,
backend_args=backend_args),
backend_args=backend_args)
train_pipeline = [ train_pipeline = [
dict( dict(
type='LoadPointsFromFile', type='LoadPointsFromFile',
coord_type='LIDAR', coord_type='LIDAR',
load_dim=4, # x, y, z, intensity load_dim=4, # x, y, z, intensity
use_dim=4), use_dim=4,
backend_args=backend_args),
dict(type='LoadAnnotations3D', with_bbox_3d=True, with_label_3d=True), dict(type='LoadAnnotations3D', with_bbox_3d=True, with_label_3d=True),
dict(type='ObjectSample', db_sampler=db_sampler), dict(type='ObjectSample', db_sampler=db_sampler),
dict( dict(
...@@ -45,7 +66,12 @@ train_pipeline = [ ...@@ -45,7 +66,12 @@ train_pipeline = [
keys=['points', 'gt_bboxes_3d', 'gt_labels_3d']) keys=['points', 'gt_bboxes_3d', 'gt_labels_3d'])
] ]
test_pipeline = [ test_pipeline = [
dict(type='LoadPointsFromFile', coord_type='LIDAR', load_dim=4, use_dim=4), dict(
type='LoadPointsFromFile',
coord_type='LIDAR',
load_dim=4,
use_dim=4,
backend_args=backend_args),
dict( dict(
type='MultiScaleFlipAug3D', type='MultiScaleFlipAug3D',
img_scale=(1333, 800), img_scale=(1333, 800),
...@@ -66,7 +92,12 @@ test_pipeline = [ ...@@ -66,7 +92,12 @@ test_pipeline = [
# construct a pipeline for data and gt loading in show function # construct a pipeline for data and gt loading in show function
# please keep its loading function consistent with test_pipeline (e.g. client) # please keep its loading function consistent with test_pipeline (e.g. client)
eval_pipeline = [ eval_pipeline = [
dict(type='LoadPointsFromFile', coord_type='LIDAR', load_dim=4, use_dim=4), dict(
type='LoadPointsFromFile',
coord_type='LIDAR',
load_dim=4,
use_dim=4,
backend_args=backend_args),
dict(type='Pack3DDetInputs', keys=['points']) dict(type='Pack3DDetInputs', keys=['points'])
] ]
train_dataloader = dict( train_dataloader = dict(
...@@ -88,7 +119,8 @@ train_dataloader = dict( ...@@ -88,7 +119,8 @@ train_dataloader = dict(
metainfo=metainfo, metainfo=metainfo,
# we use box_type_3d='LiDAR' in kitti and nuscenes dataset # we use box_type_3d='LiDAR' in kitti and nuscenes dataset
# and box_type_3d='Depth' in sunrgbd and scannet dataset. # and box_type_3d='Depth' in sunrgbd and scannet dataset.
box_type_3d='LiDAR'))) box_type_3d='LiDAR',
backend_args=backend_args)))
val_dataloader = dict( val_dataloader = dict(
batch_size=1, batch_size=1,
num_workers=1, num_workers=1,
...@@ -104,7 +136,8 @@ val_dataloader = dict( ...@@ -104,7 +136,8 @@ val_dataloader = dict(
modality=input_modality, modality=input_modality,
test_mode=True, test_mode=True,
metainfo=metainfo, metainfo=metainfo,
box_type_3d='LiDAR')) box_type_3d='LiDAR',
backend_args=backend_args))
test_dataloader = dict( test_dataloader = dict(
batch_size=1, batch_size=1,
num_workers=1, num_workers=1,
...@@ -120,11 +153,13 @@ test_dataloader = dict( ...@@ -120,11 +153,13 @@ test_dataloader = dict(
modality=input_modality, modality=input_modality,
test_mode=True, test_mode=True,
metainfo=metainfo, metainfo=metainfo,
box_type_3d='LiDAR')) box_type_3d='LiDAR',
backend_args=backend_args))
val_evaluator = dict( val_evaluator = dict(
type='KittiMetric', type='KittiMetric',
ann_file=data_root + 'kitti_infos_val.pkl', ann_file=data_root + 'kitti_infos_val.pkl',
metric='bbox') metric='bbox',
backend_args=backend_args)
test_evaluator = val_evaluator test_evaluator = val_evaluator
vis_backends = [dict(type='LocalVisBackend')] vis_backends = [dict(type='LocalVisBackend')]
......
...@@ -6,6 +6,21 @@ point_cloud_range = [0, -40, -3, 70.4, 40, 1] ...@@ -6,6 +6,21 @@ point_cloud_range = [0, -40, -3, 70.4, 40, 1]
input_modality = dict(use_lidar=True, use_camera=False) input_modality = dict(use_lidar=True, use_camera=False)
metainfo = dict(classes=class_names) metainfo = dict(classes=class_names)
# Example to use different file client
# Method 1: simply set the data root and let the file I/O module
# automatically infer from prefix (not support LMDB and Memcache yet)
# data_root = 's3://openmmlab/datasets/detection3d/kitti/'
# Method 2: Use backend_args, file_client_args in versions before 1.1.0rc4
# backend_args = dict(
# backend='petrel',
# path_mapping=dict({
# './data/': 's3://openmmlab/datasets/detection3d/',
# 'data/': 's3://openmmlab/datasets/detection3d/'
# }))
backend_args = None
db_sampler = dict( db_sampler = dict(
data_root=data_root, data_root=data_root,
info_path=data_root + 'kitti_dbinfos_train.pkl', info_path=data_root + 'kitti_dbinfos_train.pkl',
...@@ -14,14 +29,20 @@ db_sampler = dict( ...@@ -14,14 +29,20 @@ db_sampler = dict(
classes=class_names, classes=class_names,
sample_groups=dict(Car=15), sample_groups=dict(Car=15),
points_loader=dict( points_loader=dict(
type='LoadPointsFromFile', coord_type='LIDAR', load_dim=4, use_dim=4)) type='LoadPointsFromFile',
coord_type='LIDAR',
load_dim=4,
use_dim=4,
backend_args=backend_args),
backend_args=backend_args)
train_pipeline = [ train_pipeline = [
dict( dict(
type='LoadPointsFromFile', type='LoadPointsFromFile',
coord_type='LIDAR', coord_type='LIDAR',
load_dim=4, # x, y, z, intensity load_dim=4, # x, y, z, intensity
use_dim=4), use_dim=4,
backend_args=backend_args),
dict(type='LoadAnnotations3D', with_bbox_3d=True, with_label_3d=True), dict(type='LoadAnnotations3D', with_bbox_3d=True, with_label_3d=True),
dict(type='ObjectSample', db_sampler=db_sampler), dict(type='ObjectSample', db_sampler=db_sampler),
dict( dict(
...@@ -43,7 +64,12 @@ train_pipeline = [ ...@@ -43,7 +64,12 @@ train_pipeline = [
keys=['points', 'gt_bboxes_3d', 'gt_labels_3d']) keys=['points', 'gt_bboxes_3d', 'gt_labels_3d'])
] ]
test_pipeline = [ test_pipeline = [
dict(type='LoadPointsFromFile', coord_type='LIDAR', load_dim=4, use_dim=4), dict(
type='LoadPointsFromFile',
coord_type='LIDAR',
load_dim=4,
use_dim=4,
backend_args=backend_args),
dict( dict(
type='MultiScaleFlipAug3D', type='MultiScaleFlipAug3D',
img_scale=(1333, 800), img_scale=(1333, 800),
...@@ -64,7 +90,12 @@ test_pipeline = [ ...@@ -64,7 +90,12 @@ test_pipeline = [
# construct a pipeline for data and gt loading in show function # construct a pipeline for data and gt loading in show function
# please keep its loading function consistent with test_pipeline (e.g. client) # please keep its loading function consistent with test_pipeline (e.g. client)
eval_pipeline = [ eval_pipeline = [
dict(type='LoadPointsFromFile', coord_type='LIDAR', load_dim=4, use_dim=4), dict(
type='LoadPointsFromFile',
coord_type='LIDAR',
load_dim=4,
use_dim=4,
backend_args=backend_args),
dict(type='Pack3DDetInputs', keys=['points']) dict(type='Pack3DDetInputs', keys=['points'])
] ]
train_dataloader = dict( train_dataloader = dict(
...@@ -86,7 +117,8 @@ train_dataloader = dict( ...@@ -86,7 +117,8 @@ train_dataloader = dict(
metainfo=metainfo, metainfo=metainfo,
# we use box_type_3d='LiDAR' in kitti and nuscenes dataset # we use box_type_3d='LiDAR' in kitti and nuscenes dataset
# and box_type_3d='Depth' in sunrgbd and scannet dataset. # and box_type_3d='Depth' in sunrgbd and scannet dataset.
box_type_3d='LiDAR'))) box_type_3d='LiDAR',
backend_args=backend_args)))
val_dataloader = dict( val_dataloader = dict(
batch_size=1, batch_size=1,
num_workers=1, num_workers=1,
...@@ -102,7 +134,8 @@ val_dataloader = dict( ...@@ -102,7 +134,8 @@ val_dataloader = dict(
modality=input_modality, modality=input_modality,
test_mode=True, test_mode=True,
metainfo=metainfo, metainfo=metainfo,
box_type_3d='LiDAR')) box_type_3d='LiDAR',
backend_args=backend_args))
test_dataloader = dict( test_dataloader = dict(
batch_size=1, batch_size=1,
num_workers=1, num_workers=1,
...@@ -118,11 +151,13 @@ test_dataloader = dict( ...@@ -118,11 +151,13 @@ test_dataloader = dict(
modality=input_modality, modality=input_modality,
test_mode=True, test_mode=True,
metainfo=metainfo, metainfo=metainfo,
box_type_3d='LiDAR')) box_type_3d='LiDAR',
backend_args=backend_args))
val_evaluator = dict( val_evaluator = dict(
type='KittiMetric', type='KittiMetric',
ann_file=data_root + 'kitti_infos_val.pkl', ann_file=data_root + 'kitti_infos_val.pkl',
metric='bbox') metric='bbox',
backend_args=backend_args)
test_evaluator = val_evaluator test_evaluator = val_evaluator
vis_backends = [dict(type='LocalVisBackend')] vis_backends = [dict(type='LocalVisBackend')]
......
...@@ -4,15 +4,23 @@ class_names = ['Pedestrian', 'Cyclist', 'Car'] ...@@ -4,15 +4,23 @@ class_names = ['Pedestrian', 'Cyclist', 'Car']
input_modality = dict(use_lidar=False, use_camera=True) input_modality = dict(use_lidar=False, use_camera=True)
metainfo = dict(classes=class_names) metainfo = dict(classes=class_names)
file_client_args = dict(backend='disk') # Example to use different file client
# Uncomment the following if use ceph or other file clients. # Method 1: simply set the data root and let the file I/O module
# See https://mmcv.readthedocs.io/en/latest/api.html#mmcv.fileio.FileClient # automatically infer from prefix (not support LMDB and Memcache yet)
# for more details.
# file_client_args = dict( # data_root = 's3://openmmlab/datasets/detection3d/kitti/'
# backend='petrel', path_mapping=dict(data='s3://kitti_data/'))
# Method 2: Use backend_args, file_client_args in versions before 1.1.0rc4
# backend_args = dict(
# backend='petrel',
# path_mapping=dict({
# './data/': 's3://openmmlab/datasets/detection3d/',
# 'data/': 's3://openmmlab/datasets/detection3d/'
# }))
backend_args = None
train_pipeline = [ train_pipeline = [
dict(type='LoadImageFromFileMono3D'), dict(type='LoadImageFromFileMono3D', backend_args=backend_args),
dict( dict(
type='LoadAnnotations3D', type='LoadAnnotations3D',
with_bbox=True, with_bbox=True,
...@@ -31,12 +39,12 @@ train_pipeline = [ ...@@ -31,12 +39,12 @@ train_pipeline = [
]), ]),
] ]
test_pipeline = [ test_pipeline = [
dict(type='LoadImageFromFileMono3D'), dict(type='LoadImageFromFileMono3D', backend_args=backend_args),
dict(type='Resize', scale=(1242, 375), keep_ratio=True), dict(type='Resize', scale=(1242, 375), keep_ratio=True),
dict(type='Pack3DDetInputs', keys=['img']) dict(type='Pack3DDetInputs', keys=['img'])
] ]
eval_pipeline = [ eval_pipeline = [
dict(type='LoadImageFromFileMono3D'), dict(type='LoadImageFromFileMono3D', backend_args=backend_args),
dict(type='Pack3DDetInputs', keys=['img']) dict(type='Pack3DDetInputs', keys=['img'])
] ]
...@@ -57,7 +65,8 @@ train_dataloader = dict( ...@@ -57,7 +65,8 @@ train_dataloader = dict(
metainfo=metainfo, metainfo=metainfo,
# we use box_type_3d='Camera' in monocular 3d # we use box_type_3d='Camera' in monocular 3d
# detection task # detection task
box_type_3d='Camera')) box_type_3d='Camera',
backend_args=backend_args))
val_dataloader = dict( val_dataloader = dict(
batch_size=1, batch_size=1,
num_workers=2, num_workers=2,
...@@ -74,13 +83,15 @@ val_dataloader = dict( ...@@ -74,13 +83,15 @@ val_dataloader = dict(
load_type='fov_image_based', load_type='fov_image_based',
metainfo=metainfo, metainfo=metainfo,
test_mode=True, test_mode=True,
box_type_3d='Camera')) box_type_3d='Camera',
backend_args=backend_args))
test_dataloader = val_dataloader test_dataloader = val_dataloader
val_evaluator = dict( val_evaluator = dict(
type='KittiMetric', type='KittiMetric',
ann_file=data_root + 'kitti_infos_val.pkl', ann_file=data_root + 'kitti_infos_val.pkl',
metric='bbox') metric='bbox',
backend_args=backend_args)
test_evaluator = val_evaluator test_evaluator = val_evaluator
......
...@@ -16,19 +16,33 @@ input_modality = dict( ...@@ -16,19 +16,33 @@ input_modality = dict(
use_radar=False, use_radar=False,
use_map=False, use_map=False,
use_external=False) use_external=False)
file_client_args = dict(backend='disk')
# Uncomment the following if use ceph or other file clients. # Example to use different file client
# See https://mmcv.readthedocs.io/en/latest/api.html#mmcv.fileio.FileClient # Method 1: simply set the data root and let the file I/O module
# for more details. # automatically infer from prefix (not support LMDB and Memcache yet)
# file_client_args = dict(
# data_root = 's3://openmmlab/datasets/detection3d/lyft/'
# Method 2: Use backend_args, file_client_args in versions before 1.1.0rc4
# backend_args = dict(
# backend='petrel', # backend='petrel',
# path_mapping=dict({ # path_mapping=dict({
# './data/lyft/': 's3://lyft/lyft/', # './data/': 's3://openmmlab/datasets/detection3d/',
# 'data/lyft/': 's3://lyft/lyft/' # 'data/': 's3://openmmlab/datasets/detection3d/'
# })) # }))
backend_args = None
train_pipeline = [ train_pipeline = [
dict(type='LoadPointsFromFile', coord_type='LIDAR', load_dim=5, use_dim=5), dict(
dict(type='LoadPointsFromMultiSweeps', sweeps_num=10), type='LoadPointsFromFile',
coord_type='LIDAR',
load_dim=5,
use_dim=5,
backend_args=backend_args),
dict(
type='LoadPointsFromMultiSweeps',
sweeps_num=10,
backend_args=backend_args),
dict(type='LoadAnnotations3D', with_bbox_3d=True, with_label_3d=True), dict(type='LoadAnnotations3D', with_bbox_3d=True, with_label_3d=True),
dict( dict(
type='GlobalRotScaleTrans', type='GlobalRotScaleTrans',
...@@ -44,8 +58,16 @@ train_pipeline = [ ...@@ -44,8 +58,16 @@ train_pipeline = [
keys=['points', 'gt_bboxes_3d', 'gt_labels_3d']) keys=['points', 'gt_bboxes_3d', 'gt_labels_3d'])
] ]
test_pipeline = [ test_pipeline = [
dict(type='LoadPointsFromFile', coord_type='LIDAR', load_dim=5, use_dim=5), dict(
dict(type='LoadPointsFromMultiSweeps', sweeps_num=10), type='LoadPointsFromFile',
coord_type='LIDAR',
load_dim=5,
use_dim=5,
backend_args=backend_args),
dict(
type='LoadPointsFromMultiSweeps',
sweeps_num=10,
backend_args=backend_args),
dict( dict(
type='MultiScaleFlipAug3D', type='MultiScaleFlipAug3D',
img_scale=(1333, 800), img_scale=(1333, 800),
...@@ -66,8 +88,16 @@ test_pipeline = [ ...@@ -66,8 +88,16 @@ test_pipeline = [
# construct a pipeline for data and gt loading in show function # construct a pipeline for data and gt loading in show function
# please keep its loading function consistent with test_pipeline (e.g. client) # please keep its loading function consistent with test_pipeline (e.g. client)
eval_pipeline = [ eval_pipeline = [
dict(type='LoadPointsFromFile', coord_type='LIDAR', load_dim=5, use_dim=5), dict(
dict(type='LoadPointsFromMultiSweeps', sweeps_num=10), type='LoadPointsFromFile',
coord_type='LIDAR',
load_dim=5,
use_dim=5,
backend_args=backend_args),
dict(
type='LoadPointsFromMultiSweeps',
sweeps_num=10,
backend_args=backend_args),
dict(type='Pack3DDetInputs', keys=['points']) dict(type='Pack3DDetInputs', keys=['points'])
] ]
......
...@@ -13,20 +13,32 @@ data_root = 'data/lyft/' ...@@ -13,20 +13,32 @@ data_root = 'data/lyft/'
input_modality = dict(use_lidar=True, use_camera=False) input_modality = dict(use_lidar=True, use_camera=False)
data_prefix = dict(pts='samples/LIDAR_TOP', img='', sweeps='sweeps/LIDAR_TOP') data_prefix = dict(pts='samples/LIDAR_TOP', img='', sweeps='sweeps/LIDAR_TOP')
file_client_args = dict(backend='disk') # Example to use different file client
# Uncomment the following if use ceph or other file clients. # Method 1: simply set the data root and let the file I/O module
# See https://mmcv.readthedocs.io/en/latest/api.html#mmcv.fileio.FileClient # automatically infer from prefix (not support LMDB and Memcache yet)
# for more details.
# file_client_args = dict( # data_root = 's3://openmmlab/datasets/detection3d/lyft/'
# Method 2: Use backend_args, file_client_args in versions before 1.1.0rc4
# backend_args = dict(
# backend='petrel', # backend='petrel',
# path_mapping=dict({ # path_mapping=dict({
# './data/lyft/': 's3://lyft/lyft/', # './data/': 's3://openmmlab/datasets/detection3d/',
# 'data/lyft/': 's3://lyft/lyft/' # 'data/': 's3://openmmlab/datasets/detection3d/'
# })) # }))
backend_args = None
train_pipeline = [ train_pipeline = [
dict(type='LoadPointsFromFile', coord_type='LIDAR', load_dim=5, use_dim=5), dict(
dict(type='LoadPointsFromMultiSweeps', sweeps_num=10), type='LoadPointsFromFile',
coord_type='LIDAR',
load_dim=5,
use_dim=5,
backend_args=backend_args),
dict(
type='LoadPointsFromMultiSweeps',
sweeps_num=10,
backend_args=backend_args),
dict(type='LoadAnnotations3D', with_bbox_3d=True, with_label_3d=True), dict(type='LoadAnnotations3D', with_bbox_3d=True, with_label_3d=True),
dict( dict(
type='GlobalRotScaleTrans', type='GlobalRotScaleTrans',
...@@ -42,8 +54,16 @@ train_pipeline = [ ...@@ -42,8 +54,16 @@ train_pipeline = [
keys=['points', 'gt_bboxes_3d', 'gt_labels_3d']) keys=['points', 'gt_bboxes_3d', 'gt_labels_3d'])
] ]
test_pipeline = [ test_pipeline = [
dict(type='LoadPointsFromFile', coord_type='LIDAR', load_dim=5, use_dim=5), dict(
dict(type='LoadPointsFromMultiSweeps', sweeps_num=10), type='LoadPointsFromFile',
coord_type='LIDAR',
load_dim=5,
use_dim=5,
backend_args=backend_args),
dict(
type='LoadPointsFromMultiSweeps',
sweeps_num=10,
backend_args=backend_args),
dict( dict(
type='MultiScaleFlipAug3D', type='MultiScaleFlipAug3D',
img_scale=(1333, 800), img_scale=(1333, 800),
...@@ -64,8 +84,16 @@ test_pipeline = [ ...@@ -64,8 +84,16 @@ test_pipeline = [
# construct a pipeline for data and gt loading in show function # construct a pipeline for data and gt loading in show function
# please keep its loading function consistent with test_pipeline (e.g. client) # please keep its loading function consistent with test_pipeline (e.g. client)
eval_pipeline = [ eval_pipeline = [
dict(type='LoadPointsFromFile', coord_type='LIDAR', load_dim=5, use_dim=5), dict(
dict(type='LoadPointsFromMultiSweeps', sweeps_num=10), type='LoadPointsFromFile',
coord_type='LIDAR',
load_dim=5,
use_dim=5,
backend_args=backend_args),
dict(
type='LoadPointsFromMultiSweeps',
sweeps_num=10,
backend_args=backend_args),
dict(type='Pack3DDetInputs', keys=['points']) dict(type='Pack3DDetInputs', keys=['points'])
] ]
train_dataloader = dict( train_dataloader = dict(
...@@ -82,7 +110,8 @@ train_dataloader = dict( ...@@ -82,7 +110,8 @@ train_dataloader = dict(
modality=input_modality, modality=input_modality,
data_prefix=data_prefix, data_prefix=data_prefix,
test_mode=False, test_mode=False,
box_type_3d='LiDAR')) box_type_3d='LiDAR',
backend_args=backend_args))
test_dataloader = dict( test_dataloader = dict(
batch_size=1, batch_size=1,
num_workers=1, num_workers=1,
...@@ -98,7 +127,8 @@ test_dataloader = dict( ...@@ -98,7 +127,8 @@ test_dataloader = dict(
modality=input_modality, modality=input_modality,
data_prefix=data_prefix, data_prefix=data_prefix,
test_mode=True, test_mode=True,
box_type_3d='LiDAR')) box_type_3d='LiDAR',
backend_args=backend_args))
val_dataloader = dict( val_dataloader = dict(
batch_size=1, batch_size=1,
num_workers=1, num_workers=1,
...@@ -114,16 +144,19 @@ val_dataloader = dict( ...@@ -114,16 +144,19 @@ val_dataloader = dict(
modality=input_modality, modality=input_modality,
test_mode=True, test_mode=True,
data_prefix=data_prefix, data_prefix=data_prefix,
box_type_3d='LiDAR')) box_type_3d='LiDAR',
backend_args=backend_args))
val_evaluator = dict( val_evaluator = dict(
type='LyftMetric', type='LyftMetric',
ann_file=data_root + 'lyft_infos_val.pkl', ann_file=data_root + 'lyft_infos_val.pkl',
metric='bbox') metric='bbox',
backend_args=backend_args)
test_evaluator = dict( test_evaluator = dict(
type='LyftMetric', type='LyftMetric',
ann_file=data_root + 'lyft_infos_val.pkl', ann_file=data_root + 'lyft_infos_val.pkl',
metric='bbox') metric='bbox',
backend_args=backend_args)
vis_backends = [dict(type='LocalVisBackend')] vis_backends = [dict(type='LocalVisBackend')]
visualizer = dict( visualizer = dict(
......
...@@ -5,15 +5,23 @@ class_names = [ ...@@ -5,15 +5,23 @@ class_names = [
'motorcycle', 'pedestrian', 'traffic_cone', 'barrier' 'motorcycle', 'pedestrian', 'traffic_cone', 'barrier'
] ]
file_client_args = dict(backend='disk') # Example to use different file client
# Uncomment the following if use ceph or other file clients. # Method 1: simply set the data root and let the file I/O module
# See https://mmcv.readthedocs.io/en/latest/api.html#mmcv.fileio.FileClient # automatically infer from prefix (not support LMDB and Memcache yet)
# for more details.
# file_client_args = dict( # data_root = 's3://openmmlab/datasets/detection3d/nuimages/'
# backend='petrel', path_mapping=dict(data='s3://nuimages'))
# Method 2: Use backend_args, file_client_args in versions before 1.1.0rc4
# backend_args = dict(
# backend='petrel',
# path_mapping=dict({
# './data/': 's3://openmmlab/datasets/detection3d/',
# 'data/': 's3://openmmlab/datasets/detection3d/'
# }))
backend_args = None
train_pipeline = [ train_pipeline = [
dict(type='LoadImageFromFile'), dict(type='LoadImageFromFile', backend_args=backend_args),
dict(type='LoadAnnotations', with_bbox=True, with_mask=True), dict(type='LoadAnnotations', with_bbox=True, with_mask=True),
dict( dict(
type='Resize', type='Resize',
...@@ -24,7 +32,7 @@ train_pipeline = [ ...@@ -24,7 +32,7 @@ train_pipeline = [
dict(type='PackDetInputs'), dict(type='PackDetInputs'),
] ]
test_pipeline = [ test_pipeline = [
dict(type='LoadImageFromFile'), dict(type='LoadImageFromFile', backend_args=backend_args),
dict( dict(
type='MultiScaleFlipAug', type='MultiScaleFlipAug',
img_scale=(1600, 900), img_scale=(1600, 900),
......
...@@ -17,20 +17,32 @@ data_root = 'data/nuscenes/' ...@@ -17,20 +17,32 @@ data_root = 'data/nuscenes/'
input_modality = dict(use_lidar=True, use_camera=False) input_modality = dict(use_lidar=True, use_camera=False)
data_prefix = dict(pts='samples/LIDAR_TOP', img='', sweeps='sweeps/LIDAR_TOP') data_prefix = dict(pts='samples/LIDAR_TOP', img='', sweeps='sweeps/LIDAR_TOP')
file_client_args = dict(backend='disk') # Example to use different file client
# Uncomment the following if use ceph or other file clients. # Method 1: simply set the data root and let the file I/O module
# See https://mmcv.readthedocs.io/en/latest/api.html#mmcv.fileio.FileClient # automatically infer from prefix (not support LMDB and Memcache yet)
# for more details.
# file_client_args = dict( # data_root = 's3://openmmlab/datasets/detection3d/nuscenes/'
# Method 2: Use backend_args, file_client_args in versions before 1.1.0rc4
# backend_args = dict(
# backend='petrel', # backend='petrel',
# path_mapping=dict({ # path_mapping=dict({
# './data/nuscenes/': 's3://nuscenes/nuscenes/', # './data/': 's3://openmmlab/datasets/detection3d/',
# 'data/nuscenes/': 's3://nuscenes/nuscenes/' # 'data/': 's3://openmmlab/datasets/detection3d/'
# })) # }))
backend_args = None
train_pipeline = [ train_pipeline = [
dict(type='LoadPointsFromFile', coord_type='LIDAR', load_dim=5, use_dim=5), dict(
dict(type='LoadPointsFromMultiSweeps', sweeps_num=10), type='LoadPointsFromFile',
coord_type='LIDAR',
load_dim=5,
use_dim=5,
backend_args=backend_args),
dict(
type='LoadPointsFromMultiSweeps',
sweeps_num=10,
backend_args=backend_args),
dict(type='LoadAnnotations3D', with_bbox_3d=True, with_label_3d=True), dict(type='LoadAnnotations3D', with_bbox_3d=True, with_label_3d=True),
dict( dict(
type='GlobalRotScaleTrans', type='GlobalRotScaleTrans',
...@@ -47,8 +59,17 @@ train_pipeline = [ ...@@ -47,8 +59,17 @@ train_pipeline = [
keys=['points', 'gt_bboxes_3d', 'gt_labels_3d']) keys=['points', 'gt_bboxes_3d', 'gt_labels_3d'])
] ]
test_pipeline = [ test_pipeline = [
dict(type='LoadPointsFromFile', coord_type='LIDAR', load_dim=5, use_dim=5), dict(
dict(type='LoadPointsFromMultiSweeps', sweeps_num=10, test_mode=True), type='LoadPointsFromFile',
coord_type='LIDAR',
load_dim=5,
use_dim=5,
backend_args=backend_args),
dict(
type='LoadPointsFromMultiSweeps',
sweeps_num=10,
test_mode=True,
backend_args=backend_args),
dict( dict(
type='MultiScaleFlipAug3D', type='MultiScaleFlipAug3D',
img_scale=(1333, 800), img_scale=(1333, 800),
...@@ -69,8 +90,17 @@ test_pipeline = [ ...@@ -69,8 +90,17 @@ test_pipeline = [
# construct a pipeline for data and gt loading in show function # construct a pipeline for data and gt loading in show function
# please keep its loading function consistent with test_pipeline (e.g. client) # please keep its loading function consistent with test_pipeline (e.g. client)
eval_pipeline = [ eval_pipeline = [
dict(type='LoadPointsFromFile', coord_type='LIDAR', load_dim=5, use_dim=5), dict(
dict(type='LoadPointsFromMultiSweeps', sweeps_num=10, test_mode=True), type='LoadPointsFromFile',
coord_type='LIDAR',
load_dim=5,
use_dim=5,
backend_args=backend_args),
dict(
type='LoadPointsFromMultiSweeps',
sweeps_num=10,
test_mode=True,
backend_args=backend_args),
dict(type='Pack3DDetInputs', keys=['points']) dict(type='Pack3DDetInputs', keys=['points'])
] ]
train_dataloader = dict( train_dataloader = dict(
...@@ -89,7 +119,8 @@ train_dataloader = dict( ...@@ -89,7 +119,8 @@ train_dataloader = dict(
data_prefix=data_prefix, data_prefix=data_prefix,
# we use box_type_3d='LiDAR' in kitti and nuscenes dataset # we use box_type_3d='LiDAR' in kitti and nuscenes dataset
# and box_type_3d='Depth' in sunrgbd and scannet dataset. # and box_type_3d='Depth' in sunrgbd and scannet dataset.
box_type_3d='LiDAR')) box_type_3d='LiDAR',
backend_args=backend_args))
test_dataloader = dict( test_dataloader = dict(
batch_size=1, batch_size=1,
num_workers=1, num_workers=1,
...@@ -105,7 +136,8 @@ test_dataloader = dict( ...@@ -105,7 +136,8 @@ test_dataloader = dict(
modality=input_modality, modality=input_modality,
data_prefix=data_prefix, data_prefix=data_prefix,
test_mode=True, test_mode=True,
box_type_3d='LiDAR')) box_type_3d='LiDAR',
backend_args=backend_args))
val_dataloader = dict( val_dataloader = dict(
batch_size=1, batch_size=1,
num_workers=1, num_workers=1,
...@@ -121,13 +153,15 @@ val_dataloader = dict( ...@@ -121,13 +153,15 @@ val_dataloader = dict(
modality=input_modality, modality=input_modality,
test_mode=True, test_mode=True,
data_prefix=data_prefix, data_prefix=data_prefix,
box_type_3d='LiDAR')) box_type_3d='LiDAR',
backend_args=backend_args))
val_evaluator = dict( val_evaluator = dict(
type='NuScenesMetric', type='NuScenesMetric',
data_root=data_root, data_root=data_root,
ann_file=data_root + 'nuscenes_infos_val.pkl', ann_file=data_root + 'nuscenes_infos_val.pkl',
metric='bbox') metric='bbox',
backend_args=backend_args)
test_evaluator = val_evaluator test_evaluator = val_evaluator
vis_backends = [dict(type='LocalVisBackend')] vis_backends = [dict(type='LocalVisBackend')]
......
...@@ -9,21 +9,23 @@ metainfo = dict(classes=class_names) ...@@ -9,21 +9,23 @@ metainfo = dict(classes=class_names)
# format which requires the information in input_modality. # format which requires the information in input_modality.
input_modality = dict(use_lidar=False, use_camera=True) input_modality = dict(use_lidar=False, use_camera=True)
file_client_args = dict(backend='disk') # Example to use different file client
# Uncomment the following if use ceph or other file clients. # Method 1: simply set the data root and let the file I/O module
# See https://mmcv.readthedocs.io/en/latest/api.html#mmcv.fileio.FileClient # automatically infer from prefix (not support LMDB and Memcache yet)
# for more details.
# file_client_args = dict( # data_root = 's3://openmmlab/datasets/detection3d/nuscenes/'
# Method 2: Use backend_args, file_client_args in versions before 1.1.0rc4
# backend_args = dict(
# backend='petrel', # backend='petrel',
# path_mapping=dict({ # path_mapping=dict({
# './data/nuscenes/': # './data/': 's3://openmmlab/datasets/detection3d/',
# 's3://openmmlab/datasets/detection3d/nuscenes/', # 'data/': 's3://openmmlab/datasets/detection3d/'
# 'data/nuscenes/': # }))
# 's3://openmmlab/datasets/detection3d/nuscenes/' backend_args = None
# }))
train_pipeline = [ train_pipeline = [
dict(type='LoadImageFromFileMono3D'), dict(type='LoadImageFromFileMono3D', backend_args=backend_args),
dict( dict(
type='LoadAnnotations3D', type='LoadAnnotations3D',
with_bbox=True, with_bbox=True,
...@@ -43,7 +45,7 @@ train_pipeline = [ ...@@ -43,7 +45,7 @@ train_pipeline = [
] ]
test_pipeline = [ test_pipeline = [
dict(type='LoadImageFromFileMono3D'), dict(type='LoadImageFromFileMono3D', backend_args=backend_args),
dict(type='mmdet.Resize', scale=(1600, 900), keep_ratio=True), dict(type='mmdet.Resize', scale=(1600, 900), keep_ratio=True),
dict(type='Pack3DDetInputs', keys=['img']) dict(type='Pack3DDetInputs', keys=['img'])
] ]
...@@ -73,7 +75,8 @@ train_dataloader = dict( ...@@ -73,7 +75,8 @@ train_dataloader = dict(
# we use box_type_3d='Camera' in monocular 3d # we use box_type_3d='Camera' in monocular 3d
# detection task # detection task
box_type_3d='Camera', box_type_3d='Camera',
use_valid_flag=True)) use_valid_flag=True,
backend_args=backend_args))
val_dataloader = dict( val_dataloader = dict(
batch_size=1, batch_size=1,
num_workers=2, num_workers=2,
...@@ -98,14 +101,16 @@ val_dataloader = dict( ...@@ -98,14 +101,16 @@ val_dataloader = dict(
metainfo=metainfo, metainfo=metainfo,
test_mode=True, test_mode=True,
box_type_3d='Camera', box_type_3d='Camera',
use_valid_flag=True)) use_valid_flag=True,
backend_args=backend_args))
test_dataloader = val_dataloader test_dataloader = val_dataloader
val_evaluator = dict( val_evaluator = dict(
type='NuScenesMetric', type='NuScenesMetric',
data_root=data_root, data_root=data_root,
ann_file=data_root + 'nuscenes_infos_val.pkl', ann_file=data_root + 'nuscenes_infos_val.pkl',
metric='bbox') metric='bbox',
backend_args=backend_args)
test_evaluator = val_evaluator test_evaluator = val_evaluator
......
...@@ -2,6 +2,21 @@ ...@@ -2,6 +2,21 @@
dataset_type = 'S3DISDataset' dataset_type = 'S3DISDataset'
data_root = 'data/s3dis/' data_root = 'data/s3dis/'
# Example to use different file client
# Method 1: simply set the data root and let the file I/O module
# automatically infer from prefix (not support LMDB and Memcache yet)
# data_root = 's3://openmmlab/datasets/detection3d/s3dis/'
# Method 2: Use backend_args, file_client_args in versions before 1.1.0rc4
# backend_args = dict(
# backend='petrel',
# path_mapping=dict({
# './data/': 's3://openmmlab/datasets/detection3d/',
# 'data/': 's3://openmmlab/datasets/detection3d/'
# }))
backend_args = None
metainfo = dict(classes=('table', 'chair', 'sofa', 'bookcase', 'board')) metainfo = dict(classes=('table', 'chair', 'sofa', 'bookcase', 'board'))
train_area = [1, 2, 3, 4, 6] train_area = [1, 2, 3, 4, 6]
test_area = 5 test_area = 5
...@@ -13,7 +28,8 @@ train_pipeline = [ ...@@ -13,7 +28,8 @@ train_pipeline = [
shift_height=False, shift_height=False,
use_color=True, use_color=True,
load_dim=6, load_dim=6,
use_dim=[0, 1, 2, 3, 4, 5]), use_dim=[0, 1, 2, 3, 4, 5],
backend_args=backend_args),
dict(type='LoadAnnotations3D', with_bbox_3d=True, with_label_3d=True), dict(type='LoadAnnotations3D', with_bbox_3d=True, with_label_3d=True),
dict(type='PointSample', num_points=100000), dict(type='PointSample', num_points=100000),
dict( dict(
...@@ -39,7 +55,8 @@ test_pipeline = [ ...@@ -39,7 +55,8 @@ test_pipeline = [
shift_height=False, shift_height=False,
use_color=True, use_color=True,
load_dim=6, load_dim=6,
use_dim=[0, 1, 2, 3, 4, 5]), use_dim=[0, 1, 2, 3, 4, 5],
backend_args=backend_args),
dict( dict(
type='MultiScaleFlipAug3D', type='MultiScaleFlipAug3D',
img_scale=(1333, 800), img_scale=(1333, 800),
...@@ -79,7 +96,8 @@ train_dataloader = dict( ...@@ -79,7 +96,8 @@ train_dataloader = dict(
pipeline=train_pipeline, pipeline=train_pipeline,
filter_empty_gt=True, filter_empty_gt=True,
metainfo=metainfo, metainfo=metainfo,
box_type_3d='Depth') for i in train_area box_type_3d='Depth',
backend_args=backend_args) for i in train_area
]))) ])))
val_dataloader = dict( val_dataloader = dict(
...@@ -93,7 +111,8 @@ val_dataloader = dict( ...@@ -93,7 +111,8 @@ val_dataloader = dict(
pipeline=test_pipeline, pipeline=test_pipeline,
metainfo=metainfo, metainfo=metainfo,
test_mode=True, test_mode=True,
box_type_3d='Depth')) box_type_3d='Depth',
backend_args=backend_args))
test_dataloader = dict( test_dataloader = dict(
batch_size=1, batch_size=1,
num_workers=1, num_workers=1,
...@@ -105,7 +124,8 @@ test_dataloader = dict( ...@@ -105,7 +124,8 @@ test_dataloader = dict(
pipeline=test_pipeline, pipeline=test_pipeline,
metainfo=metainfo, metainfo=metainfo,
test_mode=True, test_mode=True,
box_type_3d='Depth')) box_type_3d='Depth',
backend_args=backend_args))
val_evaluator = dict(type='IndoorMetric') val_evaluator = dict(type='IndoorMetric')
test_evaluator = val_evaluator test_evaluator = val_evaluator
......
...@@ -10,16 +10,20 @@ data_prefix = dict( ...@@ -10,16 +10,20 @@ data_prefix = dict(
pts_instance_mask='instance_mask', pts_instance_mask='instance_mask',
pts_semantic_mask='semantic_mask') pts_semantic_mask='semantic_mask')
file_client_args = dict(backend='disk') # Example to use different file client
# Uncomment the following if use ceph or other file clients. # Method 1: simply set the data root and let the file I/O module
# See https://mmcv.readthedocs.io/en/latest/api.html#mmcv.fileio.FileClient # automatically infer from prefix (not support LMDB and Memcache yet)
# for more details.
# file_client_args = dict( # data_root = 's3://openmmlab/datasets/detection3d/s3dis/'
# Method 2: Use backend_args, file_client_args in versions before 1.1.0rc4
# backend_args = dict(
# backend='petrel', # backend='petrel',
# path_mapping=dict({ # path_mapping=dict({
# './data/s3dis/': # './data/': 's3://openmmlab/datasets/detection3d/',
# 's3://s3dis/', # 'data/': 's3://openmmlab/datasets/detection3d/'
# })) # }))
backend_args = None
num_points = 4096 num_points = 4096
train_area = [1, 2, 3, 4, 6] train_area = [1, 2, 3, 4, 6]
...@@ -31,13 +35,15 @@ train_pipeline = [ ...@@ -31,13 +35,15 @@ train_pipeline = [
shift_height=False, shift_height=False,
use_color=True, use_color=True,
load_dim=6, load_dim=6,
use_dim=[0, 1, 2, 3, 4, 5]), use_dim=[0, 1, 2, 3, 4, 5],
backend_args=backend_args),
dict( dict(
type='LoadAnnotations3D', type='LoadAnnotations3D',
with_bbox_3d=False, with_bbox_3d=False,
with_label_3d=False, with_label_3d=False,
with_mask_3d=False, with_mask_3d=False,
with_seg_3d=True), with_seg_3d=True,
backend_args=backend_args),
dict(type='PointSegClassMapping'), dict(type='PointSegClassMapping'),
dict( dict(
type='IndoorPatchPointSample', type='IndoorPatchPointSample',
...@@ -57,13 +63,15 @@ test_pipeline = [ ...@@ -57,13 +63,15 @@ test_pipeline = [
shift_height=False, shift_height=False,
use_color=True, use_color=True,
load_dim=6, load_dim=6,
use_dim=[0, 1, 2, 3, 4, 5]), use_dim=[0, 1, 2, 3, 4, 5],
backend_args=backend_args),
dict( dict(
type='LoadAnnotations3D', type='LoadAnnotations3D',
with_bbox_3d=False, with_bbox_3d=False,
with_label_3d=False, with_label_3d=False,
with_mask_3d=False, with_mask_3d=False,
with_seg_3d=True), with_seg_3d=True,
backend_args=backend_args),
dict(type='NormalizePointsColor', color_mean=None), dict(type='NormalizePointsColor', color_mean=None),
dict( dict(
# a wrapper in order to successfully call test function # a wrapper in order to successfully call test function
...@@ -96,7 +104,8 @@ eval_pipeline = [ ...@@ -96,7 +104,8 @@ eval_pipeline = [
shift_height=False, shift_height=False,
use_color=True, use_color=True,
load_dim=6, load_dim=6,
use_dim=[0, 1, 2, 3, 4, 5]), use_dim=[0, 1, 2, 3, 4, 5],
backend_args=backend_args),
dict(type='NormalizePointsColor', color_mean=None), dict(type='NormalizePointsColor', color_mean=None),
dict(type='Pack3DDetInputs', keys=['points']) dict(type='Pack3DDetInputs', keys=['points'])
] ]
...@@ -120,7 +129,8 @@ train_dataloader = dict( ...@@ -120,7 +129,8 @@ train_dataloader = dict(
scene_idxs=[ scene_idxs=[
f'seg_info/Area_{i}_resampled_scene_idxs.npy' for i in train_area f'seg_info/Area_{i}_resampled_scene_idxs.npy' for i in train_area
], ],
test_mode=False)) test_mode=False,
backend_args=backend_args))
test_dataloader = dict( test_dataloader = dict(
batch_size=1, batch_size=1,
num_workers=1, num_workers=1,
...@@ -137,7 +147,8 @@ test_dataloader = dict( ...@@ -137,7 +147,8 @@ test_dataloader = dict(
modality=input_modality, modality=input_modality,
ignore_index=len(class_names), ignore_index=len(class_names),
scene_idxs=f'seg_info/Area_{test_area}_resampled_scene_idxs.npy', scene_idxs=f'seg_info/Area_{test_area}_resampled_scene_idxs.npy',
test_mode=True)) test_mode=True,
backend_args=backend_args))
val_dataloader = test_dataloader val_dataloader = test_dataloader
val_evaluator = dict(type='SegMetric') val_evaluator = dict(type='SegMetric')
......
...@@ -8,16 +8,20 @@ metainfo = dict( ...@@ -8,16 +8,20 @@ metainfo = dict(
'refrigerator', 'showercurtrain', 'toilet', 'sink', 'bathtub', 'refrigerator', 'showercurtrain', 'toilet', 'sink', 'bathtub',
'garbagebin')) 'garbagebin'))
# file_client_args = dict(backend='disk') # Example to use different file client
# Uncomment the following if use ceph or other file clients. # Method 1: simply set the data root and let the file I/O module
# See https://mmcv.readthedocs.io/en/latest/api.html#mmcv.fileio.FileClient # automatically infer from prefix (not support LMDB and Memcache yet)
# for more details.
# file_client_args = dict( # data_root = 's3://openmmlab/datasets/detection3d/scannet/'
# Method 2: Use backend_args, file_client_args in versions before 1.1.0rc4
# backend_args = dict(
# backend='petrel', # backend='petrel',
# path_mapping=dict({ # path_mapping=dict({
# './data/scannet/': # './data/': 's3://openmmlab/datasets/detection3d/',
# 's3://scannet/', # 'data/': 's3://openmmlab/datasets/detection3d/'
# })) # }))
backend_args = None
train_pipeline = [ train_pipeline = [
dict( dict(
...@@ -25,13 +29,15 @@ train_pipeline = [ ...@@ -25,13 +29,15 @@ train_pipeline = [
coord_type='DEPTH', coord_type='DEPTH',
shift_height=True, shift_height=True,
load_dim=6, load_dim=6,
use_dim=[0, 1, 2]), use_dim=[0, 1, 2],
backend_args=backend_args),
dict( dict(
type='LoadAnnotations3D', type='LoadAnnotations3D',
with_bbox_3d=True, with_bbox_3d=True,
with_label_3d=True, with_label_3d=True,
with_mask_3d=True, with_mask_3d=True,
with_seg_3d=True), with_seg_3d=True,
backend_args=backend_args),
dict(type='GlobalAlignment', rotation_axis=2), dict(type='GlobalAlignment', rotation_axis=2),
dict(type='PointSegClassMapping'), dict(type='PointSegClassMapping'),
dict(type='PointSample', num_points=40000), dict(type='PointSample', num_points=40000),
...@@ -58,7 +64,8 @@ test_pipeline = [ ...@@ -58,7 +64,8 @@ test_pipeline = [
coord_type='DEPTH', coord_type='DEPTH',
shift_height=True, shift_height=True,
load_dim=6, load_dim=6,
use_dim=[0, 1, 2]), use_dim=[0, 1, 2],
backend_args=backend_args),
dict(type='GlobalAlignment', rotation_axis=2), dict(type='GlobalAlignment', rotation_axis=2),
dict( dict(
type='MultiScaleFlipAug3D', type='MultiScaleFlipAug3D',
...@@ -97,7 +104,8 @@ train_dataloader = dict( ...@@ -97,7 +104,8 @@ train_dataloader = dict(
metainfo=metainfo, metainfo=metainfo,
# we use box_type_3d='LiDAR' in kitti and nuscenes dataset # we use box_type_3d='LiDAR' in kitti and nuscenes dataset
# and box_type_3d='Depth' in sunrgbd and scannet dataset. # and box_type_3d='Depth' in sunrgbd and scannet dataset.
box_type_3d='Depth'))) box_type_3d='Depth',
backend_args=backend_args)))
val_dataloader = dict( val_dataloader = dict(
batch_size=1, batch_size=1,
...@@ -110,7 +118,8 @@ val_dataloader = dict( ...@@ -110,7 +118,8 @@ val_dataloader = dict(
pipeline=test_pipeline, pipeline=test_pipeline,
metainfo=metainfo, metainfo=metainfo,
test_mode=True, test_mode=True,
box_type_3d='Depth')) box_type_3d='Depth',
backend_args=backend_args))
test_dataloader = dict( test_dataloader = dict(
batch_size=1, batch_size=1,
num_workers=1, num_workers=1,
...@@ -122,7 +131,8 @@ test_dataloader = dict( ...@@ -122,7 +131,8 @@ test_dataloader = dict(
pipeline=test_pipeline, pipeline=test_pipeline,
metainfo=metainfo, metainfo=metainfo,
test_mode=True, test_mode=True,
box_type_3d='Depth')) box_type_3d='Depth',
backend_args=backend_args))
val_evaluator = dict(type='IndoorMetric') val_evaluator = dict(type='IndoorMetric')
test_evaluator = val_evaluator test_evaluator = val_evaluator
......
...@@ -12,16 +12,20 @@ data_prefix = dict( ...@@ -12,16 +12,20 @@ data_prefix = dict(
pts_instance_mask='instance_mask', pts_instance_mask='instance_mask',
pts_semantic_mask='semantic_mask') pts_semantic_mask='semantic_mask')
file_client_args = dict(backend='disk') # Example to use different file client
# Uncomment the following if use ceph or other file clients. # Method 1: simply set the data root and let the file I/O module
# See https://mmcv.readthedocs.io/en/latest/api.html#mmcv.fileio.FileClient # automatically infer from prefix (not support LMDB and Memcache yet)
# for more details.
# file_client_args = dict( # data_root = 's3://openmmlab/datasets/detection3d/scannet/'
# Method 2: Use backend_args, file_client_args in versions before 1.1.0rc4
# backend_args = dict(
# backend='petrel', # backend='petrel',
# path_mapping=dict({ # path_mapping=dict({
# './data/scannet/': # './data/': 's3://openmmlab/datasets/detection3d/',
# 's3://scannet/', # 'data/': 's3://openmmlab/datasets/detection3d/'
# })) # }))
backend_args = None
num_points = 8192 num_points = 8192
train_pipeline = [ train_pipeline = [
...@@ -31,13 +35,15 @@ train_pipeline = [ ...@@ -31,13 +35,15 @@ train_pipeline = [
shift_height=False, shift_height=False,
use_color=True, use_color=True,
load_dim=6, load_dim=6,
use_dim=[0, 1, 2, 3, 4, 5]), use_dim=[0, 1, 2, 3, 4, 5],
backend_args=backend_args),
dict( dict(
type='LoadAnnotations3D', type='LoadAnnotations3D',
with_bbox_3d=False, with_bbox_3d=False,
with_label_3d=False, with_label_3d=False,
with_mask_3d=False, with_mask_3d=False,
with_seg_3d=True), with_seg_3d=True,
backend_args=backend_args),
dict(type='PointSegClassMapping'), dict(type='PointSegClassMapping'),
dict( dict(
type='IndoorPatchPointSample', type='IndoorPatchPointSample',
...@@ -57,13 +63,15 @@ test_pipeline = [ ...@@ -57,13 +63,15 @@ test_pipeline = [
shift_height=False, shift_height=False,
use_color=True, use_color=True,
load_dim=6, load_dim=6,
use_dim=[0, 1, 2, 3, 4, 5]), use_dim=[0, 1, 2, 3, 4, 5],
backend_args=backend_args),
dict( dict(
type='LoadAnnotations3D', type='LoadAnnotations3D',
with_bbox_3d=False, with_bbox_3d=False,
with_label_3d=False, with_label_3d=False,
with_mask_3d=False, with_mask_3d=False,
with_seg_3d=True), with_seg_3d=True,
backend_args=backend_args),
dict(type='NormalizePointsColor', color_mean=None), dict(type='NormalizePointsColor', color_mean=None),
dict( dict(
# a wrapper in order to successfully call test function # a wrapper in order to successfully call test function
...@@ -96,7 +104,8 @@ eval_pipeline = [ ...@@ -96,7 +104,8 @@ eval_pipeline = [
shift_height=False, shift_height=False,
use_color=True, use_color=True,
load_dim=6, load_dim=6,
use_dim=[0, 1, 2, 3, 4, 5]), use_dim=[0, 1, 2, 3, 4, 5],
backend_args=backend_args),
dict(type='NormalizePointsColor', color_mean=None), dict(type='NormalizePointsColor', color_mean=None),
dict(type='Pack3DDetInputs', keys=['points']) dict(type='Pack3DDetInputs', keys=['points'])
] ]
...@@ -116,7 +125,8 @@ train_dataloader = dict( ...@@ -116,7 +125,8 @@ train_dataloader = dict(
modality=input_modality, modality=input_modality,
ignore_index=len(class_names), ignore_index=len(class_names),
scene_idxs=data_root + 'seg_info/train_resampled_scene_idxs.npy', scene_idxs=data_root + 'seg_info/train_resampled_scene_idxs.npy',
test_mode=False)) test_mode=False,
backend_args=backend_args))
test_dataloader = dict( test_dataloader = dict(
batch_size=1, batch_size=1,
num_workers=1, num_workers=1,
...@@ -132,7 +142,8 @@ test_dataloader = dict( ...@@ -132,7 +142,8 @@ test_dataloader = dict(
pipeline=test_pipeline, pipeline=test_pipeline,
modality=input_modality, modality=input_modality,
ignore_index=len(class_names), ignore_index=len(class_names),
test_mode=True)) test_mode=True,
backend_args=backend_args))
val_dataloader = test_dataloader val_dataloader = test_dataloader
val_evaluator = dict(type='SegMetric') val_evaluator = dict(type='SegMetric')
......
...@@ -75,16 +75,20 @@ metainfo = dict( ...@@ -75,16 +75,20 @@ metainfo = dict(
input_modality = dict(use_lidar=True, use_camera=False) input_modality = dict(use_lidar=True, use_camera=False)
file_client_args = dict(backend='disk') # Example to use different file client
# Uncomment the following if use ceph or other file clients. # Method 1: simply set the data root and let the file I/O module
# See https://mmcv.readthedocs.io/en/latest/api.html#mmcv.fileio.FileClient # automatically infer from prefix (not support LMDB and Memcache yet)
# for more details.
# file_client_args = dict( # data_root = 's3://openmmlab/datasets/detection3d/semantickitti/'
# Method 2: Use backend_args, file_client_args in versions before 1.1.0rc4
# backend_args = dict(
# backend='petrel', # backend='petrel',
# path_mapping=dict({ # path_mapping=dict({
# './data/semantickitti/': # './data/': 's3://openmmlab/datasets/detection3d/',
# 's3://semantickitti/', # 'data/': 's3://openmmlab/datasets/detection3d/'
# })) # }))
backend_args = None
train_pipeline = [ train_pipeline = [
dict( dict(
...@@ -92,12 +96,13 @@ train_pipeline = [ ...@@ -92,12 +96,13 @@ train_pipeline = [
coord_type='LIDAR', coord_type='LIDAR',
load_dim=4, load_dim=4,
use_dim=4, use_dim=4,
file_client_args=file_client_args), backend_args=backend_args),
dict( dict(
type='LoadAnnotations3D', type='LoadAnnotations3D',
with_seg_3d=True, with_seg_3d=True,
seg_offset=2**16, seg_offset=2**16,
dataset_type='semantickitti'), dataset_type='semantickitti',
backend_args=backend_args),
dict(type='PointSegClassMapping', ), dict(type='PointSegClassMapping', ),
dict( dict(
type='RandomFlip3D', type='RandomFlip3D',
...@@ -118,12 +123,13 @@ test_pipeline = [ ...@@ -118,12 +123,13 @@ test_pipeline = [
coord_type='LIDAR', coord_type='LIDAR',
load_dim=4, load_dim=4,
use_dim=4, use_dim=4,
file_client_args=file_client_args), backend_args=backend_args),
dict( dict(
type='LoadAnnotations3D', type='LoadAnnotations3D',
with_seg_3d=True, with_seg_3d=True,
seg_offset=2**16, seg_offset=2**16,
dataset_type='semantickitti'), dataset_type='semantickitti',
backend_args=backend_args),
dict(type='PointSegClassMapping', ), dict(type='PointSegClassMapping', ),
dict(type='Pack3DDetInputs', keys=['points', 'pts_semantic_mask']) dict(type='Pack3DDetInputs', keys=['points', 'pts_semantic_mask'])
] ]
...@@ -135,12 +141,13 @@ eval_pipeline = [ ...@@ -135,12 +141,13 @@ eval_pipeline = [
coord_type='LIDAR', coord_type='LIDAR',
load_dim=4, load_dim=4,
use_dim=4, use_dim=4,
file_client_args=file_client_args), backend_args=backend_args),
dict( dict(
type='LoadAnnotations3D', type='LoadAnnotations3D',
with_seg_3d=True, with_seg_3d=True,
seg_offset=2**16, seg_offset=2**16,
dataset_type='semantickitti'), dataset_type='semantickitti',
backend_args=backend_args),
dict(type='PointSegClassMapping', ), dict(type='PointSegClassMapping', ),
dict(type='Pack3DDetInputs', keys=['points', 'pts_semantic_mask']) dict(type='Pack3DDetInputs', keys=['points', 'pts_semantic_mask'])
] ]
...@@ -158,7 +165,8 @@ train_dataloader = dict( ...@@ -158,7 +165,8 @@ train_dataloader = dict(
ann_file='train_infos.pkl', ann_file='train_infos.pkl',
pipeline=train_pipeline, pipeline=train_pipeline,
metainfo=metainfo, metainfo=metainfo,
modality=input_modality)), modality=input_modality,
backend_args=backend_args)),
) )
test_dataloader = dict( test_dataloader = dict(
...@@ -176,7 +184,7 @@ test_dataloader = dict( ...@@ -176,7 +184,7 @@ test_dataloader = dict(
metainfo=metainfo, metainfo=metainfo,
modality=input_modality, modality=input_modality,
test_mode=True, test_mode=True,
)), backend_args=backend_args)),
) )
val_dataloader = test_dataloader val_dataloader = test_dataloader
......
...@@ -5,16 +5,20 @@ class_names = ('bed', 'table', 'sofa', 'chair', 'toilet', 'desk', 'dresser', ...@@ -5,16 +5,20 @@ class_names = ('bed', 'table', 'sofa', 'chair', 'toilet', 'desk', 'dresser',
metainfo = dict(classes=class_names) metainfo = dict(classes=class_names)
file_client_args = dict(backend='disk') # Example to use different file client
# Uncomment the following if use ceph or other file clients. # Method 1: simply set the data root and let the file I/O module
# See https://mmcv.readthedocs.io/en/latest/api.html#mmcv.fileio.FileClient # automatically infer from prefix (not support LMDB and Memcache yet)
# for more details.
# file_client_args = dict( # data_root = 's3://openmmlab/datasets/detection3d/sunrgbd/'
# Method 2: Use backend_args, file_client_args in versions before 1.1.0rc4
# backend_args = dict(
# backend='petrel', # backend='petrel',
# path_mapping=dict({ # path_mapping=dict({
# './data/sunrgbd/': # './data/': 's3://openmmlab/datasets/detection3d/',
# 's3://sunrgbd/', # 'data/': 's3://openmmlab/datasets/detection3d/'
# })) # }))
backend_args = None
train_pipeline = [ train_pipeline = [
dict( dict(
...@@ -22,7 +26,8 @@ train_pipeline = [ ...@@ -22,7 +26,8 @@ train_pipeline = [
coord_type='DEPTH', coord_type='DEPTH',
shift_height=True, shift_height=True,
load_dim=6, load_dim=6,
use_dim=[0, 1, 2]), use_dim=[0, 1, 2],
backend_args=backend_args),
dict(type='LoadAnnotations3D'), dict(type='LoadAnnotations3D'),
dict( dict(
type='RandomFlip3D', type='RandomFlip3D',
...@@ -45,7 +50,8 @@ test_pipeline = [ ...@@ -45,7 +50,8 @@ test_pipeline = [
coord_type='DEPTH', coord_type='DEPTH',
shift_height=True, shift_height=True,
load_dim=6, load_dim=6,
use_dim=[0, 1, 2]), use_dim=[0, 1, 2],
backend_args=backend_args),
dict( dict(
type='MultiScaleFlipAug3D', type='MultiScaleFlipAug3D',
img_scale=(1333, 800), img_scale=(1333, 800),
...@@ -83,7 +89,8 @@ train_dataloader = dict( ...@@ -83,7 +89,8 @@ train_dataloader = dict(
metainfo=metainfo, metainfo=metainfo,
# we use box_type_3d='LiDAR' in kitti and nuscenes dataset # we use box_type_3d='LiDAR' in kitti and nuscenes dataset
# and box_type_3d='Depth' in sunrgbd and scannet dataset. # and box_type_3d='Depth' in sunrgbd and scannet dataset.
box_type_3d='Depth'))) box_type_3d='Depth',
backend_args=backend_args)))
val_dataloader = dict( val_dataloader = dict(
batch_size=1, batch_size=1,
...@@ -96,7 +103,8 @@ val_dataloader = dict( ...@@ -96,7 +103,8 @@ val_dataloader = dict(
pipeline=test_pipeline, pipeline=test_pipeline,
metainfo=metainfo, metainfo=metainfo,
test_mode=True, test_mode=True,
box_type_3d='Depth')) box_type_3d='Depth',
backend_args=backend_args))
test_dataloader = dict( test_dataloader = dict(
batch_size=1, batch_size=1,
num_workers=1, num_workers=1,
...@@ -108,7 +116,8 @@ test_dataloader = dict( ...@@ -108,7 +116,8 @@ test_dataloader = dict(
pipeline=test_pipeline, pipeline=test_pipeline,
metainfo=metainfo, metainfo=metainfo,
test_mode=True, test_mode=True,
box_type_3d='Depth')) box_type_3d='Depth',
backend_args=backend_args))
val_evaluator = dict(type='IndoorMetric') val_evaluator = dict(type='IndoorMetric')
test_evaluator = val_evaluator test_evaluator = val_evaluator
......
...@@ -4,16 +4,21 @@ ...@@ -4,16 +4,21 @@
dataset_type = 'WaymoDataset' dataset_type = 'WaymoDataset'
# data_root = 's3://openmmlab/datasets/detection3d/waymo/kitti_format/' # data_root = 's3://openmmlab/datasets/detection3d/waymo/kitti_format/'
data_root = 'data/waymo/kitti_format/' data_root = 'data/waymo/kitti_format/'
file_client_args = dict(backend='disk')
# Uncomment the following if use ceph or other file clients. # Example to use different file client
# See https://mmcv.readthedocs.io/en/latest/api.html#mmcv.fileio.FileClient # Method 1: simply set the data root and let the file I/O module
# for more details. # automatically infer from prefix (not support LMDB and Memcache yet)
# file_client_args = dict(
# data_root = 's3://openmmlab/datasets/detection3d/waymo/kitti_format/'
# Method 2: Use backend_args, file_client_args in versions before 1.1.0rc4
# backend_args = dict(
# backend='petrel', # backend='petrel',
# path_mapping={ # path_mapping=dict({
# './data/waymo': 's3://openmmlab/datasets/detection3d/waymo', # './data/': 's3://openmmlab/datasets/detection3d/',
# 'data/waymo': 's3://openmmlab/datasets/detection3d/waymo' # 'data/': 's3://openmmlab/datasets/detection3d/'
# }) # }))
backend_args = None
class_names = ['Car', 'Pedestrian', 'Cyclist'] class_names = ['Car', 'Pedestrian', 'Cyclist']
metainfo = dict(classes=class_names) metainfo = dict(classes=class_names)
...@@ -33,10 +38,17 @@ db_sampler = dict( ...@@ -33,10 +38,17 @@ db_sampler = dict(
type='LoadPointsFromFile', type='LoadPointsFromFile',
coord_type='LIDAR', coord_type='LIDAR',
load_dim=6, load_dim=6,
use_dim=[0, 1, 2, 3, 4])) use_dim=[0, 1, 2, 3, 4],
backend_args=backend_args),
backend_args=backend_args)
train_pipeline = [ train_pipeline = [
dict(type='LoadPointsFromFile', coord_type='LIDAR', load_dim=6, use_dim=5), dict(
type='LoadPointsFromFile',
coord_type='LIDAR',
load_dim=6,
use_dim=5,
backend_args=backend_args),
dict(type='LoadAnnotations3D', with_bbox_3d=True, with_label_3d=True), dict(type='LoadAnnotations3D', with_bbox_3d=True, with_label_3d=True),
# dict(type='ObjectSample', db_sampler=db_sampler), # dict(type='ObjectSample', db_sampler=db_sampler),
dict( dict(
...@@ -61,7 +73,7 @@ test_pipeline = [ ...@@ -61,7 +73,7 @@ test_pipeline = [
coord_type='LIDAR', coord_type='LIDAR',
load_dim=6, load_dim=6,
use_dim=5, use_dim=5,
file_client_args=file_client_args), backend_args=backend_args),
dict( dict(
type='MultiScaleFlipAug3D', type='MultiScaleFlipAug3D',
img_scale=(1333, 800), img_scale=(1333, 800),
...@@ -82,7 +94,12 @@ test_pipeline = [ ...@@ -82,7 +94,12 @@ test_pipeline = [
# construct a pipeline for data and gt loading in show function # construct a pipeline for data and gt loading in show function
# please keep its loading function consistent with test_pipeline (e.g. client) # please keep its loading function consistent with test_pipeline (e.g. client)
eval_pipeline = [ eval_pipeline = [
dict(type='LoadPointsFromFile', coord_type='LIDAR', load_dim=6, use_dim=5), dict(
type='LoadPointsFromFile',
coord_type='LIDAR',
load_dim=6,
use_dim=5,
backend_args=backend_args),
dict(type='Pack3DDetInputs', keys=['points']), dict(type='Pack3DDetInputs', keys=['points']),
] ]
...@@ -109,7 +126,7 @@ train_dataloader = dict( ...@@ -109,7 +126,7 @@ train_dataloader = dict(
box_type_3d='LiDAR', box_type_3d='LiDAR',
# load one frame every five frames # load one frame every five frames
load_interval=5, load_interval=5,
file_client_args=file_client_args))) backend_args=backend_args)))
val_dataloader = dict( val_dataloader = dict(
batch_size=1, batch_size=1,
num_workers=1, num_workers=1,
...@@ -126,7 +143,7 @@ val_dataloader = dict( ...@@ -126,7 +143,7 @@ val_dataloader = dict(
test_mode=True, test_mode=True,
metainfo=metainfo, metainfo=metainfo,
box_type_3d='LiDAR', box_type_3d='LiDAR',
file_client_args=file_client_args)) backend_args=backend_args))
test_dataloader = dict( test_dataloader = dict(
batch_size=1, batch_size=1,
...@@ -144,14 +161,14 @@ test_dataloader = dict( ...@@ -144,14 +161,14 @@ test_dataloader = dict(
test_mode=True, test_mode=True,
metainfo=metainfo, metainfo=metainfo,
box_type_3d='LiDAR', box_type_3d='LiDAR',
file_client_args=file_client_args)) backend_args=backend_args))
val_evaluator = dict( val_evaluator = dict(
type='WaymoMetric', type='WaymoMetric',
ann_file='./data/waymo/kitti_format/waymo_infos_val.pkl', ann_file='./data/waymo/kitti_format/waymo_infos_val.pkl',
waymo_bin_file='./data/waymo/waymo_format/gt.bin', waymo_bin_file='./data/waymo/waymo_format/gt.bin',
data_root='./data/waymo/waymo_format', data_root='./data/waymo/waymo_format',
file_client_args=file_client_args, backend_args=backend_args,
convert_kitti_format=False) convert_kitti_format=False)
test_evaluator = val_evaluator test_evaluator = val_evaluator
......
...@@ -3,12 +3,21 @@ ...@@ -3,12 +3,21 @@
# We only use one fold for efficient experiments # We only use one fold for efficient experiments
dataset_type = 'WaymoDataset' dataset_type = 'WaymoDataset'
data_root = 'data/waymo/kitti_format/' data_root = 'data/waymo/kitti_format/'
file_client_args = dict(backend='disk')
# Uncomment the following if use ceph or other file clients. # Example to use different file client
# See https://mmcv.readthedocs.io/en/latest/api.html#mmcv.fileio.FileClient # Method 1: simply set the data root and let the file I/O module
# for more details. # automatically infer from prefix (not support LMDB and Memcache yet)
# file_client_args = dict(
# backend='petrel', path_mapping=dict(data='s3://waymo_data/')) # data_root = 's3://openmmlab/datasets/detection3d/waymo/kitti_format/'
# Method 2: Use backend_args, file_client_args in versions before 1.1.0rc4
# backend_args = dict(
# backend='petrel',
# path_mapping=dict({
# './data/': 's3://openmmlab/datasets/detection3d/',
# 'data/': 's3://openmmlab/datasets/detection3d/'
# }))
backend_args = None
class_names = ['Car'] class_names = ['Car']
metainfo = dict(classes=class_names) metainfo = dict(classes=class_names)
...@@ -26,10 +35,17 @@ db_sampler = dict( ...@@ -26,10 +35,17 @@ db_sampler = dict(
type='LoadPointsFromFile', type='LoadPointsFromFile',
coord_type='LIDAR', coord_type='LIDAR',
load_dim=6, load_dim=6,
use_dim=[0, 1, 2, 3, 4])) use_dim=[0, 1, 2, 3, 4],
backend_args=backend_args),
backend_args=backend_args)
train_pipeline = [ train_pipeline = [
dict(type='LoadPointsFromFile', coord_type='LIDAR', load_dim=6, use_dim=5), dict(
type='LoadPointsFromFile',
coord_type='LIDAR',
load_dim=6,
use_dim=5,
backend_args=backend_args),
dict(type='LoadAnnotations3D', with_bbox_3d=True, with_label_3d=True), dict(type='LoadAnnotations3D', with_bbox_3d=True, with_label_3d=True),
dict(type='ObjectSample', db_sampler=db_sampler), dict(type='ObjectSample', db_sampler=db_sampler),
dict( dict(
...@@ -49,7 +65,12 @@ train_pipeline = [ ...@@ -49,7 +65,12 @@ train_pipeline = [
keys=['points', 'gt_bboxes_3d', 'gt_labels_3d']) keys=['points', 'gt_bboxes_3d', 'gt_labels_3d'])
] ]
test_pipeline = [ test_pipeline = [
dict(type='LoadPointsFromFile', coord_type='LIDAR', load_dim=6, use_dim=5), dict(
type='LoadPointsFromFile',
coord_type='LIDAR',
load_dim=6,
use_dim=5,
backend_args=backend_args),
dict( dict(
type='MultiScaleFlipAug3D', type='MultiScaleFlipAug3D',
img_scale=(1333, 800), img_scale=(1333, 800),
...@@ -70,7 +91,12 @@ test_pipeline = [ ...@@ -70,7 +91,12 @@ test_pipeline = [
# construct a pipeline for data and gt loading in show function # construct a pipeline for data and gt loading in show function
# please keep its loading function consistent with test_pipeline (e.g. client) # please keep its loading function consistent with test_pipeline (e.g. client)
eval_pipeline = [ eval_pipeline = [
dict(type='LoadPointsFromFile', coord_type='LIDAR', load_dim=6, use_dim=5), dict(
type='LoadPointsFromFile',
coord_type='LIDAR',
load_dim=6,
use_dim=5,
backend_args=backend_args),
dict(type='Pack3DDetInputs', keys=['points']), dict(type='Pack3DDetInputs', keys=['points']),
] ]
...@@ -96,7 +122,8 @@ train_dataloader = dict( ...@@ -96,7 +122,8 @@ train_dataloader = dict(
# and box_type_3d='Depth' in sunrgbd and scannet dataset. # and box_type_3d='Depth' in sunrgbd and scannet dataset.
box_type_3d='LiDAR', box_type_3d='LiDAR',
# load one frame every five frames # load one frame every five frames
load_interval=5))) load_interval=5,
backend_args=backend_args)))
val_dataloader = dict( val_dataloader = dict(
batch_size=1, batch_size=1,
num_workers=1, num_workers=1,
...@@ -112,7 +139,8 @@ val_dataloader = dict( ...@@ -112,7 +139,8 @@ val_dataloader = dict(
modality=input_modality, modality=input_modality,
test_mode=True, test_mode=True,
metainfo=metainfo, metainfo=metainfo,
box_type_3d='LiDAR')) box_type_3d='LiDAR',
backend_args=backend_args))
test_dataloader = dict( test_dataloader = dict(
batch_size=1, batch_size=1,
...@@ -129,14 +157,16 @@ test_dataloader = dict( ...@@ -129,14 +157,16 @@ test_dataloader = dict(
modality=input_modality, modality=input_modality,
test_mode=True, test_mode=True,
metainfo=metainfo, metainfo=metainfo,
box_type_3d='LiDAR')) box_type_3d='LiDAR',
backend_args=backend_args))
val_evaluator = dict( val_evaluator = dict(
type='WaymoMetric', type='WaymoMetric',
ann_file='./data/waymo/kitti_format/waymo_infos_val.pkl', ann_file='./data/waymo/kitti_format/waymo_infos_val.pkl',
waymo_bin_file='./data/waymo/waymo_format/gt.bin', waymo_bin_file='./data/waymo/waymo_format/gt.bin',
data_root='./data/waymo/waymo_format', data_root='./data/waymo/waymo_format',
convert_kitti_format=False) convert_kitti_format=False,
backend_args=backend_args)
test_evaluator = val_evaluator test_evaluator = val_evaluator
vis_backends = [dict(type='LocalVisBackend')] vis_backends = [dict(type='LocalVisBackend')]
......
...@@ -5,12 +5,24 @@ dataset_type = 'WaymoDataset' ...@@ -5,12 +5,24 @@ dataset_type = 'WaymoDataset'
data_root = 'data/waymo/kitti_format/' data_root = 'data/waymo/kitti_format/'
class_names = ['Car', 'Pedestrian', 'Cyclist'] class_names = ['Car', 'Pedestrian', 'Cyclist']
input_modality = dict(use_lidar=False, use_camera=True) input_modality = dict(use_lidar=False, use_camera=True)
file_client_args = dict(backend='disk')
# Uncomment the following if use ceph or other file clients. # Example to use different file client
# See https://mmcv.readthedocs.io/en/latest/api.html#mmcv.fileio.FileClient # Method 1: simply set the data root and let the file I/O module
# for more details. # automatically infer from prefix (not support LMDB and Memcache yet)
# data_root = 's3://openmmlab/datasets/detection3d/waymo/kitti_format/'
# Method 2: Use backend_args, file_client_args in versions before 1.1.0rc4
# backend_args = dict(
# backend='petrel',
# path_mapping=dict({
# './data/': 's3://openmmlab/datasets/detection3d/',
# 'data/': 's3://openmmlab/datasets/detection3d/'
# }))
backend_args = None
train_pipeline = [ train_pipeline = [
dict(type='LoadImageFromFileMono3D'), dict(type='LoadImageFromFileMono3D', backend_args=backend_args),
dict( dict(
type='LoadAnnotations3D', type='LoadAnnotations3D',
with_bbox=True, with_bbox=True,
...@@ -36,7 +48,7 @@ train_pipeline = [ ...@@ -36,7 +48,7 @@ train_pipeline = [
] ]
test_pipeline = [ test_pipeline = [
dict(type='LoadImageFromFileMono3D'), dict(type='LoadImageFromFileMono3D', backend_args=backend_args),
dict( dict(
type='RandomResize3D', type='RandomResize3D',
scale=(1248, 832), scale=(1248, 832),
...@@ -47,7 +59,7 @@ test_pipeline = [ ...@@ -47,7 +59,7 @@ test_pipeline = [
# construct a pipeline for data and gt loading in show function # construct a pipeline for data and gt loading in show function
# please keep its loading function consistent with test_pipeline (e.g. client) # please keep its loading function consistent with test_pipeline (e.g. client)
eval_pipeline = [ eval_pipeline = [
dict(type='LoadImageFromFileMono3D'), dict(type='LoadImageFromFileMono3D', backend_args=backend_args),
dict( dict(
type='RandomResize3D', type='RandomResize3D',
scale=(1248, 832), scale=(1248, 832),
...@@ -83,7 +95,8 @@ train_dataloader = dict( ...@@ -83,7 +95,8 @@ train_dataloader = dict(
box_type_3d='Camera', box_type_3d='Camera',
load_type='fov_image_based', load_type='fov_image_based',
# load one frame every three frames # load one frame every three frames
load_interval=5)) load_interval=5,
backend_args=backend_args))
val_dataloader = dict( val_dataloader = dict(
batch_size=1, batch_size=1,
...@@ -110,7 +123,7 @@ val_dataloader = dict( ...@@ -110,7 +123,7 @@ val_dataloader = dict(
# and box_type_3d='Depth' in sunrgbd and scannet dataset. # and box_type_3d='Depth' in sunrgbd and scannet dataset.
box_type_3d='Camera', box_type_3d='Camera',
load_type='fov_image_based', load_type='fov_image_based',
)) backend_args=backend_args))
test_dataloader = dict( test_dataloader = dict(
batch_size=1, batch_size=1,
...@@ -137,7 +150,7 @@ test_dataloader = dict( ...@@ -137,7 +150,7 @@ test_dataloader = dict(
# and box_type_3d='Depth' in sunrgbd and scannet dataset. # and box_type_3d='Depth' in sunrgbd and scannet dataset.
box_type_3d='Camera', box_type_3d='Camera',
load_type='fov_image_based', load_type='fov_image_based',
)) backend_args=backend_args))
val_evaluator = dict( val_evaluator = dict(
type='WaymoMetric', type='WaymoMetric',
...@@ -146,5 +159,5 @@ val_evaluator = dict( ...@@ -146,5 +159,5 @@ val_evaluator = dict(
data_root='./data/waymo/waymo_format', data_root='./data/waymo/waymo_format',
metric='LET_mAP', metric='LET_mAP',
load_type='fov_image_based', load_type='fov_image_based',
) backend_args=backend_args)
test_evaluator = val_evaluator test_evaluator = val_evaluator
...@@ -5,12 +5,24 @@ dataset_type = 'WaymoDataset' ...@@ -5,12 +5,24 @@ dataset_type = 'WaymoDataset'
data_root = 'data/waymo/kitti_format/' data_root = 'data/waymo/kitti_format/'
class_names = ['Car', 'Pedestrian', 'Cyclist'] class_names = ['Car', 'Pedestrian', 'Cyclist']
input_modality = dict(use_lidar=False, use_camera=True) input_modality = dict(use_lidar=False, use_camera=True)
file_client_args = dict(backend='disk')
# Uncomment the following if use ceph or other file clients. # Example to use different file client
# See https://mmcv.readthedocs.io/en/latest/api.html#mmcv.fileio.FileClient # Method 1: simply set the data root and let the file I/O module
# for more details. # automatically infer from prefix (not support LMDB and Memcache yet)
# data_root = 's3://openmmlab/datasets/detection3d/waymo/kitti_format/'
# Method 2: Use backend_args, file_client_args in versions before 1.1.0rc4
# backend_args = dict(
# backend='petrel',
# path_mapping=dict({
# './data/': 's3://openmmlab/datasets/detection3d/',
# 'data/': 's3://openmmlab/datasets/detection3d/'
# }))
backend_args = None
train_pipeline = [ train_pipeline = [
dict(type='LoadImageFromFileMono3D'), dict(type='LoadImageFromFileMono3D', backend_args=backend_args),
dict( dict(
type='LoadAnnotations3D', type='LoadAnnotations3D',
with_bbox=True, with_bbox=True,
...@@ -36,7 +48,7 @@ train_pipeline = [ ...@@ -36,7 +48,7 @@ train_pipeline = [
] ]
test_pipeline = [ test_pipeline = [
dict(type='LoadImageFromFileMono3D'), dict(type='LoadImageFromFileMono3D', backend_args=backend_args),
dict( dict(
type='RandomResize3D', type='RandomResize3D',
scale=(1248, 832), scale=(1248, 832),
...@@ -47,7 +59,7 @@ test_pipeline = [ ...@@ -47,7 +59,7 @@ test_pipeline = [
# construct a pipeline for data and gt loading in show function # construct a pipeline for data and gt loading in show function
# please keep its loading function consistent with test_pipeline (e.g. client) # please keep its loading function consistent with test_pipeline (e.g. client)
eval_pipeline = [ eval_pipeline = [
dict(type='LoadImageFromFileMono3D'), dict(type='LoadImageFromFileMono3D', backend_args=backend_args),
dict( dict(
type='RandomResize3D', type='RandomResize3D',
scale=(1248, 832), scale=(1248, 832),
...@@ -83,7 +95,8 @@ train_dataloader = dict( ...@@ -83,7 +95,8 @@ train_dataloader = dict(
box_type_3d='Camera', box_type_3d='Camera',
load_type='mv_image_based', load_type='mv_image_based',
# load one frame every three frames # load one frame every three frames
load_interval=5)) load_interval=5,
backend_args=backend_args))
val_dataloader = dict( val_dataloader = dict(
batch_size=1, batch_size=1,
...@@ -110,7 +123,7 @@ val_dataloader = dict( ...@@ -110,7 +123,7 @@ val_dataloader = dict(
# and box_type_3d='Depth' in sunrgbd and scannet dataset. # and box_type_3d='Depth' in sunrgbd and scannet dataset.
box_type_3d='Camera', box_type_3d='Camera',
load_type='mv_image_based', load_type='mv_image_based',
)) backend_args=backend_args))
test_dataloader = dict( test_dataloader = dict(
batch_size=1, batch_size=1,
...@@ -137,7 +150,7 @@ test_dataloader = dict( ...@@ -137,7 +150,7 @@ test_dataloader = dict(
# and box_type_3d='Depth' in sunrgbd and scannet dataset. # and box_type_3d='Depth' in sunrgbd and scannet dataset.
box_type_3d='Camera', box_type_3d='Camera',
load_type='mv_image_based', load_type='mv_image_based',
)) backend_args=backend_args))
val_evaluator = dict( val_evaluator = dict(
type='WaymoMetric', type='WaymoMetric',
...@@ -146,5 +159,5 @@ val_evaluator = dict( ...@@ -146,5 +159,5 @@ val_evaluator = dict(
data_root='./data/waymo/waymo_format', data_root='./data/waymo/waymo_format',
metric='LET_mAP', metric='LET_mAP',
load_type='mv_image_based', load_type='mv_image_based',
) backend_args=backend_args)
test_evaluator = val_evaluator test_evaluator = val_evaluator
...@@ -3,10 +3,21 @@ ...@@ -3,10 +3,21 @@
# We only use one fold for efficient experiments # We only use one fold for efficient experiments
dataset_type = 'WaymoDataset' dataset_type = 'WaymoDataset'
data_root = 'data/waymo/kitti_format/' data_root = 'data/waymo/kitti_format/'
file_client_args = dict(backend='disk')
# Uncomment the following if use ceph or other file clients. # Example to use different file client
# See https://mmcv.readthedocs.io/en/latest/api.html#mmcv.fileio.FileClient # Method 1: simply set the data root and let the file I/O module
# for more details. # automatically infer from prefix (not support LMDB and Memcache yet)
# data_root = 's3://openmmlab/datasets/detection3d/waymo/kitti_format/'
# Method 2: Use backend_args, file_client_args in versions before 1.1.0rc4
# backend_args = dict(
# backend='petrel',
# path_mapping=dict({
# './data/': 's3://openmmlab/datasets/detection3d/',
# 'data/': 's3://openmmlab/datasets/detection3d/'
# }))
backend_args = None
class_names = ['Car', 'Pedestrian', 'Cyclist'] class_names = ['Car', 'Pedestrian', 'Cyclist']
input_modality = dict(use_lidar=False, use_camera=True) input_modality = dict(use_lidar=False, use_camera=True)
...@@ -24,7 +35,10 @@ train_transforms = [ ...@@ -24,7 +35,10 @@ train_transforms = [
] ]
train_pipeline = [ train_pipeline = [
dict(type='LoadMultiViewImageFromFiles', to_float32=True), dict(
type='LoadMultiViewImageFromFiles',
to_float32=True,
backend_args=backend_args),
dict( dict(
type='LoadAnnotations3D', type='LoadAnnotations3D',
with_bbox=True, with_bbox=True,
...@@ -51,14 +65,20 @@ test_transforms = [ ...@@ -51,14 +65,20 @@ test_transforms = [
keep_ratio=True) keep_ratio=True)
] ]
test_pipeline = [ test_pipeline = [
dict(type='LoadMultiViewImageFromFiles', to_float32=True), dict(
type='LoadMultiViewImageFromFiles',
to_float32=True,
backend_args=backend_args),
dict(type='MultiViewWrapper', transforms=test_transforms), dict(type='MultiViewWrapper', transforms=test_transforms),
dict(type='Pack3DDetInputs', keys=['img']) dict(type='Pack3DDetInputs', keys=['img'])
] ]
# construct a pipeline for data and gt loading in show function # construct a pipeline for data and gt loading in show function
# please keep its loading function consistent with test_pipeline (e.g. client) # please keep its loading function consistent with test_pipeline (e.g. client)
eval_pipeline = [ eval_pipeline = [
dict(type='LoadMultiViewImageFromFiles', to_float32=True), dict(
type='LoadMultiViewImageFromFiles',
to_float32=True,
backend_args=backend_args),
dict(type='MultiViewWrapper', transforms=test_transforms), dict(type='MultiViewWrapper', transforms=test_transforms),
dict(type='Pack3DDetInputs', keys=['img']) dict(type='Pack3DDetInputs', keys=['img'])
] ]
...@@ -86,7 +106,7 @@ train_dataloader = dict( ...@@ -86,7 +106,7 @@ train_dataloader = dict(
metainfo=metainfo, metainfo=metainfo,
box_type_3d='Lidar', box_type_3d='Lidar',
load_interval=5, load_interval=5,
)) backend_args=backend_args))
val_dataloader = dict( val_dataloader = dict(
batch_size=1, batch_size=1,
...@@ -110,7 +130,7 @@ val_dataloader = dict( ...@@ -110,7 +130,7 @@ val_dataloader = dict(
test_mode=True, test_mode=True,
metainfo=metainfo, metainfo=metainfo,
box_type_3d='Lidar', box_type_3d='Lidar',
)) backend_args=backend_args))
test_dataloader = dict( test_dataloader = dict(
batch_size=1, batch_size=1,
...@@ -134,12 +154,13 @@ test_dataloader = dict( ...@@ -134,12 +154,13 @@ test_dataloader = dict(
test_mode=True, test_mode=True,
metainfo=metainfo, metainfo=metainfo,
box_type_3d='Lidar', box_type_3d='Lidar',
)) backend_args=backend_args))
val_evaluator = dict( val_evaluator = dict(
type='WaymoMetric', type='WaymoMetric',
ann_file='./data/waymo/kitti_format/waymo_infos_val.pkl', ann_file='./data/waymo/kitti_format/waymo_infos_val.pkl',
waymo_bin_file='./data/waymo/waymo_format/cam_gt.bin', waymo_bin_file='./data/waymo/waymo_format/cam_gt.bin',
data_root='./data/waymo/waymo_format', data_root='./data/waymo/waymo_format',
metric='LET_mAP') metric='LET_mAP',
backend_args=backend_args)
test_evaluator = val_evaluator test_evaluator = val_evaluator
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment