Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
3 tasks done
fediel opened this issue Aug 23, 2024 · 2 comments
Closed
3 tasks done

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

fediel opened this issue Aug 23, 2024 · 2 comments

Comments

@fediel
Copy link

fediel commented Aug 23, 2024

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/euler_box3d.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
Copy link
Collaborator

mxh1999 commented Aug 30, 2024

Please see #40 for help.

@Tai-Wang Tai-Wang closed this as completed Sep 5, 2024
@xjj1999
Copy link

xjj1999 commented Sep 19, 2024

请问为什么mv-det3d输出results的长度是1?我也碰到了这个问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants