Upload second-multihead.nuscenes.openpcdet
Browse files- README.md +101 -0
- model.safetensors +3 -0
README.md
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
- nuscenes
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
# Model card for second-multihead.nuscenes.openpcdet
|
| 16 |
+
|
| 17 |
+
A SECOND 3D object detection model (sparse convolutional voxel detector). Trained on nuScenes.
|
| 18 |
+
|
| 19 |
+
## Model Details
|
| 20 |
+
|
| 21 |
+
- **Model Type:** 3D object detection
|
| 22 |
+
- **Model Stats:**
|
| 23 |
+
- Params (M): 9.0
|
| 24 |
+
- Input channels: 5
|
| 25 |
+
- Classes: 10
|
| 26 |
+
- Features: 512
|
| 27 |
+
- **Dataset:** nuScenes
|
| 28 |
+
- **Paper:** [SECOND: Sparsely Embedded Convolutional Detection](https://www.mdpi.com/1424-8220/18/10/3337)
|
| 29 |
+
- **Converted from:** [open-mmlab/OpenPCDet](https://github.com/open-mmlab/OpenPCDet) (Apache-2.0)
|
| 30 |
+
- **Library:** [torch-pointcloud](https://github.com/arthurdjn/pytorch-pointcloud)
|
| 31 |
+
|
| 32 |
+
## Install
|
| 33 |
+
|
| 34 |
+
```bash
|
| 35 |
+
pip install torch-pointcloud
|
| 36 |
+
```
|
| 37 |
+
|
| 38 |
+
## Usage
|
| 39 |
+
|
| 40 |
+
```python
|
| 41 |
+
import torch
|
| 42 |
+
import torch_pointcloud as tp
|
| 43 |
+
from torch_pointcloud.utils.data import collate
|
| 44 |
+
|
| 45 |
+
model, info = tp.create_model(
|
| 46 |
+
"second-multihead.nuscenes.openpcdet",
|
| 47 |
+
task="detection",
|
| 48 |
+
pretrained=True,
|
| 49 |
+
return_info=True,
|
| 50 |
+
)
|
| 51 |
+
model = model.cuda().eval() # GPU-only kernels
|
| 52 |
+
|
| 53 |
+
# synthetic sample with the keys a dataset provides
|
| 54 |
+
num_points = 8192
|
| 55 |
+
sample = {
|
| 56 |
+
"pos": torch.randn(num_points, 3),
|
| 57 |
+
"intensity": torch.rand(num_points, 1),
|
| 58 |
+
"timestamp": torch.zeros(num_points, 1),
|
| 59 |
+
}
|
| 60 |
+
data = info["transform"](sample)
|
| 61 |
+
data = collate([data], batch_from="pos_voxel")
|
| 62 |
+
data = {key: value.cuda() for key, value in data.items()}
|
| 63 |
+
|
| 64 |
+
with torch.no_grad():
|
| 65 |
+
out = model(data["voxel"], data["pos_voxel"], data["voxel_num_points"], data["batch"])
|
| 66 |
+
```
|
| 67 |
+
|
| 68 |
+
## Feature extraction
|
| 69 |
+
|
| 70 |
+
```python
|
| 71 |
+
with torch.no_grad():
|
| 72 |
+
features = model.forward_features(
|
| 73 |
+
data["voxel"],
|
| 74 |
+
data["pos_voxel"],
|
| 75 |
+
data["voxel_num_points"],
|
| 76 |
+
data["batch"],
|
| 77 |
+
) # 512 channels
|
| 78 |
+
```
|
| 79 |
+
|
| 80 |
+
## Citation
|
| 81 |
+
|
| 82 |
+
```bibtex
|
| 83 |
+
@article{yan2018second,
|
| 84 |
+
title = {{SECOND}: Sparsely Embedded Convolutional Detection},
|
| 85 |
+
author = {Yan, Yan and Mao, Yuxing and Li, Bo},
|
| 86 |
+
journal = {Sensors},
|
| 87 |
+
volume = {18},
|
| 88 |
+
number = {10},
|
| 89 |
+
pages = {3337},
|
| 90 |
+
year = {2018}
|
| 91 |
+
}
|
| 92 |
+
```
|
| 93 |
+
|
| 94 |
+
```bibtex
|
| 95 |
+
@inproceedings{caesar2020nuscenes,
|
| 96 |
+
title = {nuScenes: A multimodal dataset for autonomous driving},
|
| 97 |
+
author = {Holger Caesar and Varun Bankiti and Alex H. Lang and Sourabh Vora and Venice Erin Liong and Qiang Xu and Anush Krishnan and Yu Pan and Giancarlo Baldan and Oscar Beijbom},
|
| 98 |
+
booktitle = {CVPR},
|
| 99 |
+
year = {2020}
|
| 100 |
+
}
|
| 101 |
+
```
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0374f38a398c5f2a3e3b149715f215b7ecdbb1dbadb31d8ef2f179ddb07e722c
|
| 3 |
+
size 36250720
|