OpenRobotLab / EmbodiedScan

[CVPR 2024] EmbodiedScan: A Holistic Multi-Modal 3D Perception Suite Towards Embodied AI
https://tai-wang.github.io/embodiedscan/
Apache License 2.0
449 stars 34 forks source link

[Bug] Faided to run demo.py using pretrained models. #67

Closed fediel closed 1 week ago

fediel commented 3 weeks ago

Prerequisite

Task

I'm using the official example scripts/configs for the officially supported tasks/models/datasets.

Branch

main branch https://github.com/open-mmlab/mmdetection3d

Environment

pip install torch==1.10.1+cu111 torchvision==0.11.2+cu111 torchaudio==0.10.1 -f https://download.pytorch.org/whl/cu111/torch_stable.html

Reproduces the problem - code sample

with torch.no_grad(): results = model.test_step(collate_data)

is_occupancy = ('pred_occupancy' in results[0]) if is_occupancy: classes = ['empty'] + classes # 0 = empty for occupancy

filtered_results = [] if not is_occupancy: for i in range(len(results)): boxes, labels = nms_filter(results[i].pred_instances_3d) filtered_results.append((boxes, labels))

Reproduces the problem - command or script

python3 demo.py ../configs/detection/cont-det3d_8xb1_embodiedscan-3d-284class-9dof.py ../models/cont-3ddet.pth --root-dir openscan --scene office --device cuda:0

Reproduces the problem - error message

Traceback (most recent call last): File "demo.py", line 288, in main(args) File "demo.py", line 219, in main boxes, labels = nms_filter(results[i].pred_instances_3d) File "demo.py", line 105, in nms_filter iou = boxes.overlaps(boxes, boxes, eps=1e-5) File "/home/iro/EmbodiedScan/embodiedscan/structures/bbox_3d/eulerbox3d.py", line 134, in overlaps , iou3d = box3d_overlap(corners1, corners2, eps=eps) File "/home/iro/.conda/envs/embodiedscan/lib/python3.8/site-packages/pytorch3d/ops/iou_box3d.py", line 161, in box3d_overlap _check_nonzero(boxes1, eps) File "/home/iro/.conda/envs/embodiedscan/lib/python3.8/site-packages/pytorch3d/ops/iou_box3d.py", line 87, in _check_nonzero raise ValueError(msg) ValueError: Planes have zero areas

Additional information

mv-det3d is available, but the results from different scenarios are integrated into one image. test

mxh1999 commented 2 weeks ago

Please see #40 for help.