-
Notifications
You must be signed in to change notification settings - Fork 297
Weird Result of running calculate_iou_partly #75
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
Comments
This function depends on Edit: This issue explains the problem:
|
@jhultman Thank you for your reply! |
@zwqnju I think it may require a lot of work to get the eval code from this repo to work on a custom dataset. Maybe you can consider using another implementation of mean average precision. Unfortunately, it seems most eval codebases available on github make strong assumptions about how your dataset is formatted, and they typically assume axis-aligned 2D IOU. If you convert the labels and detections to COCO format, you can use the pycocotools API to compute mAP, but you will have to patch the IOU part of the code to use rotated 3D IOU instead (for example with You can also try this implementation, but you will have to change the IOU part. I don't know if that repo is any good but it seems to be popular. Good luck! |
Very helpful. Thanks a lot! |
Running the following script:
import numpy as np
from det3d.datasets.utils.eval import calculate_iou_partly
fake_gt_annos = []
anno = {}
anno.update(
{
"name": np.array(['Car']),
"location": np.array([[0.0, 0.0, 0.0]]),
"dimensions": np.array([[1.0, 1.0, 1.0]]),
"rotation_y": np.array([np.pi/8]),
}
)
fake_gt_annos.append(anno)
rets = calculate_iou_partly(
fake_gt_annos, fake_gt_annos, metric=1, num_parts=1, z_axis=2, z_center=0.5
)
print(rets)
I got:
([array([[7.17528081e-09]])],
[array([[7.17528081e-09]])],
array([1]),
array([1]))
Why? I was using the same parameters of dt_annos and gt_annos when calling calculate_iou_partly, and I expect to get the overlap result = 1.
Is this a bug? Or I misunderstand something?
The text was updated successfully, but these errors were encountered: