-
Notifications
You must be signed in to change notification settings - Fork 722
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a small bug of rotate_iou_gpu: the iou between two same boxes can be
0, due to point_in_quadrilateral. A test demo is provided in test_nms_gpu.py.
- Loading branch information
Showing
2 changed files
with
21 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from nms_gpu import rotate_iou_gpu_eval | ||
import numpy as np | ||
|
||
def main(): | ||
boxes = np.array([ | ||
[0, 0, 1, 2., 0.1], | ||
[0, 0, .001, 2., 0.1], | ||
[0, 0, 0.1, 2., 0.5], | ||
[0, 0, 0.1, 2., -np.pi/2], | ||
]) | ||
|
||
ious = np.diag( rotate_iou_gpu_eval(boxes, boxes) ) | ||
print(f"ious: {ious}") | ||
#old: [0. 0. 0.33333316 0. ] | ||
#new: [1. 0.99998605 0.99999934 1. ] | ||
|
||
if __name__ == '__main__': | ||
main() |
cfdba39
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix a small bug of rotate_iou_gpu in second/core/non_max_suppression/nms_gpu.py