diff --git a/README.md b/README.md index 8f32eff..0420cc7 100644 --- a/README.md +++ b/README.md @@ -15,8 +15,8 @@ Complete but Unofficial PyTorch Implementation of [Complex-YOLO: Real-time 3D Ob #### Test [without downloading dataset] - 1. $ python test_detection.py --split=smaples --folder=sampledata - 2. $ python test_both_side_detection.py --split=smaples --folder=sampledata + 1. $ python test_detection.py --split=sample --folder=sampledata + 2. $ python test_both_side_detection.py --split=sample --folder=sampledata #### Demo Video [[Click to Play](https://www.youtube.com/watch?v=JzywsbuXFOg)] [![complex-yolov3_gif][complex-yolov3_gif]](https://youtu.be/JzywsbuXFOg) diff --git a/utils/utils.py b/utils/utils.py index 67d34a1..f9bc5b7 100644 --- a/utils/utils.py +++ b/utils/utils.py @@ -295,7 +295,8 @@ def non_max_suppression_rotated_bbox(prediction, conf_thres=0.95, nms_thres=0.4) while detections.size(0): #large_overlap = rotated_bbox_iou(detections[0, :6].unsqueeze(0), detections[:, :6], 1.0, False) > nms_thres # not working large_overlap = rotated_bbox_iou_polygon(detections[0, :6], detections[:, :6]) > nms_thres - large_overlap = torch.from_numpy(large_overlap.astype('uint8')) + # large_overlap = torch.from_numpy(large_overlap.astype('uint8')) + large_overlap = torch.from_numpy(large_overlap) label_match = detections[0, -1] == detections[:, -1] # Indices of boxes with lower confidence scores, large IOUs and matching labels invalid = large_overlap & label_match