open-mmlab / mmcv

OpenMMLab Computer Vision Foundation
https://mmcv.readthedocs.io/en/latest/
Apache License 2.0
5.84k stars 1.63k forks source link

[Bug] chamfer_distance Error in calculation result #3106

Closed Annarine closed 3 months ago

Annarine commented 4 months ago

Prerequisite

Environment

mmcv 2.1 torch 2.2.2 cuda version 12.2

Reproduces the problem - code sample

import mmcv import mmcv.ops import chamfer_distance xyz1 = torch.tensor([-0.5562, 0.7417]).cuda() xyz2 = torch.tensor([-4.1055, 5.8594]).cuda() result = chamfer_distance(xyz1, xyz2) print(result)

Reproduces the problem - command or script

python 执行代码

Reproduces the problem - error message

出现非预期结果 idx出现越界,dist出现错误值

Additional information

[38.7883],[38.7883],[0],[0]