repo
stringlengths
1
99
file
stringlengths
13
215
code
stringlengths
12
59.2M
file_length
int64
12
59.2M
avg_line_length
float64
3.82
1.48M
max_line_length
int64
12
2.51M
extension_type
stringclasses
1 value
RoboBEV
RoboBEV-master/zoo/BEVDet/tests/test_data/test_datasets/test_s3dis_dataset.py
# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import pytest import torch from mmdet3d.datasets import S3DISDataset, S3DISSegDataset def test_getitem(): np.random.seed(0) root_path = './tests/data/s3dis/' ann_file = './tests/data/s3dis/s3dis_infos.pkl' class_names = ('table', 'cha...
13,524
37.864943
79
py
RoboBEV
RoboBEV-master/zoo/BEVDet/tests/test_data/test_datasets/test_sunrgbd_dataset.py
# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import pytest import torch from mmdet3d.datasets import SUNRGBDDataset def _generate_sunrgbd_dataset_config(): root_path = './tests/data/sunrgbd' ann_file = './tests/data/sunrgbd/sunrgbd_infos.pkl' class_names = ('bed', 'table', 'sofa', '...
13,290
40.534375
79
py
RoboBEV
RoboBEV-master/zoo/BEVDet/tests/test_data/test_datasets/test_nuscene_dataset.py
# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import tempfile import torch from mmdet3d.datasets import NuScenesDataset def test_getitem(): np.random.seed(0) point_cloud_range = [-50, -50, -5, 50, 50, 3] file_client_args = dict(backend='disk') class_names = [ 'car', 'truc...
4,308
35.82906
78
py
RoboBEV
RoboBEV-master/zoo/BEVDet/tests/test_data/test_datasets/test_lyft_dataset.py
# Copyright (c) OpenMMLab. All rights reserved. import mmcv import numpy as np import tempfile import torch from mmdet3d.datasets import LyftDataset def test_getitem(): np.random.seed(0) torch.manual_seed(0) root_path = './tests/data/lyft' ann_file = './tests/data/lyft/lyft_infos.pkl' class_names...
7,590
43.652941
79
py
RoboBEV
RoboBEV-master/zoo/BEVDet/tests/test_data/test_pipelines/test_outdoor_pipeline.py
# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import torch from mmdet3d.core.bbox import LiDARInstance3DBoxes from mmdet3d.datasets.pipelines import Compose def test_outdoor_aug_pipeline(): point_cloud_range = [0, -40, -3, 70.4, 40, 1] class_names = ['Car'] np.random.seed(0) tra...
10,243
39.650794
79
py
RoboBEV
RoboBEV-master/zoo/BEVDet/tests/test_data/test_pipelines/test_indoor_pipeline.py
# Copyright (c) OpenMMLab. All rights reserved. import mmcv import numpy as np import torch from os import path as osp from mmdet3d.core.bbox import DepthInstance3DBoxes from mmdet3d.datasets.pipelines import Compose def test_scannet_pipeline(): class_names = ('cabinet', 'bed', 'chair', 'sofa', 'table', 'door', ...
12,922
38.519878
79
py
RoboBEV
RoboBEV-master/zoo/BEVDet/tests/test_data/test_pipelines/test_augmentations/test_transforms_3d.py
# Copyright (c) OpenMMLab. All rights reserved. import mmcv import numpy as np import pytest import torch from mmdet3d.core import (Box3DMode, CameraInstance3DBoxes, DepthInstance3DBoxes, LiDARInstance3DBoxes) from mmdet3d.core.bbox import Coord3DMode from mmdet3d.core.points import DepthPoin...
31,331
40.554377
79
py
RoboBEV
RoboBEV-master/zoo/BEVDet/tests/test_data/test_pipelines/test_augmentations/test_test_augment_utils.py
# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import torch from mmdet3d.core.points import DepthPoints from mmdet3d.datasets.pipelines import MultiScaleFlipAug3D def test_multi_scale_flip_aug_3D(): np.random.seed(0) transforms = [{ 'type': 'GlobalRotScaleTrans', 'rot_rang...
2,269
35.031746
79
py
RoboBEV
RoboBEV-master/zoo/BEVDet/tests/test_data/test_pipelines/test_loadings/test_load_images_from_multi_views.py
# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import torch from mmcv.parallel import DataContainer from mmdet3d.datasets.pipelines import (DefaultFormatBundle, LoadMultiViewImageFromFiles) def test_load_multi_view_image_from_files(): multi_view_img_loa...
1,768
36.638298
79
py
RoboBEV
RoboBEV-master/zoo/BEVDet/tests/test_utils/test_assigners.py
# Copyright (c) OpenMMLab. All rights reserved. """Tests the Assigner objects. CommandLine: pytest tests/test_utils/test_assigner.py xdoctest tests/test_utils/test_assigner.py zero """ import torch from mmdet3d.core.bbox.assigners import MaxIoUAssigner def test_max_iou_assigner(): self = MaxIoUAssigner(...
4,301
27.490066
77
py
RoboBEV
RoboBEV-master/zoo/BEVDet/tests/test_utils/test_samplers.py
# Copyright (c) OpenMMLab. All rights reserved. import pytest import torch from mmdet3d.core.bbox.assigners import MaxIoUAssigner from mmdet3d.core.bbox.samplers import IoUNegPiecewiseSampler def test_iou_piecewise_sampler(): if not torch.cuda.is_available(): pytest.skip() assigner = MaxIoUAssigner( ...
1,732
37.511111
79
py
RoboBEV
RoboBEV-master/zoo/BEVDet/tests/test_utils/test_nms.py
# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import torch def test_aligned_3d_nms(): from mmdet3d.core.post_processing import aligned_3d_nms boxes = torch.tensor([[1.2261, 0.6679, -1.2678, 2.6547, 1.0428, 0.1000], [5.0919, 0.6512, 0.7238, 5.4821, 1.2451, 2.1095...
4,077
52.657895
79
py
RoboBEV
RoboBEV-master/zoo/BEVDet/tests/test_utils/test_bbox_coders.py
# Copyright (c) OpenMMLab. All rights reserved. import torch from mmdet3d.core.bbox import DepthInstance3DBoxes, LiDARInstance3DBoxes from mmdet.core import build_bbox_coder def test_partial_bin_based_box_coder(): box_coder_cfg = dict( type='PartialBinBasedBBoxCoder', num_sizes=10, num_di...
17,332
47.825352
79
py
RoboBEV
RoboBEV-master/zoo/BEVDet/tests/test_utils/test_points.py
# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import pytest import torch from mmdet3d.core.points import (BasePoints, CameraPoints, DepthPoints, LiDARPoints) def test_base_points(): # test empty initialization empty_boxes = [] points = BasePoints(empt...
50,955
45.450319
79
py
RoboBEV
RoboBEV-master/zoo/BEVDet/tests/test_utils/test_coord_3d_mode.py
# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import torch from mmdet3d.core.bbox import (CameraInstance3DBoxes, Coord3DMode, DepthInstance3DBoxes, LiDARInstance3DBoxes) from mmdet3d.core.points import CameraPoints, DepthPoints, LiDARPoints def test_points_conversi...
15,980
49.572785
79
py
RoboBEV
RoboBEV-master/zoo/BEVDet/tests/test_utils/test_box3d.py
# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import pytest import torch import unittest from mmdet3d.core.bbox import (BaseInstance3DBoxes, Box3DMode, CameraInstance3DBoxes, DepthInstance3DBoxes, LiDARInstance3DBoxes, bbox3d2roi, ...
64,168
47.356443
79
py
RoboBEV
RoboBEV-master/zoo/BEVDet/tests/test_utils/test_merge_augs.py
# Copyright (c) OpenMMLab. All rights reserved. import mmcv import pytest import torch from mmdet3d.core import merge_aug_bboxes_3d from mmdet3d.core.bbox import DepthInstance3DBoxes def test_merge_aug_bboxes_3d(): if not torch.cuda.is_available(): pytest.skip('test requires GPU and torch+cuda') img_...
2,603
40.333333
78
py
RoboBEV
RoboBEV-master/zoo/BEVDet/tests/test_utils/test_anchors.py
# Copyright (c) OpenMMLab. All rights reserved. """ CommandLine: pytest tests/test_utils/test_anchor.py xdoctest tests/test_utils/test_anchor.py zero """ import torch from mmdet3d.core.anchor import build_prior_generator def test_anchor_3d_range_generator(): if torch.cuda.is_available(): device ...
9,343
37.933333
79
py
RoboBEV
RoboBEV-master/zoo/BEVDet/tests/test_utils/test_utils.py
# Copyright (c) OpenMMLab. All rights reserved. import torch from mmdet3d.core import draw_heatmap_gaussian def test_gaussian(): heatmap = torch.zeros((128, 128)) ct_int = torch.tensor([64, 64], dtype=torch.int32) radius = 2 draw_heatmap_gaussian(heatmap, ct_int, radius) assert torch.isclose(torc...
369
27.461538
77
py
RoboBEV
RoboBEV-master/zoo/BEVDet/tests/test_metrics/test_kitti_eval.py
# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import pytest import torch from mmdet3d.core.evaluation.kitti_utils.eval import (do_eval, eval_class, kitti_eval) def test_do_eval(): if not torch.cuda.is_available(): pytest.skip('tes...
12,056
48.413934
79
py
RoboBEV
RoboBEV-master/zoo/BEVDet/tests/test_metrics/test_losses.py
# Copyright (c) OpenMMLab. All rights reserved. import pytest import torch from torch import nn as nn def test_chamfer_disrance(): from mmdet3d.models.losses import ChamferDistance, chamfer_distance with pytest.raises(AssertionError): # test invalid mode ChamferDistance(mode='smoothl1') ...
4,738
41.3125
79
py
RoboBEV
RoboBEV-master/zoo/BEVDet/tests/test_metrics/test_seg_eval.py
# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import pytest import torch from mmdet3d.core.evaluation.seg_eval import seg_eval def test_indoor_eval(): if not torch.cuda.is_available(): pytest.skip() seg_preds = [ torch.Tensor([ 0, 0, 1, 0, 0, 2, 1, 3, 1, 2, 1,...
1,086
26.175
79
py
RoboBEV
RoboBEV-master/zoo/BEVDet/tests/test_metrics/test_indoor_eval.py
# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import pytest import torch from mmdet3d.core.evaluation.indoor_eval import average_precision, indoor_eval def test_indoor_eval(): if not torch.cuda.is_available(): pytest.skip() from mmdet3d.core.bbox.structures import Box3DMode, Dept...
6,630
34.084656
79
py
RoboBEV
RoboBEV-master/zoo/BEVDet/configs/bevdet4d/bevdet4d-r50.py
# Copyright (c) Phigent Robotics. All rights reserved. _base_ = ['../_base_/datasets/nus-3d.py', '../_base_/default_runtime.py'] # Global # If point cloud range is changed, the models should also change their point # cloud range accordingly point_cloud_range = [-51.2, -51.2, -5.0, 51.2, 51.2, 3.0] # For nuSc...
9,966
35.509158
91
py
RoboBEV
RoboBEV-master/zoo/BEVDet/configs/fcos3d/fcos3d_r101_caffe_fpn_gn-head_dcn_2x8_1x_nus-mono3d_finetune.py
_base_ = './fcos3d_r101_caffe_fpn_gn-head_dcn_2x8_1x_nus-mono3d.py' # model settings model = dict( train_cfg=dict( code_weight=[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.05, 0.05])) # optimizer optimizer = dict(lr=0.001) load_from = 'work_dirs/fcos3d_nus/latest.pth'
274
29.555556
69
py
RoboBEV
RoboBEV-master/zoo/BEVDet/configs/imvotenet/imvotenet_stage2_16x8_sunrgbd-3d-10class.py
_base_ = [ '../_base_/datasets/sunrgbd-3d-10class.py', '../_base_/schedules/schedule_3x.py', '../_base_/default_runtime.py', '../_base_/models/imvotenet_image.py' ] class_names = ('bed', 'table', 'sofa', 'chair', 'toilet', 'desk', 'dresser', 'night_stand', 'bookshelf', 'bathtub') # use caff...
9,238
34.398467
225
py
RoboBEV
RoboBEV-master/zoo/BEVDet/configs/imvotenet/imvotenet_faster_rcnn_r50_fpn_2x4_sunrgbd-3d-10class.py
_base_ = [ '../_base_/datasets/sunrgbd-3d-10class.py', '../_base_/default_runtime.py', '../_base_/models/imvotenet_image.py' ] # use caffe img_norm img_norm_cfg = dict( mean=[103.530, 116.280, 123.675], std=[1.0, 1.0, 1.0], to_rgb=False) train_pipeline = [ dict(type='LoadImageFromFile'), dict(type...
1,986
32.677966
227
py
RoboBEV
RoboBEV-master/zoo/BEVDet/configs/nuimages/mask_rcnn_r50_caffe_fpn_1x_nuim.py
_base_ = [ '../_base_/models/mask_rcnn_r50_fpn.py', '../_base_/datasets/nuim_instance.py', '../_base_/schedules/mmdet_schedule_1x.py', '../_base_/default_runtime.py' ] model = dict( pretrained='open-mmlab://detectron2/resnet50_caffe', backbone=dict(norm_cfg=dict(requires_grad=False), style='caffe'),...
1,636
33.829787
78
py
RoboBEV
RoboBEV-master/zoo/BEVDet/configs/nuimages/mask_rcnn_r50_caffe_fpn_coco-3x_20e_nuim.py
_base_ = [ '../_base_/models/mask_rcnn_r50_fpn.py', '../_base_/datasets/nuim_instance.py', '../_base_/schedules/mmdet_schedule_1x.py', '../_base_/default_runtime.py' ] model = dict( pretrained='open-mmlab://detectron2/resnet50_caffe', backbone=dict(norm_cfg=dict(requires_grad=False), style='caffe'),...
1,945
35.716981
227
py
RoboBEV
RoboBEV-master/zoo/BEVDet/configs/nuimages/mask_rcnn_r50_caffe_fpn_coco-3x_1x_nuim.py
_base_ = [ '../_base_/models/mask_rcnn_r50_fpn.py', '../_base_/datasets/nuim_instance.py', '../_base_/schedules/mmdet_schedule_1x.py', '../_base_/default_runtime.py' ] model = dict( pretrained='open-mmlab://detectron2/resnet50_caffe', backbone=dict(norm_cfg=dict(requires_grad=False), style='caffe'),...
1,866
37.102041
228
py
RoboBEV
RoboBEV-master/zoo/BEVDet/configs/nuimages/htc_without_semantic_r50_fpn_1x_nuim.py
_base_ = [ '../_base_/datasets/nuim_instance.py', '../_base_/schedules/mmdet_schedule_1x.py', '../_base_/default_runtime.py' ] # model settings model = dict( type='HybridTaskCascade', pretrained='torchvision://resnet50', backbone=dict( type='ResNet', depth=50, num_stages=4, ...
7,693
33.657658
79
py
RoboBEV
RoboBEV-master/zoo/BEVDet/configs/nuimages/mask_rcnn_x101_32x4d_fpn_1x_nuim.py
_base_ = './mask_rcnn_r50_fpn_1x_nuim.py' model = dict( pretrained='open-mmlab://resnext101_32x4d', backbone=dict( type='ResNeXt', depth=101, groups=32, base_width=4, num_stages=4, out_indices=(0, 1, 2, 3), frozen_stages=1, norm_cfg=dict(type='BN',...
368
25.357143
53
py
RoboBEV
RoboBEV-master/zoo/BEVDet/configs/nuimages/mask_rcnn_r101_fpn_1x_nuim.py
_base_ = './mask_rcnn_r50_fpn_1x_nuim.py' model = dict(pretrained='torchvision://resnet101', backbone=dict(depth=101))
119
39
76
py
RoboBEV
RoboBEV-master/zoo/BEVDet/configs/nuimages/cascade_mask_rcnn_r101_fpn_1x_nuim.py
_base_ = './cascade_mask_rcnn_r50_fpn_1x_nuim.py' model = dict(pretrained='torchvision://resnet101', backbone=dict(depth=101))
127
41.666667
76
py
RoboBEV
RoboBEV-master/zoo/BEVDet/configs/nuimages/cascade_mask_rcnn_x101_32x4d_fpn_1x_nuim.py
_base_ = './cascade_mask_rcnn_r50_fpn_1x_nuim.py' model = dict( pretrained='open-mmlab://resnext101_32x4d', backbone=dict( type='ResNeXt', depth=101, groups=32, base_width=4, num_stages=4, out_indices=(0, 1, 2, 3), frozen_stages=1, norm_cfg=dict(ty...
376
25.928571
53
py
RoboBEV
RoboBEV-master/zoo/BEVDet/configs/nuimages/htc_x101_64x4d_fpn_dconv_c3-c5_coco-20e_16x1_20e_nuim.py
_base_ = './htc_r50_fpn_1x_nuim.py' model = dict( pretrained='open-mmlab://resnext101_64x4d', backbone=dict( type='ResNeXt', depth=101, groups=64, base_width=4, num_stages=4, out_indices=(0, 1, 2, 3), frozen_stages=1, norm_cfg=dict(type='BN', requi...
859
34.833333
218
py
RoboBEV
RoboBEV-master/zoo/BEVDet/configs/regnet/hv_pointpillars_regnet-400mf_fpn_sbn-all_4x8_2x_nus-3d.py
_base_ = [ '../_base_/models/hv_pointpillars_fpn_nus.py', '../_base_/datasets/nus-3d.py', '../_base_/schedules/schedule_2x.py', '../_base_/default_runtime.py', ] # model settings model = dict( type='MVXFasterRCNN', pts_backbone=dict( _delete_=True, type='NoStemRegNet', ar...
793
30.76
79
py
RoboBEV
RoboBEV-master/zoo/BEVDet/configs/regnet/hv_pointpillars_regnet-400mf_fpn_sbn-all_2x8_2x_lyft-3d.py
_base_ = [ '../_base_/models/hv_pointpillars_fpn_lyft.py', '../_base_/datasets/lyft-3d.py', '../_base_/schedules/schedule_2x.py', '../_base_/default_runtime.py', ] # model settings model = dict( type='MVXFasterRCNN', pts_backbone=dict( _delete_=True, type='NoStemRegNet', ...
795
30.84
79
py
RoboBEV
RoboBEV-master/zoo/BEVDet/configs/regnet/hv_pointpillars_regnet-400mf_fpn_sbn-all_range100_2x8_2x_lyft-3d.py
_base_ = [ '../_base_/models/hv_pointpillars_fpn_range100_lyft.py', '../_base_/datasets/range100_lyft-3d.py', '../_base_/schedules/schedule_2x.py', '../_base_/default_runtime.py', ] # model settings model = dict( type='MVXFasterRCNN', pts_backbone=dict( _delete_=True, type='NoSte...
813
31.56
79
py
RoboBEV
RoboBEV-master/zoo/BEVDet/configs/regnet/hv_pointpillars_regnet-1.6gf_fpn_sbn-all_4x8_2x_nus-3d.py
_base_ = [ '../_base_/models/hv_pointpillars_fpn_nus.py', '../_base_/datasets/nus-3d.py', '../_base_/schedules/schedule_2x.py', '../_base_/default_runtime.py', ] # model settings model = dict( type='MVXFasterRCNN', pts_backbone=dict( _delete_=True, type='NoStemRegNet', ar...
744
28.8
72
py
RoboBEV
RoboBEV-master/zoo/BEVDet/configs/mvxnet/dv_mvx-fpn_second_secfpn_adamw_2x8_80e_kitti-3d-3class.py
_base_ = ['../_base_/schedules/cosine.py', '../_base_/default_runtime.py'] # model settings voxel_size = [0.05, 0.05, 0.1] point_cloud_range = [0, -40, -3, 70.4, 40, 1] model = dict( type='DynamicMVXFasterRCNN', img_backbone=dict( type='ResNet', depth=50, num_stages=4, out_indi...
8,599
33.126984
193
py
RoboBEV
RoboBEV-master/zoo/BEVDet/configs/robust_test/bevdet-r101-fcos-pretrain.py
# Copyright (c) Phigent Robotics. All rights reserved. _base_ = ['../_base_/datasets/nus-3d.py', '../_base_/default_runtime.py'] # Global # If point cloud range is changed, the models should also change their point # cloud range accordingly point_cloud_range = [-51.2, -51.2, -5.0, 51.2, 51.2, 3.0] # For nuSc...
9,501
33.552727
117
py
RoboBEV
RoboBEV-master/zoo/BEVDet/configs/robust_test/bevdet-r50.py
# Copyright (c) Phigent Robotics. All rights reserved. _base_ = ['../_base_/datasets/nus-3d.py', '../_base_/default_runtime.py'] # Global # If point cloud range is changed, the models should also change their point # cloud range accordingly point_cloud_range = [-51.2, -51.2, -5.0, 51.2, 51.2, 3.0] # For nuSc...
9,346
34.139098
190
py
RoboBEV
RoboBEV-master/zoo/BEVDet/configs/robust_test/bevdet-r101.py
# Copyright (c) Phigent Robotics. All rights reserved. _base_ = ['../_base_/datasets/nus-3d.py', '../_base_/default_runtime.py'] # Global # If point cloud range is changed, the models should also change their point # cloud range accordingly point_cloud_range = [-51.2, -51.2, -5.0, 51.2, 51.2, 3.0] # For nuSc...
9,042
34.18677
117
py
RoboBEV
RoboBEV-master/zoo/BEVDet/configs/robust_test/bevdepth-r50.py
# Copyright (c) Phigent Robotics. All rights reserved. _base_ = ['../_base_/datasets/nus-3d.py', '../_base_/default_runtime.py'] # Global # If point cloud range is changed, the models should also change their point # cloud range accordingly point_cloud_range = [-51.2, -51.2, -5.0, 51.2, 51.2, 3.0] # For nuSc...
10,130
35.053381
190
py
RoboBEV
RoboBEV-master/zoo/BEVDet/configs/robust_test/bevdet-r101-fcos-pretrain-coslr.py
# Copyright (c) Phigent Robotics. All rights reserved. _base_ = ['../_base_/datasets/nus-3d.py', '../_base_/default_runtime.py'] # Global # If point cloud range is changed, the models should also change their point # cloud range accordingly point_cloud_range = [-51.2, -51.2, -5.0, 51.2, 51.2, 3.0] # For nuSc...
10,337
33.691275
117
py
RoboBEV
RoboBEV-master/zoo/BEVDet/configs/bevdepth/bevdepth-r50.py
# Copyright (c) Phigent Robotics. All rights reserved. _base_ = ['../_base_/datasets/nus-3d.py', '../_base_/default_runtime.py'] # Global # If point cloud range is changed, the models should also change their point # cloud range accordingly point_cloud_range = [-51.2, -51.2, -5.0, 51.2, 51.2, 3.0] # For nuSc...
9,892
34.458781
190
py
RoboBEV
RoboBEV-master/zoo/BEVDet/configs/bevdepth/bevdepth-r101-fcos-pretrain.py
# Copyright (c) Phigent Robotics. All rights reserved. _base_ = ['../_base_/datasets/nus-3d.py', '../_base_/default_runtime.py'] # Global # If point cloud range is changed, the models should also change their point # cloud range accordingly point_cloud_range = [-51.2, -51.2, -5.0, 51.2, 51.2, 3.0] # For nuSc...
9,442
35.041985
92
py
RoboBEV
RoboBEV-master/zoo/BEVDet/configs/bevdepth/bevdepth4d-r50.py
# Copyright (c) Phigent Robotics. All rights reserved. _base_ = ['../_base_/datasets/nus-3d.py', '../_base_/default_runtime.py'] # Global # If point cloud range is changed, the models should also change their point # cloud range accordingly point_cloud_range = [-51.2, -51.2, -5.0, 51.2, 51.2, 3.0] # For nuSc...
10,596
36.182456
103
py
RoboBEV
RoboBEV-master/zoo/BEVDet/configs/bevdepth/bevdepth-r101.py
# Copyright (c) Phigent Robotics. All rights reserved. _base_ = ['../_base_/datasets/nus-3d.py', '../_base_/default_runtime.py'] # Global # If point cloud range is changed, the models should also change their point # cloud range accordingly point_cloud_range = [-51.2, -51.2, -5.0, 51.2, 51.2, 3.0] # For nuSc...
9,241
34.683398
92
py
RoboBEV
RoboBEV-master/zoo/BEVDet/configs/_base_/models/cascade_mask_rcnn_r50_fpn.py
# model settings model = dict( type='CascadeRCNN', pretrained='torchvision://resnet50', backbone=dict( type='ResNet', depth=50, num_stages=4, out_indices=(0, 1, 2, 3), frozen_stages=1, norm_cfg=dict(type='BN', requires_grad=True), norm_eval=True, ...
6,976
33.711443
79
py
RoboBEV
RoboBEV-master/zoo/BEVDet/configs/_base_/models/mask_rcnn_r50_fpn.py
# model settings model = dict( type='MaskRCNN', pretrained='torchvision://resnet50', backbone=dict( type='ResNet', depth=50, num_stages=4, out_indices=(0, 1, 2, 3), frozen_stages=1, norm_cfg=dict(type='BN', requires_grad=True), norm_eval=True, ...
4,080
31.648
78
py
RoboBEV
RoboBEV-master/zoo/BEVDet/configs/_base_/models/fcos3d.py
model = dict( type='FCOSMono3D', pretrained='open-mmlab://detectron2/resnet101_caffe', backbone=dict( type='ResNet', depth=101, num_stages=4, out_indices=(0, 1, 2, 3), frozen_stages=1, norm_cfg=dict(type='BN', requires_grad=False), norm_eval=True, ...
2,279
29.4
77
py
RoboBEV
RoboBEV-master/zoo/BEVDet/configs/_base_/models/imvotenet_image.py
model = dict( type='ImVoteNet', img_backbone=dict( type='ResNet', depth=50, num_stages=4, out_indices=(0, 1, 2, 3), frozen_stages=1, norm_cfg=dict(type='BN', requires_grad=False), norm_eval=True, style='caffe'), img_neck=dict( type='FPN...
3,563
31.697248
77
py
RoboBEV
RoboBEV-master/zoo/BEVDet/configs/_base_/schedules/cyclic_40e.py
# The schedule is usually used by models trained on KITTI dataset # The learning rate set in the cyclic schedule is the initial learning rate # rather than the max learning rate. Since the target_ratio is (10, 1e-4), # the learning rate will change from 0.0018 to 0.018, than go to 0.0018*1e-4 lr = 0.0018 # The optimiz...
1,572
48.15625
150
py
RoboBEV
RoboBEV-master/zoo/BEVDet/configs/imvoxelnet/imvoxelnet_4x8_kitti-3d-car.py
model = dict( type='ImVoxelNet', backbone=dict( type='ResNet', depth=50, num_stages=4, out_indices=(0, 1, 2, 3), frozen_stages=1, norm_cfg=dict(type='BN', requires_grad=False), norm_eval=True, init_cfg=dict(type='Pretrained', checkpoint='torchvisio...
5,125
30.838509
78
py
RoboBEV
RoboBEV-master/zoo/BEVDet/configs/free_anchor/hv_pointpillars_regnet-1.6gf_fpn_sbn-all_free-anchor_strong-aug_4x8_3x_nus-3d.py
_base_ = './hv_pointpillars_fpn_sbn-all_free-anchor_4x8_2x_nus-3d.py' model = dict( pts_backbone=dict( _delete_=True, type='NoStemRegNet', arch='regnetx_1.6gf', init_cfg=dict( type='Pretrained', checkpoint='open-mmlab://regnetx_1.6gf'), out_indices=(1, 2, 3), ...
2,504
34.28169
76
py
RoboBEV
RoboBEV-master/zoo/BEVDet/configs/free_anchor/hv_pointpillars_regnet-400mf_fpn_sbn-all_free-anchor_4x8_2x_nus-3d.py
_base_ = './hv_pointpillars_fpn_sbn-all_free-anchor_4x8_2x_nus-3d.py' model = dict( pts_backbone=dict( _delete_=True, type='NoStemRegNet', arch='regnetx_400mf', init_cfg=dict( type='Pretrained', checkpoint='open-mmlab://regnetx_400mf'), out_indices=(1, 2, 3), ...
593
30.263158
72
py
RoboBEV
RoboBEV-master/zoo/BEVDet/configs/free_anchor/hv_pointpillars_regnet-3.2gf_fpn_sbn-all_free-anchor_strong-aug_4x8_3x_nus-3d.py
_base_ = './hv_pointpillars_fpn_sbn-all_free-anchor_4x8_2x_nus-3d.py' model = dict( pts_backbone=dict( _delete_=True, type='NoStemRegNet', arch='regnetx_3.2gf', init_cfg=dict( type='Pretrained', checkpoint='open-mmlab://regnetx_3.2gf'), out_indices=(1, 2, 3), ...
2,503
34.267606
76
py
RoboBEV
RoboBEV-master/zoo/BEVDet/configs/free_anchor/hv_pointpillars_regnet-1.6gf_fpn_sbn-all_free-anchor_4x8_2x_nus-3d.py
_base_ = './hv_pointpillars_fpn_sbn-all_free-anchor_4x8_2x_nus-3d.py' model = dict( pts_backbone=dict( _delete_=True, type='NoStemRegNet', arch='regnetx_1.6gf', init_cfg=dict( type='Pretrained', checkpoint='open-mmlab://regnetx_1.6gf'), out_indices=(1, 2, 3), ...
594
30.315789
72
py
RoboBEV
RoboBEV-master/zoo/BEVDet/configs/free_anchor/hv_pointpillars_regnet-3.2gf_fpn_sbn-all_free-anchor_4x8_2x_nus-3d.py
_base_ = './hv_pointpillars_fpn_sbn-all_free-anchor_4x8_2x_nus-3d.py' model = dict( pts_backbone=dict( _delete_=True, type='NoStemRegNet', arch='regnetx_3.2gf', init_cfg=dict( type='Pretrained', checkpoint='open-mmlab://regnetx_3.2gf'), out_indices=(1, 2, 3), ...
595
30.368421
72
py
RoboBEV
RoboBEV-master/zoo/BEVDet/configs/bevdet/bevdet-r101-fcos-pretrain-cbgs-coslr.py
# Copyright (c) Phigent Robotics. All rights reserved. _base_ = ['../_base_/datasets/nus-3d.py', '../_base_/default_runtime.py'] # Global # If point cloud range is changed, the models should also change their point # cloud range accordingly point_cloud_range = [-51.2, -51.2, -5.0, 51.2, 51.2, 3.0] # For nuSc...
9,288
33.025641
92
py
RoboBEV
RoboBEV-master/zoo/BEVDet/configs/bevdet/bevdet-r101-fcos-pretrain.py
# Copyright (c) Phigent Robotics. All rights reserved. _base_ = ['../_base_/datasets/nus-3d.py', '../_base_/default_runtime.py'] # Global # If point cloud range is changed, the models should also change their point # cloud range accordingly point_cloud_range = [-51.2, -51.2, -5.0, 51.2, 51.2, 3.0] # For nuSc...
9,158
33.562264
92
py
RoboBEV
RoboBEV-master/zoo/BEVDet/configs/bevdet/bevdet-r50.py
# Copyright (c) Phigent Robotics. All rights reserved. _base_ = ['../_base_/datasets/nus-3d.py', '../_base_/default_runtime.py'] # Global # If point cloud range is changed, the models should also change their point # cloud range accordingly point_cloud_range = [-51.2, -51.2, -5.0, 51.2, 51.2, 3.0] # For nuSc...
9,133
33.598485
190
py
RoboBEV
RoboBEV-master/zoo/BEVDet/configs/bevdet/bevdet-r101-dcn-wo-pretrain.py
# Copyright (c) Phigent Robotics. All rights reserved. _base_ = ['../_base_/datasets/nus-3d.py', '../_base_/default_runtime.py'] # Global # If point cloud range is changed, the models should also change their point # cloud range accordingly point_cloud_range = [-51.2, -51.2, -5.0, 51.2, 51.2, 3.0] # For nuSc...
9,295
33.051282
92
py
RoboBEV
RoboBEV-master/zoo/BEVDet/configs/bevdet/bevdet-r101.py
# Copyright (c) Phigent Robotics. All rights reserved. _base_ = ['../_base_/datasets/nus-3d.py', '../_base_/default_runtime.py'] # Global # If point cloud range is changed, the models should also change their point # cloud range accordingly point_cloud_range = [-51.2, -51.2, -5.0, 51.2, 51.2, 3.0] # For nuSc...
8,836
33.654902
92
py
RoboBEV
RoboBEV-master/zoo/BEVDet/configs/ssn/hv_ssn_regnet-400mf_secfpn_sbn-all_2x16_2x_nus-3d.py
_base_ = './hv_ssn_secfpn_sbn-all_2x16_2x_nus-3d.py' # model settings model = dict( type='MVXFasterRCNN', pts_backbone=dict( _delete_=True, type='NoStemRegNet', arch=dict(w0=24, wa=24.48, wm=2.54, group_w=16, depth=22, bot_mul=1.0), init_cfg=dict( type='Pretrained', c...
668
32.45
79
py
RoboBEV
RoboBEV-master/zoo/BEVDet/configs/ssn/hv_ssn_regnet-400mf_secfpn_sbn-all_1x16_2x_lyft-3d.py
_base_ = './hv_ssn_secfpn_sbn-all_2x16_2x_lyft-3d.py' # model settings model = dict( type='MVXFasterRCNN', pts_backbone=dict( _delete_=True, type='NoStemRegNet', arch=dict(w0=24, wa=24.48, wm=2.54, group_w=16, depth=22, bot_mul=1.0), init_cfg=dict( type='Pretrained', ...
738
32.590909
79
py
RoboBEV
RoboBEV-master/zoo/BEVDet/docs/conf.py
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
6,403
31.02
79
py
RoboBEV
RoboBEV-master/zoo/BEVDet/mmdet3d/apis/inference.py
# Copyright (c) OpenMMLab. All rights reserved. import mmcv import numpy as np import re import torch from copy import deepcopy from mmcv.parallel import collate, scatter from mmcv.runner import load_checkpoint from os import path as osp from mmdet3d.core import (Box3DMode, CameraInstance3DBoxes, ...
16,723
33.0611
79
py
RoboBEV
RoboBEV-master/zoo/BEVDet/mmdet3d/apis/test.py
# Copyright (c) OpenMMLab. All rights reserved. import mmcv import torch from mmcv.image import tensor2imgs from os import path as osp from mmdet3d.models import (Base3DDetector, Base3DSegmentor, SingleStageMono3DDetector) def single_gpu_test(model, data_loader, ...
3,108
35.576471
78
py
RoboBEV
RoboBEV-master/zoo/BEVDet/mmdet3d/core/evaluation/seg_eval.py
# Copyright (c) OpenMMLab. All rights reserved. import numpy as np from mmcv.utils import print_log from terminaltables import AsciiTable def fast_hist(preds, labels, num_classes): """Compute the confusion matrix for every batch. Args: preds (np.ndarray): Prediction labels of points with shape of ...
3,743
27.363636
78
py
RoboBEV
RoboBEV-master/zoo/BEVDet/mmdet3d/core/evaluation/indoor_eval.py
# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import torch from mmcv.utils import print_log from terminaltables import AsciiTable def average_precision(recalls, precisions, mode='area'): """Calculate average precision (for single or multiple scales). Args: recalls (np.ndarray): R...
11,085
34.646302
79
py
RoboBEV
RoboBEV-master/zoo/BEVDet/mmdet3d/core/evaluation/kitti_utils/rotate_iou.py
# Copyright (c) OpenMMLab. All rights reserved. ##################### # Based on https://github.com/hongzhenwang/RRPN-revise # Licensed under The MIT License # Author: yanyan, scrin@foxmail.com ##################### import math import numba import numpy as np from numba import cuda @numba.jit(nopython=True) def div_u...
13,315
34.042105
79
py
RoboBEV
RoboBEV-master/zoo/BEVDet/mmdet3d/core/post_processing/merge_augs.py
# Copyright (c) OpenMMLab. All rights reserved. import torch from mmdet3d.ops.iou3d.iou3d_utils import nms_gpu, nms_normal_gpu from ..bbox import bbox3d2result, bbox3d_mapping_back, xywhr2xyxyr def merge_aug_bboxes_3d(aug_results, img_metas, test_cfg): """Merge augmented detection 3D bboxes and scores. Args...
3,495
36.591398
78
py
RoboBEV
RoboBEV-master/zoo/BEVDet/mmdet3d/core/post_processing/box3d_nms.py
# Copyright (c) OpenMMLab. All rights reserved. import numba import numpy as np import torch from mmdet3d.ops.iou3d.iou3d_utils import nms_gpu, nms_normal_gpu def box3d_multiclass_nms(mlvl_bboxes, mlvl_bboxes_for_nms, mlvl_scores, score_thr, ...
8,007
35.235294
77
py
RoboBEV
RoboBEV-master/zoo/BEVDet/mmdet3d/core/bbox/box_np_ops.py
# Copyright (c) OpenMMLab. All rights reserved. # TODO: clean the functions in this file and move the APIs into box structures # in the future import numba import numpy as np def camera_to_lidar(points, r_rect, velo2cam): """Convert points in camera coordinate to lidar coordinate. Args: points (np.n...
33,537
36.389075
79
py
RoboBEV
RoboBEV-master/zoo/BEVDet/mmdet3d/core/bbox/transforms.py
# Copyright (c) OpenMMLab. All rights reserved. import torch def bbox3d_mapping_back(bboxes, scale_factor, flip_horizontal, flip_vertical): """Map bboxes from testing scale to original image scale. Args: bboxes (:obj:`BaseInstance3DBoxes`): Boxes to be mapped back. scale_factor (float): Scale...
2,414
30.363636
78
py
RoboBEV
RoboBEV-master/zoo/BEVDet/mmdet3d/core/bbox/iou_calculators/iou3d_calculator.py
# Copyright (c) OpenMMLab. All rights reserved. import torch from mmdet.core.bbox import bbox_overlaps from mmdet.core.bbox.iou_calculators.builder import IOU_CALCULATORS from ..structures import get_box_type @IOU_CALCULATORS.register_module() class BboxOverlapsNearest3D(object): """Nearest 3D IoU Calculator. ...
12,522
37.891304
79
py
RoboBEV
RoboBEV-master/zoo/BEVDet/mmdet3d/core/bbox/samplers/iou_neg_piecewise_sampler.py
# Copyright (c) OpenMMLab. All rights reserved. import torch from mmdet.core.bbox.builder import BBOX_SAMPLERS from . import RandomSampler, SamplingResult @BBOX_SAMPLERS.register_module() class IoUNegPiecewiseSampler(RandomSampler): """IoU Piece-wise Sampling. Sampling negtive proposals according to a list ...
6,861
42.157233
79
py
RoboBEV
RoboBEV-master/zoo/BEVDet/mmdet3d/core/bbox/coders/anchor_free_bbox_coder.py
# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import torch from mmdet.core.bbox.builder import BBOX_CODERS from .partial_bin_based_bbox_coder import PartialBinBasedBBoxCoder @BBOX_CODERS.register_module() class AnchorFreeBBoxCoder(PartialBinBasedBBoxCoder): """Anchor free bbox coder for 3D b...
4,367
32.343511
79
py
RoboBEV
RoboBEV-master/zoo/BEVDet/mmdet3d/core/bbox/coders/groupfree3d_bbox_coder.py
# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import torch from mmdet.core.bbox.builder import BBOX_CODERS from .partial_bin_based_bbox_coder import PartialBinBasedBBoxCoder @BBOX_CODERS.register_module() class GroupFree3DBBoxCoder(PartialBinBasedBBoxCoder): """Modified partial bin based bbo...
7,202
36.712042
79
py
RoboBEV
RoboBEV-master/zoo/BEVDet/mmdet3d/core/bbox/coders/delta_xyzwhlr_bbox_coder.py
# Copyright (c) OpenMMLab. All rights reserved. import torch from mmdet.core.bbox import BaseBBoxCoder from mmdet.core.bbox.builder import BBOX_CODERS @BBOX_CODERS.register_module() class DeltaXYZWLHRBBoxCoder(BaseBBoxCoder): """Bbox Coder for 3D boxes. Args: code_size (int): The dimension of boxes ...
3,122
32.945652
78
py
RoboBEV
RoboBEV-master/zoo/BEVDet/mmdet3d/core/bbox/coders/centerpoint_bbox_coders.py
# Copyright (c) OpenMMLab. All rights reserved. import torch from mmdet.core.bbox import BaseBBoxCoder from mmdet.core.bbox.builder import BBOX_CODERS @BBOX_CODERS.register_module() class CenterPointBBoxCoder(BaseBBoxCoder): """Bbox coder for CenterPoint. Args: pc_range (list[float]): Range of point...
8,591
36.519651
78
py
RoboBEV
RoboBEV-master/zoo/BEVDet/mmdet3d/core/bbox/coders/partial_bin_based_bbox_coder.py
# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import torch from mmdet.core.bbox import BaseBBoxCoder from mmdet.core.bbox.builder import BBOX_CODERS @BBOX_CODERS.register_module() class PartialBinBasedBBoxCoder(BaseBBoxCoder): """Partial bin based bbox coder. Args: num_dir_bins ...
9,146
36.797521
79
py
RoboBEV
RoboBEV-master/zoo/BEVDet/mmdet3d/core/bbox/structures/depth_box3d.py
# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import torch from mmdet3d.core.points import BasePoints from mmdet3d.ops import points_in_boxes_batch from .base_box3d import BaseInstance3DBoxes from .utils import limit_period, rotation_3d_in_axis class DepthInstance3DBoxes(BaseInstance3DBoxes): ...
13,666
38.729651
79
py
RoboBEV
RoboBEV-master/zoo/BEVDet/mmdet3d/core/bbox/structures/cam_box3d.py
# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import torch from mmdet3d.core.points import BasePoints from .base_box3d import BaseInstance3DBoxes from .utils import limit_period, rotation_3d_in_axis class CameraInstance3DBoxes(BaseInstance3DBoxes): """3D boxes of instances in CAM coordinates...
12,716
38.129231
79
py
RoboBEV
RoboBEV-master/zoo/BEVDet/mmdet3d/core/bbox/structures/base_box3d.py
# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import torch from abc import abstractmethod from mmdet3d.ops.iou3d import iou3d_cuda from .utils import limit_period, xywhr2xyxyr class BaseInstance3DBoxes(object): """Base class for 3D Boxes. Note: The box is bottom centered, i.e. t...
16,502
34.720779
79
py
RoboBEV
RoboBEV-master/zoo/BEVDet/mmdet3d/core/bbox/structures/utils.py
# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import torch from logging import warning def limit_period(val, offset=0.5, period=np.pi): """Limit the value into a period for periodic function. Args: val (torch.Tensor): The value to be converted. offset (float, optional): O...
7,682
34.734884
131
py
RoboBEV
RoboBEV-master/zoo/BEVDet/mmdet3d/core/bbox/structures/box_3d_mode.py
# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import torch from enum import IntEnum, unique from .base_box3d import BaseInstance3DBoxes from .cam_box3d import CameraInstance3DBoxes from .depth_box3d import DepthInstance3DBoxes from .lidar_box3d import LiDARInstance3DBoxes @unique class Box3DMode...
6,034
35.137725
79
py
RoboBEV
RoboBEV-master/zoo/BEVDet/mmdet3d/core/bbox/structures/lidar_box3d.py
# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import torch from mmdet3d.core.points import BasePoints from mmdet3d.ops.roiaware_pool3d import points_in_boxes_gpu from .base_box3d import BaseInstance3DBoxes from .utils import limit_period, rotation_3d_in_axis class LiDARInstance3DBoxes(BaseInstan...
10,528
37.852399
79
py
RoboBEV
RoboBEV-master/zoo/BEVDet/mmdet3d/core/bbox/structures/coord_3d_mode.py
# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import torch from enum import IntEnum, unique from mmdet3d.core.points import (BasePoints, CameraPoints, DepthPoints, LiDARPoints) from .base_box3d import BaseInstance3DBoxes from .cam_box3d import CameraInstance3DBoxes...
10,929
37.758865
79
py
RoboBEV
RoboBEV-master/zoo/BEVDet/mmdet3d/core/points/cam_points.py
# Copyright (c) OpenMMLab. All rights reserved. from .base_points import BasePoints class CameraPoints(BasePoints): """Points of instances in CAM coordinates. Args: tensor (torch.Tensor | np.ndarray | list): a N x points_dim matrix. points_dim (int): Number of the dimension of a point. ...
2,866
39.380282
76
py
RoboBEV
RoboBEV-master/zoo/BEVDet/mmdet3d/core/points/base_points.py
# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import torch import warnings from abc import abstractmethod class BasePoints(object): """Base class for Points. Args: tensor (torch.Tensor | np.ndarray | list): a N x points_dim matrix. points_dim (int): Number of the dimensio...
16,655
37.114416
79
py
RoboBEV
RoboBEV-master/zoo/BEVDet/mmdet3d/core/points/lidar_points.py
# Copyright (c) OpenMMLab. All rights reserved. from .base_points import BasePoints class LiDARPoints(BasePoints): """Points of instances in LIDAR coordinates. Args: tensor (torch.Tensor | np.ndarray | list): a N x points_dim matrix. points_dim (int): Number of the dimension of a point. ...
2,868
39.408451
76
py
RoboBEV
RoboBEV-master/zoo/BEVDet/mmdet3d/core/points/depth_points.py
# Copyright (c) OpenMMLab. All rights reserved. from .base_points import BasePoints class DepthPoints(BasePoints): """Points of instances in DEPTH coordinates. Args: tensor (torch.Tensor | np.ndarray | list): a N x points_dim matrix. points_dim (int): Number of the dimension of a point. ...
2,868
39.408451
76
py
RoboBEV
RoboBEV-master/zoo/BEVDet/mmdet3d/core/utils/gaussian.py
# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import torch def gaussian_2d(shape, sigma=1): """Generate gaussian map. Args: shape (list[int]): Shape of the map. sigma (float): Sigma to generate gaussian map. Defaults to 1. Returns: np.ndarray: Gen...
2,538
28.183908
74
py
RoboBEV
RoboBEV-master/zoo/BEVDet/mmdet3d/core/visualizer/open3d_vis.py
# Copyright (c) OpenMMLab. All rights reserved. import copy import numpy as np import torch try: import open3d as o3d from open3d import geometry except ImportError: raise ImportError( 'Please run "pip install open3d" to install open3d first.') def _draw_points(points, vis, ...
17,728
38.93018
79
py
RoboBEV
RoboBEV-master/zoo/BEVDet/mmdet3d/core/visualizer/image_vis.py
# Copyright (c) OpenMMLab. All rights reserved. import copy import cv2 import numpy as np import torch from matplotlib import pyplot as plt def project_pts_on_img(points, raw_img, lidar2img_rt, max_distance=70, thickness=-1): ...
7,761
38.005025
79
py
RoboBEV
RoboBEV-master/zoo/BEVDet/mmdet3d/core/anchor/anchor_3d_generator.py
# Copyright (c) OpenMMLab. All rights reserved. import mmcv import torch from mmdet.core.anchor import ANCHOR_GENERATORS @ANCHOR_GENERATORS.register_module() class Anchor3DRangeGenerator(object): """3D Anchor Generator by range. This anchor generator generates anchors by the given range in different fea...
17,177
41.414815
79
py