Unverified Commit 583c4acc authored by Qing Lian's avatar Qing Lian Committed by GitHub
Browse files

Update waymo dataset, evaluation metrics and related configs for 2.0 (#1663)



* update waymo dataset

* [Fix] Fix all unittests and refactor tests directory and add circle ci in `test-1.x` (#1654)

* add circle ci

* delete github ci

* fix ci

* fix ut

* fix markdown version

* rm

* fix part of uts

* fix comments

* change foler

* refactor test directory

* fix kitti metric ut

* fix all ut
Co-authored-by: default avatarVVsssssk <shenkun@pjlab.org.cn>

* add waymo dataset and evaluation metrics

* convert second configs for v2.0

* [Refactor] Unify ceph config (#1677)

* refactor ceph in config

* support metric load ann file from ceph

* add doc string and remove useless code

* [Fix]Fix create data (#1659)

* add circle ci

* delete github ci

* fix ci

* fix ut

* fix markdown version

* rm

* fix part of uts

* fix comments

* change foler

* refactor test directory

* fix kitti metric ut

* fix all ut

* fix creat data
Co-authored-by: default avatarChaimZhu <zhuchenming@pjlab.org.cn>

* [Fix] Fix seg mapping (#1681)

* [Doc]: fix markdown version (#1653)

* [CI] Add circle ci (#1647)

* add circle ci

* delete github ci

* fix ci

* fix ut

* fix markdown version

* rm

* fix seg mapping for scannet

* fix requiremetn

* fix all seg dataet

* resolve commnets
Co-authored-by: default avatarVVsssssk <88368822+VVsssssk@users.noreply.github.com>

* [Fix] Fix SSN configs (#1686)

* modify doc string and evaluation file location

* add doc string

* remove path mapping in flieclient args
Co-authored-by: default avatarChaimZhu <zhuchenming@pjlab.org.cn>
Co-authored-by: default avatarVVsssssk <shenkun@pjlab.org.cn>
Co-authored-by: default avatarVVsssssk <88368822+VVsssssk@users.noreply.github.com>
Co-authored-by: default avatarShilong Zhang <61961338+jshilong@users.noreply.github.com>
parent a8f3ec5f
...@@ -15,7 +15,9 @@ db_sampler = dict( ...@@ -15,7 +15,9 @@ db_sampler = dict(
rate=1.0, rate=1.0,
prepare=dict(filter_by_difficulty=[-1], filter_by_min_points=dict(Car=5)), prepare=dict(filter_by_difficulty=[-1], filter_by_min_points=dict(Car=5)),
classes=class_names, classes=class_names,
sample_groups=dict(Car=15)) sample_groups=dict(Car=15),
points_loader=dict(
type='LoadPointsFromFile', coord_type='LIDAR', load_dim=4, use_dim=4))
file_client_args = dict(backend='disk') file_client_args = dict(backend='disk')
# Uncomment the following if use ceph or other file clients. # Uncomment the following if use ceph or other file clients.
...@@ -25,17 +27,8 @@ file_client_args = dict(backend='disk') ...@@ -25,17 +27,8 @@ file_client_args = dict(backend='disk')
# backend='petrel', path_mapping=dict(data='s3://kitti_data/')) # backend='petrel', path_mapping=dict(data='s3://kitti_data/'))
train_pipeline = [ train_pipeline = [
dict( dict(type='LoadPointsFromFile', coord_type='LIDAR', load_dim=4, use_dim=4),
type='LoadPointsFromFile', dict(type='LoadAnnotations3D', with_bbox_3d=True, with_label_3d=True),
coord_type='LIDAR',
load_dim=4,
use_dim=4,
file_client_args=file_client_args),
dict(
type='LoadAnnotations3D',
with_bbox_3d=True,
with_label_3d=True,
file_client_args=file_client_args),
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),
dict(type='ObjectSample', db_sampler=db_sampler), dict(type='ObjectSample', db_sampler=db_sampler),
...@@ -59,12 +52,7 @@ train_pipeline = [ ...@@ -59,12 +52,7 @@ train_pipeline = [
] ]
test_pipeline = [ test_pipeline = [
dict( dict(type='LoadPointsFromFile', coord_type='LIDAR', load_dim=4, use_dim=4),
type='LoadPointsFromFile',
coord_type='LIDAR',
load_dim=4,
use_dim=4,
file_client_args=file_client_args),
dict( dict(
type='MultiScaleFlipAug3D', type='MultiScaleFlipAug3D',
img_scale=(1333, 800), img_scale=(1333, 800),
......
...@@ -5,6 +5,7 @@ class_names = ['Pedestrian', 'Cyclist', 'Car'] ...@@ -5,6 +5,7 @@ class_names = ['Pedestrian', 'Cyclist', 'Car']
point_cloud_range = [0, -40, -3, 70.4, 40, 1] 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)
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',
...@@ -13,25 +14,13 @@ db_sampler = dict( ...@@ -13,25 +14,13 @@ db_sampler = dict(
filter_by_difficulty=[-1], filter_by_difficulty=[-1],
filter_by_min_points=dict(Car=5, Pedestrian=10, Cyclist=10)), filter_by_min_points=dict(Car=5, Pedestrian=10, Cyclist=10)),
classes=class_names, classes=class_names,
sample_groups=dict(Car=12, Pedestrian=6, Cyclist=6)) sample_groups=dict(Car=12, Pedestrian=6, Cyclist=6),
file_client_args = dict(backend='disk') points_loader=dict(
# Uncomment the following if use ceph or other file clients. type='LoadPointsFromFile', coord_type='LIDAR', load_dim=4, use_dim=4))
# See https://mmcv.readthedocs.io/en/latest/api.html#mmcv.fileio.FileClient
# for more details.
# file_client_args = dict(
# backend='petrel', path_mapping=dict(data='s3://kitti_data/'))
train_pipeline = [ train_pipeline = [
dict( dict(type='LoadPointsFromFile', coord_type='LIDAR', load_dim=4, use_dim=4),
type='LoadPointsFromFile', dict(type='LoadAnnotations3D', with_bbox_3d=True, with_label_3d=True),
coord_type='LIDAR',
load_dim=4,
use_dim=4,
file_client_args=file_client_args),
dict(
type='LoadAnnotations3D',
with_bbox_3d=True,
with_label_3d=True,
file_client_args=file_client_args),
dict(type='ObjectSample', db_sampler=db_sampler), dict(type='ObjectSample', db_sampler=db_sampler),
dict( dict(
type='ObjectNoise', type='ObjectNoise',
...@@ -52,12 +41,7 @@ train_pipeline = [ ...@@ -52,12 +41,7 @@ train_pipeline = [
keys=['points', 'gt_bboxes_3d', 'gt_labels_3d']) keys=['points', 'gt_bboxes_3d', 'gt_labels_3d'])
] ]
test_pipeline = [ test_pipeline = [
dict( dict(type='LoadPointsFromFile', coord_type='LIDAR', load_dim=4, use_dim=4),
type='LoadPointsFromFile',
coord_type='LIDAR',
load_dim=4,
use_dim=4,
file_client_args=file_client_args),
dict( dict(
type='MultiScaleFlipAug3D', type='MultiScaleFlipAug3D',
img_scale=(1333, 800), img_scale=(1333, 800),
...@@ -78,12 +62,7 @@ test_pipeline = [ ...@@ -78,12 +62,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( dict(type='LoadPointsFromFile', coord_type='LIDAR', load_dim=4, use_dim=4),
type='LoadPointsFromFile',
coord_type='LIDAR',
load_dim=4,
use_dim=4,
file_client_args=file_client_args),
dict(type='Pack3DDetInputs', keys=['points']), dict(type='Pack3DDetInputs', keys=['points']),
] ]
train_dataloader = dict( train_dataloader = dict(
......
...@@ -5,31 +5,20 @@ class_names = ['Car'] ...@@ -5,31 +5,20 @@ class_names = ['Car']
point_cloud_range = [0, -40, -3, 70.4, 40, 1] 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)
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',
rate=1.0, rate=1.0,
prepare=dict(filter_by_difficulty=[-1], filter_by_min_points=dict(Car=5)), prepare=dict(filter_by_difficulty=[-1], filter_by_min_points=dict(Car=5)),
classes=class_names, classes=class_names,
sample_groups=dict(Car=15)) sample_groups=dict(Car=15),
file_client_args = dict(backend='disk') points_loader=dict(
# Uncomment the following if use ceph or other file clients. type='LoadPointsFromFile', coord_type='LIDAR', load_dim=4, use_dim=4))
# See https://mmcv.readthedocs.io/en/latest/api.html#mmcv.fileio.FileClient
# for more details.
# file_client_args = dict(
# backend='petrel', path_mapping=dict(data='s3://kitti_data/'))
train_pipeline = [ train_pipeline = [
dict( dict(type='LoadPointsFromFile', coord_type='LIDAR', load_dim=4, use_dim=4),
type='LoadPointsFromFile', dict(type='LoadAnnotations3D', with_bbox_3d=True, with_label_3d=True),
coord_type='LIDAR',
load_dim=4,
use_dim=4,
file_client_args=file_client_args),
dict(
type='LoadAnnotations3D',
with_bbox_3d=True,
with_label_3d=True,
file_client_args=file_client_args),
dict(type='ObjectSample', db_sampler=db_sampler), dict(type='ObjectSample', db_sampler=db_sampler),
dict( dict(
type='ObjectNoise', type='ObjectNoise',
...@@ -50,12 +39,7 @@ train_pipeline = [ ...@@ -50,12 +39,7 @@ train_pipeline = [
keys=['points', 'gt_bboxes_3d', 'gt_labels_3d']) keys=['points', 'gt_bboxes_3d', 'gt_labels_3d'])
] ]
test_pipeline = [ test_pipeline = [
dict( dict(type='LoadPointsFromFile', coord_type='LIDAR', load_dim=4, use_dim=4),
type='LoadPointsFromFile',
coord_type='LIDAR',
load_dim=4,
use_dim=4,
file_client_args=file_client_args),
dict( dict(
type='MultiScaleFlipAug3D', type='MultiScaleFlipAug3D',
img_scale=(1333, 800), img_scale=(1333, 800),
...@@ -76,12 +60,7 @@ test_pipeline = [ ...@@ -76,12 +60,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( dict(type='LoadPointsFromFile', coord_type='LIDAR', load_dim=4, use_dim=4),
type='LoadPointsFromFile',
coord_type='LIDAR',
load_dim=4,
use_dim=4,
file_client_args=file_client_args),
dict(type='Pack3DDetInputs', keys=['points']) dict(type='Pack3DDetInputs', keys=['points'])
] ]
train_dataloader = dict( train_dataloader = dict(
......
...@@ -4,21 +4,15 @@ class_names = ['Pedestrian', 'Cyclist', 'Car'] ...@@ -4,21 +4,15 @@ 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') file_client_args = dict(backend='disk')
# Uncomment the following if use ceph or other file clients. # Uncomment the following if use ceph or other file clients.
# See https://mmcv.readthedocs.io/en/latest/api.html#mmcv.fileio.FileClient # See https://mmcv.readthedocs.io/en/latest/api.html#mmcv.fileio.FileClient
# for more details. # for more details.
file_client_args = dict( # file_client_args = dict(
backend='petrel', # backend='petrel', path_mapping=dict(data='s3://kitti_data/'))
path_mapping=dict({
'./data/kitti/':
's3://openmmlab/datasets/detection3d/kitti/',
'data/kitti/':
's3://openmmlab/datasets/detection3d/kitti/'
}))
train_pipeline = [ train_pipeline = [
dict(type='LoadImageFromFileMono3D', file_client_args=file_client_args), dict(type='LoadImageFromFileMono3D'),
dict( dict(
type='LoadAnnotations3D', type='LoadAnnotations3D',
with_bbox=True, with_bbox=True,
...@@ -37,7 +31,7 @@ train_pipeline = [ ...@@ -37,7 +31,7 @@ train_pipeline = [
]), ]),
] ]
test_pipeline = [ test_pipeline = [
dict(type='LoadImageFromFileMono3D', file_client_args=file_client_args), dict(type='LoadImageFromFileMono3D'),
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'])
] ]
......
...@@ -12,6 +12,7 @@ data_root = 'data/lyft/' ...@@ -12,6 +12,7 @@ data_root = 'data/lyft/'
# format which requires the information in input_modality. # format which requires the information in input_modality.
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='') data_prefix = dict(pts='samples/LIDAR_TOP', img='')
file_client_args = dict(backend='disk') file_client_args = dict(backend='disk')
# Uncomment the following if use ceph or other file clients. # Uncomment the following if use ceph or other file clients.
# See https://mmcv.readthedocs.io/en/latest/api.html#mmcv.fileio.FileClient # See https://mmcv.readthedocs.io/en/latest/api.html#mmcv.fileio.FileClient
...@@ -22,17 +23,10 @@ file_client_args = dict(backend='disk') ...@@ -22,17 +23,10 @@ file_client_args = dict(backend='disk')
# './data/lyft/': 's3://lyft/lyft/', # './data/lyft/': 's3://lyft/lyft/',
# 'data/lyft/': 's3://lyft/lyft/' # 'data/lyft/': 's3://lyft/lyft/'
# })) # }))
train_pipeline = [ train_pipeline = [
dict( dict(type='LoadPointsFromFile', coord_type='LIDAR', load_dim=5, use_dim=5),
type='LoadPointsFromFile', dict(type='LoadPointsFromMultiSweeps', sweeps_num=10),
coord_type='LIDAR',
load_dim=5,
use_dim=5,
file_client_args=file_client_args),
dict(
type='LoadPointsFromMultiSweeps',
sweeps_num=10,
file_client_args=file_client_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',
...@@ -48,16 +42,8 @@ train_pipeline = [ ...@@ -48,16 +42,8 @@ train_pipeline = [
keys=['points', 'gt_bboxes_3d', 'gt_labels_3d']) keys=['points', 'gt_bboxes_3d', 'gt_labels_3d'])
] ]
test_pipeline = [ test_pipeline = [
dict( dict(type='LoadPointsFromFile', coord_type='LIDAR', load_dim=5, use_dim=5),
type='LoadPointsFromFile', dict(type='LoadPointsFromMultiSweeps', sweeps_num=10),
coord_type='LIDAR',
load_dim=5,
use_dim=5,
file_client_args=file_client_args),
dict(
type='LoadPointsFromMultiSweeps',
sweeps_num=10,
file_client_args=file_client_args),
dict( dict(
type='MultiScaleFlipAug3D', type='MultiScaleFlipAug3D',
img_scale=(1333, 800), img_scale=(1333, 800),
...@@ -78,16 +64,8 @@ test_pipeline = [ ...@@ -78,16 +64,8 @@ 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( dict(type='LoadPointsFromFile', coord_type='LIDAR', load_dim=5, use_dim=5),
type='LoadPointsFromFile', dict(type='LoadPointsFromMultiSweeps', sweeps_num=10),
coord_type='LIDAR',
load_dim=5,
use_dim=5,
file_client_args=file_client_args),
dict(
type='LoadPointsFromMultiSweeps',
sweeps_num=10,
file_client_args=file_client_args),
dict(type='Pack3DDetInputs', keys=['points']) dict(type='Pack3DDetInputs', keys=['points'])
] ]
train_dataloader = dict( train_dataloader = dict(
......
...@@ -6,6 +6,14 @@ class_names = [ ...@@ -6,6 +6,14 @@ class_names = [
] ]
img_norm_cfg = dict( img_norm_cfg = dict(
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True) mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
file_client_args = dict(backend='disk')
# Uncomment the following if use ceph or other file clients.
# See https://mmcv.readthedocs.io/en/latest/api.html#mmcv.fileio.FileClient
# for more details.
# file_client_args = dict(
# backend='petrel', path_mapping=dict(data='s3://nuimages'))
train_pipeline = [ train_pipeline = [
dict(type='LoadImageFromFile'), dict(type='LoadImageFromFile'),
dict(type='LoadAnnotations', with_bbox=True, with_mask=True), dict(type='LoadAnnotations', with_bbox=True, with_mask=True),
......
...@@ -12,8 +12,9 @@ data_root = 'data/nuscenes/' ...@@ -12,8 +12,9 @@ data_root = 'data/nuscenes/'
# Input modality for nuScenes dataset, this is consistent with the submission # Input modality for nuScenes dataset, this is consistent with the submission
# format which requires the information in input_modality. # format which requires the information in input_modality.
input_modality = dict(use_lidar=True, use_camera=False) input_modality = dict(use_lidar=True, use_camera=False)
file_client_args = dict(backend='disk')
data_prefix = dict(pts='samples/LIDAR_TOP', img='') data_prefix = dict(pts='samples/LIDAR_TOP', img='')
file_client_args = dict(backend='disk')
# Uncomment the following if use ceph or other file clients. # Uncomment the following if use ceph or other file clients.
# See https://mmcv.readthedocs.io/en/latest/api.html#mmcv.fileio.FileClient # See https://mmcv.readthedocs.io/en/latest/api.html#mmcv.fileio.FileClient
# for more details. # for more details.
...@@ -23,17 +24,10 @@ data_prefix = dict(pts='samples/LIDAR_TOP', img='') ...@@ -23,17 +24,10 @@ data_prefix = dict(pts='samples/LIDAR_TOP', img='')
# './data/nuscenes/': 's3://nuscenes/nuscenes/', # './data/nuscenes/': 's3://nuscenes/nuscenes/',
# 'data/nuscenes/': 's3://nuscenes/nuscenes/' # 'data/nuscenes/': 's3://nuscenes/nuscenes/'
# })) # }))
train_pipeline = [ train_pipeline = [
dict( dict(type='LoadPointsFromFile', coord_type='LIDAR', load_dim=5, use_dim=5),
type='LoadPointsFromFile', dict(type='LoadPointsFromMultiSweeps', sweeps_num=10),
coord_type='LIDAR',
load_dim=5,
use_dim=5,
file_client_args=file_client_args),
dict(
type='LoadPointsFromMultiSweeps',
sweeps_num=10,
file_client_args=file_client_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',
...@@ -50,17 +44,8 @@ train_pipeline = [ ...@@ -50,17 +44,8 @@ train_pipeline = [
keys=['points', 'gt_bboxes_3d', 'gt_labels_3d']) keys=['points', 'gt_bboxes_3d', 'gt_labels_3d'])
] ]
test_pipeline = [ test_pipeline = [
dict( dict(type='LoadPointsFromFile', coord_type='LIDAR', load_dim=5, use_dim=5),
type='LoadPointsFromFile', dict(type='LoadPointsFromMultiSweeps', sweeps_num=10, test_mode=True),
coord_type='LIDAR',
load_dim=5,
use_dim=5,
file_client_args=file_client_args),
dict(
type='LoadPointsFromMultiSweeps',
sweeps_num=10,
test_mode=True,
file_client_args=file_client_args),
dict( dict(
type='MultiScaleFlipAug3D', type='MultiScaleFlipAug3D',
img_scale=(1333, 800), img_scale=(1333, 800),
...@@ -81,17 +66,8 @@ test_pipeline = [ ...@@ -81,17 +66,8 @@ 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( dict(type='LoadPointsFromFile', coord_type='LIDAR', load_dim=5, use_dim=5),
type='LoadPointsFromFile', dict(type='LoadPointsFromMultiSweeps', sweeps_num=10, test_mode=True),
coord_type='LIDAR',
load_dim=5,
use_dim=5,
file_client_args=file_client_args),
dict(
type='LoadPointsFromMultiSweeps',
sweeps_num=10,
test_mode=True,
file_client_args=file_client_args),
dict(type='Pack3DDetInputs', keys=['points']) dict(type='Pack3DDetInputs', keys=['points'])
] ]
train_dataloader = dict( train_dataloader = dict(
......
...@@ -9,21 +9,21 @@ metainfo = dict(CLASSES=class_names) ...@@ -9,21 +9,21 @@ 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') file_client_args = dict(backend='disk')
# Uncomment the following if use ceph or other file clients. # Uncomment the following if use ceph or other file clients.
# See https://mmcv.readthedocs.io/en/latest/api.html#mmcv.fileio.FileClient # See https://mmcv.readthedocs.io/en/latest/api.html#mmcv.fileio.FileClient
# for more details. # for more details.
file_client_args = dict( # file_client_args = dict(
backend='petrel', # backend='petrel',
path_mapping=dict({ # path_mapping=dict({
'./data/nuscenes/': # './data/nuscenes/':
's3://openmmlab/datasets/detection3d/nuscenes/', # 's3://openmmlab/datasets/detection3d/nuscenes/',
'data/nuscenes/': # 'data/nuscenes/':
's3://openmmlab/datasets/detection3d/nuscenes/' # 's3://openmmlab/datasets/detection3d/nuscenes/'
})) # }))
train_pipeline = [ train_pipeline = [
dict(type='LoadImageFromFileMono3D', file_client_args=file_client_args), dict(type='LoadImageFromFileMono3D'),
dict( dict(
type='LoadAnnotations3D', type='LoadAnnotations3D',
with_bbox=True, with_bbox=True,
...@@ -32,7 +32,7 @@ train_pipeline = [ ...@@ -32,7 +32,7 @@ train_pipeline = [
with_bbox_3d=True, with_bbox_3d=True,
with_label_3d=True, with_label_3d=True,
with_bbox_depth=True), with_bbox_depth=True),
dict(type='Resize', img_scale=(1600, 900), keep_ratio=True), dict(type='Resize', scale=(1600, 900), keep_ratio=True),
dict(type='RandomFlip3D', flip_ratio_bev_horizontal=0.5), dict(type='RandomFlip3D', flip_ratio_bev_horizontal=0.5),
dict( dict(
type='Pack3DDetInputs', type='Pack3DDetInputs',
...@@ -43,7 +43,7 @@ train_pipeline = [ ...@@ -43,7 +43,7 @@ train_pipeline = [
] ]
test_pipeline = [ test_pipeline = [
dict(type='LoadImageFromFileMono3D', file_client_args=file_client_args), dict(type='LoadImageFromFileMono3D'),
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'])
] ]
......
...@@ -27,16 +27,8 @@ file_client_args = dict(backend='disk') ...@@ -27,16 +27,8 @@ file_client_args = dict(backend='disk')
# 'data/lyft/': 's3://lyft/lyft/' # 'data/lyft/': 's3://lyft/lyft/'
# })) # }))
train_pipeline = [ train_pipeline = [
dict( dict(type='LoadPointsFromFile', coord_type='LIDAR', load_dim=5, use_dim=5),
type='LoadPointsFromFile', dict(type='LoadPointsFromMultiSweeps', sweeps_num=10),
coord_type='LIDAR',
load_dim=5,
use_dim=5,
file_client_args=file_client_args),
dict(
type='LoadPointsFromMultiSweeps',
sweeps_num=10,
file_client_args=file_client_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',
...@@ -51,16 +43,8 @@ train_pipeline = [ ...@@ -51,16 +43,8 @@ train_pipeline = [
dict(type='Collect3D', keys=['points', 'gt_bboxes_3d', 'gt_labels_3d']) dict(type='Collect3D', keys=['points', 'gt_bboxes_3d', 'gt_labels_3d'])
] ]
test_pipeline = [ test_pipeline = [
dict( dict(type='LoadPointsFromFile', coord_type='LIDAR', load_dim=5, use_dim=5),
type='LoadPointsFromFile', dict(type='LoadPointsFromMultiSweeps', sweeps_num=10),
coord_type='LIDAR',
load_dim=5,
use_dim=5,
file_client_args=file_client_args),
dict(
type='LoadPointsFromMultiSweeps',
sweeps_num=10,
file_client_args=file_client_args),
dict( dict(
type='MultiScaleFlipAug3D', type='MultiScaleFlipAug3D',
img_scale=(1333, 800), img_scale=(1333, 800),
...@@ -85,16 +69,8 @@ test_pipeline = [ ...@@ -85,16 +69,8 @@ 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( dict(type='LoadPointsFromFile', coord_type='LIDAR', load_dim=5, use_dim=5),
type='LoadPointsFromFile', dict(type='LoadPointsFromMultiSweeps', sweeps_num=10),
coord_type='LIDAR',
load_dim=5,
use_dim=5,
file_client_args=file_client_args),
dict(
type='LoadPointsFromMultiSweeps',
sweeps_num=10,
file_client_args=file_client_args),
dict( dict(
type='DefaultFormatBundle3D', type='DefaultFormatBundle3D',
class_names=class_names, class_names=class_names,
......
...@@ -6,6 +6,17 @@ class_names = ('table', 'chair', 'sofa', 'bookcase', 'board') ...@@ -6,6 +6,17 @@ class_names = ('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
file_client_args = dict(backend='disk')
# Uncomment the following if use ceph or other file clients.
# See https://mmcv.readthedocs.io/en/latest/api.html#mmcv.fileio.FileClient
# for more details.
# file_client_args = dict(
# backend='petrel',
# path_mapping=dict({
# './data/s3dis/':
# 's3://s3dis/',
# }))
train_pipeline = [ train_pipeline = [
dict( dict(
type='LoadPointsFromFile', type='LoadPointsFromFile',
......
...@@ -18,9 +18,7 @@ file_client_args = dict(backend='disk') ...@@ -18,9 +18,7 @@ file_client_args = dict(backend='disk')
# backend='petrel', # backend='petrel',
# path_mapping=dict({ # path_mapping=dict({
# './data/s3dis/': # './data/s3dis/':
# 's3://openmmlab/datasets/detection3d/s3dis_processed/', # 's3://s3dis/',
# 'data/s3dis/':
# 's3://openmmlab/datasets/detection3d/s3dis_processed/'
# })) # }))
num_points = 4096 num_points = 4096
...@@ -33,15 +31,13 @@ train_pipeline = [ ...@@ -33,15 +31,13 @@ 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]),
file_client_args=file_client_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),
file_client_args=file_client_args),
dict(type='PointSegClassMapping'), dict(type='PointSegClassMapping'),
dict( dict(
type='IndoorPatchPointSample', type='IndoorPatchPointSample',
...@@ -61,8 +57,7 @@ test_pipeline = [ ...@@ -61,8 +57,7 @@ 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]),
file_client_args=file_client_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
...@@ -95,8 +90,7 @@ eval_pipeline = [ ...@@ -95,8 +90,7 @@ 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]),
file_client_args=file_client_args),
dict(type='NormalizePointsColor', color_mean=None), dict(type='NormalizePointsColor', color_mean=None),
dict(type='Pack3DDetInputs', keys=['points']) dict(type='Pack3DDetInputs', keys=['points'])
] ]
......
...@@ -7,6 +7,18 @@ metainfo = dict( ...@@ -7,6 +7,18 @@ metainfo = dict(
'bookshelf', 'picture', 'counter', 'desk', 'curtain', 'bookshelf', 'picture', 'counter', 'desk', 'curtain',
'refrigerator', 'showercurtrain', 'toilet', 'sink', 'bathtub', 'refrigerator', 'showercurtrain', 'toilet', 'sink', 'bathtub',
'garbagebin')) 'garbagebin'))
file_client_args = dict(backend='disk')
# Uncomment the following if use ceph or other file clients.
# See https://mmcv.readthedocs.io/en/latest/api.html#mmcv.fileio.FileClient
# for more details.
# file_client_args = dict(
# backend='petrel',
# path_mapping=dict({
# './data/scannet/':
# 's3://scannet/',
# }))
train_pipeline = [ train_pipeline = [
dict( dict(
type='LoadPointsFromFile', type='LoadPointsFromFile',
...@@ -21,11 +33,7 @@ train_pipeline = [ ...@@ -21,11 +33,7 @@ train_pipeline = [
with_mask_3d=True, with_mask_3d=True,
with_seg_3d=True), with_seg_3d=True),
dict(type='GlobalAlignment', rotation_axis=2), dict(type='GlobalAlignment', rotation_axis=2),
dict( dict(type='PointSegClassMapping'),
type='PointSegClassMapping',
valid_cat_ids=(3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16, 24, 28, 33, 34,
36, 39),
max_cat_id=40),
dict(type='PointSample', num_points=40000), dict(type='PointSample', num_points=40000),
dict( dict(
type='RandomFlip3D', type='RandomFlip3D',
......
...@@ -20,9 +20,7 @@ file_client_args = dict(backend='disk') ...@@ -20,9 +20,7 @@ file_client_args = dict(backend='disk')
# backend='petrel', # backend='petrel',
# path_mapping=dict({ # path_mapping=dict({
# './data/scannet/': # './data/scannet/':
# 's3://openmmlab/datasets/detection3d/scannet_processed/', # 's3://scannet/',
# 'data/scannet/':
# 's3://openmmlab/datasets/detection3d/scannet_processed/'
# })) # }))
num_points = 8192 num_points = 8192
...@@ -33,15 +31,13 @@ train_pipeline = [ ...@@ -33,15 +31,13 @@ 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]),
file_client_args=file_client_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),
file_client_args=file_client_args),
dict(type='PointSegClassMapping'), dict(type='PointSegClassMapping'),
dict( dict(
type='IndoorPatchPointSample', type='IndoorPatchPointSample',
...@@ -61,8 +57,7 @@ test_pipeline = [ ...@@ -61,8 +57,7 @@ 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]),
file_client_args=file_client_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
...@@ -95,8 +90,7 @@ eval_pipeline = [ ...@@ -95,8 +90,7 @@ 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]),
file_client_args=file_client_args),
dict(type='NormalizePointsColor', color_mean=None), dict(type='NormalizePointsColor', color_mean=None),
dict(type='Pack3DDetInputs', keys=['points']) dict(type='Pack3DDetInputs', keys=['points'])
] ]
......
...@@ -5,6 +5,17 @@ class_names = ('bed', 'table', 'sofa', 'chair', 'toilet', 'desk', 'dresser', ...@@ -5,6 +5,17 @@ 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')
# Uncomment the following if use ceph or other file clients.
# See https://mmcv.readthedocs.io/en/latest/api.html#mmcv.fileio.FileClient
# for more details.
# file_client_args = dict(
# backend='petrel',
# path_mapping=dict({
# './data/sunrgbd/':
# 's3://sunrgbd/',
# }))
train_pipeline = [ train_pipeline = [
dict( dict(
type='LoadPointsFromFile', type='LoadPointsFromFile',
......
...@@ -11,6 +11,8 @@ file_client_args = dict(backend='disk') ...@@ -11,6 +11,8 @@ file_client_args = dict(backend='disk')
# backend='petrel', path_mapping=dict(data='s3://waymo_data/')) # backend='petrel', path_mapping=dict(data='s3://waymo_data/'))
class_names = ['Car', 'Pedestrian', 'Cyclist'] class_names = ['Car', 'Pedestrian', 'Cyclist']
metainfo = dict(CLASSES=class_names)
point_cloud_range = [-74.88, -74.88, -2, 74.88, 74.88, 4] point_cloud_range = [-74.88, -74.88, -2, 74.88, 74.88, 4]
input_modality = dict(use_lidar=True, use_camera=False) input_modality = dict(use_lidar=True, use_camera=False)
db_sampler = dict( db_sampler = dict(
...@@ -26,21 +28,11 @@ db_sampler = dict( ...@@ -26,21 +28,11 @@ 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]))
file_client_args=file_client_args))
train_pipeline = [ train_pipeline = [
dict( dict(type='LoadPointsFromFile', coord_type='LIDAR', load_dim=6, use_dim=5),
type='LoadPointsFromFile', dict(type='LoadAnnotations3D', with_bbox_3d=True, with_label_3d=True),
coord_type='LIDAR',
load_dim=6,
use_dim=5,
file_client_args=file_client_args),
dict(
type='LoadAnnotations3D',
with_bbox_3d=True,
with_label_3d=True,
file_client_args=file_client_args),
dict(type='ObjectSample', db_sampler=db_sampler), dict(type='ObjectSample', db_sampler=db_sampler),
dict( dict(
type='RandomFlip3D', type='RandomFlip3D',
...@@ -54,16 +46,12 @@ train_pipeline = [ ...@@ -54,16 +46,12 @@ train_pipeline = [
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),
dict(type='PointShuffle'), dict(type='PointShuffle'),
dict(type='DefaultFormatBundle3D', class_names=class_names), dict(
dict(type='Collect3D', keys=['points', 'gt_bboxes_3d', 'gt_labels_3d']) type='Pack3DDetInputs',
keys=['points', 'gt_bboxes_3d', 'gt_labels_3d'])
] ]
test_pipeline = [ test_pipeline = [
dict( dict(type='LoadPointsFromFile', coord_type='LIDAR', load_dim=6, use_dim=5),
type='LoadPointsFromFile',
coord_type='LIDAR',
load_dim=6,
use_dim=5,
file_client_args=file_client_args),
dict( dict(
type='MultiScaleFlipAug3D', type='MultiScaleFlipAug3D',
img_scale=(1333, 800), img_scale=(1333, 800),
...@@ -77,13 +65,9 @@ test_pipeline = [ ...@@ -77,13 +65,9 @@ test_pipeline = [
translation_std=[0, 0, 0]), translation_std=[0, 0, 0]),
dict(type='RandomFlip3D'), dict(type='RandomFlip3D'),
dict( dict(
type='PointsRangeFilter', point_cloud_range=point_cloud_range), type='PointsRangeFilter', point_cloud_range=point_cloud_range)
dict( ]),
type='DefaultFormatBundle3D', dict(type='Pack3DDetInputs', keys=['points'])
class_names=class_names,
with_label=False),
dict(type='Collect3D', keys=['points'])
])
] ]
# 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)
...@@ -94,52 +78,69 @@ eval_pipeline = [ ...@@ -94,52 +78,69 @@ eval_pipeline = [
load_dim=6, load_dim=6,
use_dim=5, use_dim=5,
file_client_args=file_client_args), file_client_args=file_client_args),
dict( dict(type='Pack3DDetInputs', keys=['points']),
type='DefaultFormatBundle3D',
class_names=class_names,
with_label=False),
dict(type='Collect3D', keys=['points'])
] ]
data = dict( train_dataloader = dict(
samples_per_gpu=2, batch_size=2,
workers_per_gpu=4, num_workers=2,
train=dict( persistent_workers=True,
sampler=dict(type='DefaultSampler', shuffle=True),
dataset=dict(
type='RepeatDataset', type='RepeatDataset',
times=2, times=2,
dataset=dict( dataset=dict(
type=dataset_type, type=dataset_type,
data_root=data_root, data_root=data_root,
ann_file=data_root + 'waymo_infos_train.pkl', ann_file='waymo_infos_train.pkl',
split='training', data_prefix=dict(pts='training/velodyne'),
pipeline=train_pipeline, pipeline=train_pipeline,
modality=input_modality, modality=input_modality,
classes=class_names,
test_mode=False, test_mode=False,
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',
# load one frame every five frames # load one frame every five frames
load_interval=5)), load_interval=5)))
val=dict( val_dataloader = dict(
batch_size=1,
num_workers=1,
persistent_workers=True,
drop_last=False,
sampler=dict(type='DefaultSampler', shuffle=False),
dataset=dict(
type=dataset_type, type=dataset_type,
data_root=data_root, data_root=data_root,
ann_file=data_root + 'waymo_infos_val.pkl', data_prefix=dict(pts='training/velodyne'),
split='training', ann_file='waymo_infos_val.pkl',
pipeline=test_pipeline, pipeline=eval_pipeline,
modality=input_modality, modality=input_modality,
classes=class_names,
test_mode=True, test_mode=True,
box_type_3d='LiDAR'), metainfo=metainfo,
test=dict( box_type_3d='LiDAR'))
test_dataloader = dict(
batch_size=1,
num_workers=1,
persistent_workers=True,
drop_last=False,
sampler=dict(type='DefaultSampler', shuffle=False),
dataset=dict(
type=dataset_type, type=dataset_type,
data_root=data_root, data_root=data_root,
ann_file=data_root + 'waymo_infos_val.pkl', data_prefix=dict(pts='training/velodyne'),
split='training', ann_file='waymo_infos_val.pkl',
pipeline=test_pipeline, pipeline=eval_pipeline,
modality=input_modality, modality=input_modality,
classes=class_names,
test_mode=True, test_mode=True,
metainfo=metainfo,
box_type_3d='LiDAR')) box_type_3d='LiDAR'))
evaluation = dict(interval=24, pipeline=eval_pipeline) val_evaluator = dict(
type='WaymoMetric',
ann_file='./data/waymo/kitti_format/waymo_infos_val.pkl',
waymo_bin_file='./data/waymo/waymo_format/gt.bin',
data_root='./data/waymo/waymo_format',
file_client_args=file_client_args)
test_evaluator = val_evaluator
...@@ -11,6 +11,8 @@ file_client_args = dict(backend='disk') ...@@ -11,6 +11,8 @@ file_client_args = dict(backend='disk')
# backend='petrel', path_mapping=dict(data='s3://waymo_data/')) # backend='petrel', path_mapping=dict(data='s3://waymo_data/'))
class_names = ['Car'] class_names = ['Car']
metainfo = dict(CLASSES=class_names)
point_cloud_range = [-74.88, -74.88, -2, 74.88, 74.88, 4] point_cloud_range = [-74.88, -74.88, -2, 74.88, 74.88, 4]
input_modality = dict(use_lidar=True, use_camera=False) input_modality = dict(use_lidar=True, use_camera=False)
db_sampler = dict( db_sampler = dict(
...@@ -24,21 +26,11 @@ db_sampler = dict( ...@@ -24,21 +26,11 @@ 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]))
file_client_args=file_client_args))
train_pipeline = [ train_pipeline = [
dict( dict(type='LoadPointsFromFile', coord_type='LIDAR', load_dim=6, use_dim=5),
type='LoadPointsFromFile', dict(type='LoadAnnotations3D', with_bbox_3d=True, with_label_3d=True),
coord_type='LIDAR',
load_dim=6,
use_dim=5,
file_client_args=file_client_args),
dict(
type='LoadAnnotations3D',
with_bbox_3d=True,
with_label_3d=True,
file_client_args=file_client_args),
dict(type='ObjectSample', db_sampler=db_sampler), dict(type='ObjectSample', db_sampler=db_sampler),
dict( dict(
type='RandomFlip3D', type='RandomFlip3D',
...@@ -52,16 +44,12 @@ train_pipeline = [ ...@@ -52,16 +44,12 @@ train_pipeline = [
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),
dict(type='PointShuffle'), dict(type='PointShuffle'),
dict(type='DefaultFormatBundle3D', class_names=class_names), dict(
dict(type='Collect3D', keys=['points', 'gt_bboxes_3d', 'gt_labels_3d']) type='Pack3DDetInputs',
keys=['points', 'gt_bboxes_3d', 'gt_labels_3d'])
] ]
test_pipeline = [ test_pipeline = [
dict( dict(type='LoadPointsFromFile', coord_type='LIDAR', load_dim=6, use_dim=5),
type='LoadPointsFromFile',
coord_type='LIDAR',
load_dim=6,
use_dim=5,
file_client_args=file_client_args),
dict( dict(
type='MultiScaleFlipAug3D', type='MultiScaleFlipAug3D',
img_scale=(1333, 800), img_scale=(1333, 800),
...@@ -75,13 +63,9 @@ test_pipeline = [ ...@@ -75,13 +63,9 @@ test_pipeline = [
translation_std=[0, 0, 0]), translation_std=[0, 0, 0]),
dict(type='RandomFlip3D'), dict(type='RandomFlip3D'),
dict( dict(
type='PointsRangeFilter', point_cloud_range=point_cloud_range), type='PointsRangeFilter', point_cloud_range=point_cloud_range)
dict( ]),
type='DefaultFormatBundle3D', dict(type='Pack3DDetInputs', keys=['points'])
class_names=class_names,
with_label=False),
dict(type='Collect3D', keys=['points'])
])
] ]
# 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)
...@@ -92,52 +76,69 @@ eval_pipeline = [ ...@@ -92,52 +76,69 @@ eval_pipeline = [
load_dim=6, load_dim=6,
use_dim=5, use_dim=5,
file_client_args=file_client_args), file_client_args=file_client_args),
dict( dict(type='Pack3DDetInputs', keys=['points']),
type='DefaultFormatBundle3D',
class_names=class_names,
with_label=False),
dict(type='Collect3D', keys=['points'])
] ]
data = dict( train_dataloader = dict(
samples_per_gpu=2, batch_size=2,
workers_per_gpu=4, num_workers=2,
train=dict( persistent_workers=True,
sampler=dict(type='DefaultSampler', shuffle=True),
dataset=dict(
type='RepeatDataset', type='RepeatDataset',
times=2, times=2,
dataset=dict( dataset=dict(
type=dataset_type, type=dataset_type,
data_root=data_root, data_root=data_root,
ann_file=data_root + 'waymo_infos_train.pkl', ann_file='waymo_infos_train.pkl',
split='training', data_prefix=dict(pts='training/velodyne'),
pipeline=train_pipeline, pipeline=train_pipeline,
modality=input_modality, modality=input_modality,
classes=class_names,
test_mode=False, test_mode=False,
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',
# load one frame every five frames # load one frame every five frames
load_interval=5)), load_interval=5)))
val=dict( val_dataloader = dict(
batch_size=1,
num_workers=1,
persistent_workers=True,
drop_last=False,
sampler=dict(type='DefaultSampler', shuffle=False),
dataset=dict(
type=dataset_type, type=dataset_type,
data_root=data_root, data_root=data_root,
ann_file=data_root + 'waymo_infos_val.pkl', data_prefix=dict(pts='training/velodyne'),
split='training', ann_file='waymo_infos_val.pkl',
pipeline=test_pipeline, pipeline=eval_pipeline,
modality=input_modality, modality=input_modality,
classes=class_names,
test_mode=True, test_mode=True,
box_type_3d='LiDAR'), metainfo=metainfo,
test=dict( box_type_3d='LiDAR'))
test_dataloader = dict(
batch_size=1,
num_workers=1,
persistent_workers=True,
drop_last=False,
sampler=dict(type='DefaultSampler', shuffle=False),
dataset=dict(
type=dataset_type, type=dataset_type,
data_root=data_root, data_root=data_root,
ann_file=data_root + 'waymo_infos_val.pkl', data_prefix=dict(pts='training/velodyne'),
split='training', ann_file='waymo_infos_val.pkl',
pipeline=test_pipeline, pipeline=eval_pipeline,
modality=input_modality, modality=input_modality,
classes=class_names,
test_mode=True, test_mode=True,
metainfo=metainfo,
box_type_3d='LiDAR')) box_type_3d='LiDAR'))
evaluation = dict(interval=24, pipeline=eval_pipeline) val_evaluator = dict(
type='WaymoMetric',
ann_file='./data/waymo/kitti_format/waymo_infos_val.pkl',
waymo_bin_file='./data/waymo/waymo_format/gt.bin',
data_root='./data/waymo/waymo_format',
file_client_args=file_client_args)
test_evaluator = val_evaluator
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
voxel_size = [0.32, 0.32, 6] voxel_size = [0.32, 0.32, 6]
model = dict( model = dict(
type='MVXFasterRCNN', type='MVXFasterRCNN',
data_preprocessor=dict(type='Det3DDataPreprocessor'),
pts_voxel_layer=dict( pts_voxel_layer=dict(
max_num_points=20, max_num_points=20,
point_cloud_range=[-74.88, -74.88, -2, 74.88, 74.88, 4], point_cloud_range=[-74.88, -74.88, -2, 74.88, 74.88, 4],
...@@ -58,34 +59,36 @@ model = dict( ...@@ -58,34 +59,36 @@ model = dict(
dir_offset=-0.7854, # -pi / 4 dir_offset=-0.7854, # -pi / 4
bbox_coder=dict(type='DeltaXYZWLHRBBoxCoder', code_size=7), bbox_coder=dict(type='DeltaXYZWLHRBBoxCoder', code_size=7),
loss_cls=dict( loss_cls=dict(
type='FocalLoss', type='mmdet.FocalLoss',
use_sigmoid=True, use_sigmoid=True,
gamma=2.0, gamma=2.0,
alpha=0.25, alpha=0.25,
loss_weight=1.0), loss_weight=1.0),
loss_bbox=dict(type='SmoothL1Loss', beta=1.0 / 9.0, loss_weight=1.0), loss_bbox=dict(
type='mmdet.SmoothL1Loss', beta=1.0 / 9.0, loss_weight=1.0),
loss_dir=dict( loss_dir=dict(
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=0.2)), type='mmdet.CrossEntropyLoss', use_sigmoid=False,
loss_weight=0.2)),
# model training and testing settings # model training and testing settings
train_cfg=dict( train_cfg=dict(
pts=dict( pts=dict(
assigner=[ assigner=[
dict( # car dict( # car
type='MaxIoUAssigner', type='Max3DIoUAssigner',
iou_calculator=dict(type='BboxOverlapsNearest3D'), iou_calculator=dict(type='BboxOverlapsNearest3D'),
pos_iou_thr=0.55, pos_iou_thr=0.55,
neg_iou_thr=0.4, neg_iou_thr=0.4,
min_pos_iou=0.4, min_pos_iou=0.4,
ignore_iof_thr=-1), ignore_iof_thr=-1),
dict( # cyclist dict( # cyclist
type='MaxIoUAssigner', type='Max3DIoUAssigner',
iou_calculator=dict(type='BboxOverlapsNearest3D'), iou_calculator=dict(type='BboxOverlapsNearest3D'),
pos_iou_thr=0.5, pos_iou_thr=0.5,
neg_iou_thr=0.3, neg_iou_thr=0.3,
min_pos_iou=0.3, min_pos_iou=0.3,
ignore_iof_thr=-1), ignore_iof_thr=-1),
dict( # pedestrian dict( # pedestrian
type='MaxIoUAssigner', type='Max3DIoUAssigner',
iou_calculator=dict(type='BboxOverlapsNearest3D'), iou_calculator=dict(type='BboxOverlapsNearest3D'),
pos_iou_thr=0.5, pos_iou_thr=0.5,
neg_iou_thr=0.3, neg_iou_thr=0.3,
......
...@@ -5,32 +5,33 @@ ...@@ -5,32 +5,33 @@
# keys in the config. # keys in the config.
voxel_size = [0.08, 0.08, 0.1] voxel_size = [0.08, 0.08, 0.1]
model = dict( model = dict(
type='VoxelNet', type='MVXFasterRCNN',
voxel_layer=dict( data_preprocessor=dict(type='Det3DDataPreprocessor'),
max_num_points=10, pts_voxel_layer=dict(
max_num_points=20,
point_cloud_range=[-76.8, -51.2, -2, 76.8, 51.2, 4], point_cloud_range=[-76.8, -51.2, -2, 76.8, 51.2, 4],
voxel_size=voxel_size, voxel_size=voxel_size,
max_voxels=(80000, 90000)), max_voxels=(80000, 90000)),
voxel_encoder=dict(type='HardSimpleVFE', num_features=5), pts_voxel_encoder=dict(type='HardSimpleVFE', num_features=5),
middle_encoder=dict( pts_middle_encoder=dict(
type='SparseEncoder', type='SparseEncoder',
in_channels=5, in_channels=5,
sparse_shape=[61, 1280, 1920], sparse_shape=[61, 1280, 1920],
order=('conv', 'norm', 'act')), order=('conv', 'norm', 'act')),
backbone=dict( pts_backbone=dict(
type='SECOND', type='SECOND',
in_channels=384, in_channels=384,
norm_cfg=dict(type='naiveSyncBN2d', eps=1e-3, momentum=0.01), norm_cfg=dict(type='naiveSyncBN2d', eps=1e-3, momentum=0.01),
layer_nums=[5, 5], layer_nums=[5, 5],
layer_strides=[1, 2], layer_strides=[1, 2],
out_channels=[128, 256]), out_channels=[128, 256]),
neck=dict( pts_neck=dict(
type='SECONDFPN', type='SECONDFPN',
norm_cfg=dict(type='naiveSyncBN2d', eps=1e-3, momentum=0.01), norm_cfg=dict(type='naiveSyncBN2d', eps=1e-3, momentum=0.01),
in_channels=[128, 256], in_channels=[128, 256],
upsample_strides=[1, 2], upsample_strides=[1, 2],
out_channels=[256, 256]), out_channels=[256, 256]),
bbox_head=dict( pts_bbox_head=dict(
type='Anchor3DHead', type='Anchor3DHead',
num_classes=3, num_classes=3,
in_channels=512, in_channels=512,
...@@ -38,13 +39,15 @@ model = dict( ...@@ -38,13 +39,15 @@ model = dict(
use_direction_classifier=True, use_direction_classifier=True,
anchor_generator=dict( anchor_generator=dict(
type='AlignedAnchor3DRangeGenerator', type='AlignedAnchor3DRangeGenerator',
ranges=[[-76.8, -51.2, -0.0345, 76.8, 51.2, -0.0345], ranges=[
[-76.8, -51.2, 0, 76.8, 51.2, 0], [-76.8, -51.2, -0.0345, 76.8, 51.2, -0.0345],
[-76.8, -51.2, -0.1188, 76.8, 51.2, -0.1188]], [-76.8, -51.2, -0.1188, 76.8, 51.2, -0.1188],
[-76.8, -51.2, 0, 76.8, 51.2, 0],
],
sizes=[ sizes=[
[4.73, 2.08, 1.77], # car [4.73, 2.08, 1.77], # car
[0.91, 0.84, 1.74], # pedestrian [1.81, 0.84, 1.77], # pedestrian
[1.81, 0.84, 1.77] # cyclist [0.91, 0.84, 1.74], # cyclist
], ],
rotations=[0, 1.57], rotations=[0, 1.57],
reshape_out=False), reshape_out=False),
...@@ -52,48 +55,52 @@ model = dict( ...@@ -52,48 +55,52 @@ model = dict(
dir_offset=-0.7854, # -pi / 4 dir_offset=-0.7854, # -pi / 4
bbox_coder=dict(type='DeltaXYZWLHRBBoxCoder', code_size=7), bbox_coder=dict(type='DeltaXYZWLHRBBoxCoder', code_size=7),
loss_cls=dict( loss_cls=dict(
type='FocalLoss', type='mmdet.FocalLoss',
use_sigmoid=True, use_sigmoid=True,
gamma=2.0, gamma=2.0,
alpha=0.25, alpha=0.25,
loss_weight=1.0), loss_weight=1.0),
loss_bbox=dict(type='SmoothL1Loss', beta=1.0 / 9.0, loss_weight=1.0), loss_bbox=dict(
type='mmdet.SmoothL1Loss', beta=1.0 / 9.0, loss_weight=1.0),
loss_dir=dict( loss_dir=dict(
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=0.2)), type='mmdet.CrossEntropyLoss', use_sigmoid=False,
loss_weight=0.2)),
# model training and testing settings # model training and testing settings
train_cfg=dict( train_cfg=dict(
assigner=[ pts=dict(
dict( # car assigner=[
type='MaxIoUAssigner', dict( # car
iou_calculator=dict(type='BboxOverlapsNearest3D'), type='Max3DIoUAssigner',
pos_iou_thr=0.55, iou_calculator=dict(type='BboxOverlapsNearest3D'),
neg_iou_thr=0.4, pos_iou_thr=0.55,
min_pos_iou=0.4, neg_iou_thr=0.4,
ignore_iof_thr=-1), min_pos_iou=0.4,
dict( # pedestrian ignore_iof_thr=-1),
type='MaxIoUAssigner', dict( # pedestrian
iou_calculator=dict(type='BboxOverlapsNearest3D'), type='Max3DIoUAssigner',
pos_iou_thr=0.5, iou_calculator=dict(type='BboxOverlapsNearest3D'),
neg_iou_thr=0.3, pos_iou_thr=0.5,
min_pos_iou=0.3, neg_iou_thr=0.3,
ignore_iof_thr=-1), min_pos_iou=0.3,
dict( # cyclist ignore_iof_thr=-1),
type='MaxIoUAssigner', dict( # cyclist
iou_calculator=dict(type='BboxOverlapsNearest3D'), type='Max3DIoUAssigner',
pos_iou_thr=0.5, iou_calculator=dict(type='BboxOverlapsNearest3D'),
neg_iou_thr=0.3, pos_iou_thr=0.5,
min_pos_iou=0.3, neg_iou_thr=0.3,
ignore_iof_thr=-1) min_pos_iou=0.3,
], ignore_iof_thr=-1),
allowed_border=0, ],
code_weight=[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], allowed_border=0,
pos_weight=-1, code_weight=[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0],
debug=False), pos_weight=-1,
debug=False)),
test_cfg=dict( test_cfg=dict(
use_rotate_nms=True, pts=dict(
nms_across_levels=False, use_rotate_nms=True,
nms_pre=4096, nms_across_levels=False,
nms_thr=0.25, nms_pre=4096,
score_thr=0.1, nms_thr=0.25,
min_bbox_size=0, score_thr=0.1,
max_num=500)) min_bbox_size=0,
max_num=500)))
...@@ -213,7 +213,9 @@ db_sampler = dict( ...@@ -213,7 +213,9 @@ db_sampler = dict(
filter_by_difficulty=[-1], filter_by_difficulty=[-1],
filter_by_min_points=dict(Car=5, Pedestrian=5, Cyclist=5)), filter_by_min_points=dict(Car=5, Pedestrian=5, Cyclist=5)),
classes=class_names, classes=class_names,
sample_groups=dict(Car=20, Pedestrian=15, Cyclist=15)) sample_groups=dict(Car=20, Pedestrian=15, Cyclist=15),
points_loader=dict(
type='LoadPointsFromFile', coord_type='LIDAR', load_dim=4, use_dim=4))
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),
dict(type='LoadAnnotations3D', with_bbox_3d=True, with_label_3d=True), dict(type='LoadAnnotations3D', with_bbox_3d=True, with_label_3d=True),
......
...@@ -83,7 +83,9 @@ db_sampler = dict( ...@@ -83,7 +83,9 @@ db_sampler = dict(
rate=1.0, rate=1.0,
prepare=dict(filter_by_difficulty=[-1], filter_by_min_points=dict(Car=5)), prepare=dict(filter_by_difficulty=[-1], filter_by_min_points=dict(Car=5)),
sample_groups=dict(Car=15), sample_groups=dict(Car=15),
classes=class_names) classes=class_names,
points_loader=dict(
type='LoadPointsFromFile', coord_type='LIDAR', load_dim=4, use_dim=4))
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),
......
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