Skip to content

Commit

Permalink
Merge pull request #28 from saqibmobin/master
Browse files Browse the repository at this point in the history
Fix for RuntimeError: Expected object of scalar type Byte but got scalar type Bool
  • Loading branch information
ghimiredhikura authored Dec 11, 2019
2 parents bcad024 + 8b32a21 commit 830a9f0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 830a9f0

Please sign in to comment.