arthurdjn commited on
Commit
769e873
·
verified ·
1 Parent(s): bb2cf76

Update README.md and config.json and model.safetensors for second.kitti.mmdet3d

Browse files
Files changed (3) hide show
  1. README.md +129 -0
  2. config.json +70 -0
  3. model.safetensors +3 -0
README.md ADDED
@@ -0,0 +1,129 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ library_name: torch-pointcloud
4
+ tags:
5
+ - point-cloud
6
+ - 3d
7
+ - pytorch
8
+ - torch-pointcloud
9
+ - second
10
+ - object-detection
11
+ datasets:
12
+ - kitti
13
+ model-index:
14
+ - name: second.kitti.mmdet3d
15
+ results:
16
+ - task:
17
+ type: 3d-object-detection
18
+ dataset:
19
+ name: KITTI
20
+ type: kitti
21
+ metrics:
22
+ - name: mAP
23
+ type: map
24
+ value: 65.55
25
+ - name: AP/Pedestrian
26
+ type: map
27
+ value: 52.94
28
+ - name: AP/Cyclist
29
+ type: map
30
+ value: 66.32
31
+ - name: AP/Car
32
+ type: map
33
+ value: 77.39
34
+ ---
35
+
36
+ # Model card for second.kitti.mmdet3d
37
+
38
+ A SECOND 3D object detection model (sparse convolutional voxel detector). Trained on KITTI.
39
+
40
+ ## Model Details
41
+
42
+ - **Model Type:** 3D object detection
43
+ - **Model Stats:**
44
+ - Params (M): 5.3
45
+ - Input channels: 4
46
+ - Classes: 3
47
+ - Features: 512
48
+ - **Dataset:** KITTI
49
+ - **Metrics:** mAP 65.55, AP/Pedestrian 52.94, AP/Cyclist 66.32, AP/Car 77.39
50
+ - **Paper:** [SECOND: Sparsely Embedded Convolutional Detection](https://www.mdpi.com/1424-8220/18/10/3337)
51
+ - **Converted from:** [open-mmlab/mmdetection3d](https://github.com/open-mmlab/mmdetection3d) (Apache-2.0)
52
+ - **Library:** [torch-pointcloud](https://github.com/arthurdjn/pytorch-pointcloud)
53
+
54
+ ## Install
55
+
56
+ ```bash
57
+ pip install torch-pointcloud
58
+ ```
59
+
60
+ This checkpoint also needs `spconv`, which needs a build matching your torch and CUDA: see the [installation guide](https://pytorch-pointcloud.org/latest/installation/).
61
+
62
+ ## Usage
63
+
64
+ ```python
65
+ import torch
66
+ import torch_pointcloud as tp
67
+ from torch_pointcloud.utils.data import collate
68
+
69
+ model, info = tp.create_model(
70
+ "second.kitti.mmdet3d",
71
+ pretrained=True,
72
+ return_info=True,
73
+ )
74
+ model = model.cuda().eval() # GPU-only kernels
75
+
76
+ # synthetic sample with the keys a dataset provides
77
+ num_points = 8192
78
+ sample = {
79
+ "pos": torch.randn(num_points, 3),
80
+ "intensity": torch.rand(num_points, 1),
81
+ }
82
+ data = info["transform"](sample)
83
+ data = collate([data], batch_from="pos_voxel")
84
+ data = {key: value.cuda() for key, value in data.items()}
85
+
86
+ with torch.no_grad():
87
+ out = model(data["voxel"], data["pos_voxel"], data["voxel_num_points"], data["batch"])
88
+ ```
89
+
90
+ ## Feature extraction
91
+
92
+ ```python
93
+ with torch.no_grad():
94
+ features = model.forward_features(
95
+ data["voxel"],
96
+ data["pos_voxel"],
97
+ data["voxel_num_points"],
98
+ data["batch"],
99
+ ) # 512 channels
100
+ ```
101
+
102
+ ## Citation
103
+
104
+ ```bibtex
105
+ @article{yan2018second,
106
+ title = {{SECOND}: Sparsely Embedded Convolutional Detection},
107
+ author = {Yan, Yan and Mao, Yuxing and Li, Bo},
108
+ journal = {Sensors},
109
+ volume = {18},
110
+ number = {10},
111
+ pages = {3337},
112
+ year = {2018}
113
+ }
114
+
115
+ @inproceedings{geiger2012kitti,
116
+ title = {Are we ready for Autonomous Driving? The {KITTI} Vision Benchmark Suite},
117
+ author = {Geiger, Andreas and Lenz, Philip and Urtasun, Raquel},
118
+ booktitle = {CVPR},
119
+ year = {2012}
120
+ }
121
+
122
+ @software{dujardin2026pytorchpointcloud,
123
+ author = {Arthur Dujardin},
124
+ title = {PyTorch PointCloud},
125
+ year = {2026},
126
+ doi = {10.5281/zenodo.22159632},
127
+ url = {https://github.com/arthurdjn/pytorch-pointcloud},
128
+ }
129
+ ```
config.json ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "library_name": "torch-pointcloud",
3
+ "name": "second.kitti.mmdet3d",
4
+ "task": "detection",
5
+ "hparams": {
6
+ "in_channels": 4,
7
+ "num_classes": 3,
8
+ "voxel_size": [
9
+ 0.05,
10
+ 0.05,
11
+ 0.1
12
+ ],
13
+ "point_cloud_range": [
14
+ 0.0,
15
+ -40.0,
16
+ -3.0,
17
+ 70.4,
18
+ 40.0,
19
+ 1.0
20
+ ],
21
+ "anchor_sizes": [
22
+ [
23
+ 0.8,
24
+ 0.6,
25
+ 1.73
26
+ ],
27
+ [
28
+ 1.76,
29
+ 0.6,
30
+ 1.73
31
+ ],
32
+ [
33
+ 3.9,
34
+ 1.6,
35
+ 1.56
36
+ ]
37
+ ],
38
+ "anchor_bottom_heights": [
39
+ -0.6,
40
+ -0.6,
41
+ -1.78
42
+ ],
43
+ "feature_map_stride": 8,
44
+ "dir_offset": -1.5707963267948966,
45
+ "norm_kwargs": {
46
+ "eps": 0.001,
47
+ "momentum": 0.01
48
+ }
49
+ },
50
+ "input_keys": [
51
+ "voxel",
52
+ "pos_voxel",
53
+ "voxel_num_points",
54
+ "batch_pos_voxel"
55
+ ],
56
+ "dataset": "kitti",
57
+ "metrics": {
58
+ "mAP": 65.55,
59
+ "AP/Pedestrian": 52.94,
60
+ "AP/Cyclist": 66.32,
61
+ "AP/Car": 77.39
62
+ },
63
+ "classes": [
64
+ "Pedestrian",
65
+ "Cyclist",
66
+ "Car"
67
+ ],
68
+ "author": "mmdet3d",
69
+ "license": "Apache-2.0"
70
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4c7171e9d9271b435a8d4ba002c85f0fa3b9eb29e0fd9425457b6be5947c3f51
3
+ size 21346712