File size: 1,267 Bytes
686a8d4
 
 
 
 
 
 
 
 
 
 
 
 
 
753d600
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
---
library_name: mapdet3d
license: apache-2.0
pipeline_tag: object-detection
tags:
- arxiv:2608.12179
- model_hub_mixin
- object-detection
- pytorch_model_hub_mixin
---

This model has been pushed to the Hub using the [PytorchModelHubMixin](https://huggingface.co/docs/huggingface_hub/package_reference/mixins#huggingface_hub.PyTorchModelHubMixin) integration:
- Code: https://github.com/cvg/Map-Det3D
- Paper: https://arxiv.org/abs/2608.12179

Usage:

```python
import torch

from mapdet3d.model.mapdet3d import MapDet3D
from mapdet3d.op.mapdet3d.head import RoI2Det

device = "cuda" if torch.cuda.is_available() else "cpu"

# TF32
torch.backends.cuda.matmul.allow_tf32 = True
torch.backends.cudnn.allow_tf32 = True

torch.set_float32_matmul_precision("highest")

# Init model
model = MapDet3D.from_pretrained("RoyYang0714/Map-Det3D").to(device)

# (Optional) Enable tracking
model.track_whole_scene = True
model.roi2det = RoI2Det(nms=True, score_threshold=0.25, iou_threshold=0.5)

# Inference
model.eval()

with torch.no_grad():

with torch.autocast("cuda", enabled=True, dtype=torch.bfloat16):
    predictions: MapDet3DOut = model(
        images=[image],
        intrinsics=[intrinsics],
        extrinsics=[extrinsics],
        frame_ids=[frame_id],
    )
```