※important※ Mistake in iou() of util.py
Opened this issue · 3 comments
YsYusaito commented
I added exception handling.
def iou(box1, box2):
xi1 = max(box1[0][0], box2[0][0])
yi1 = max(box1[0][1], box2[0][1])
xi2 = min(box1[1][0], box2[1][0])
yi2 = min(box1[1][1], box2[1][1])
if(((xi2 - xi1) < 0) or ((yi2 - yi1) < 0)):
IoU = 0
return IoU
else:
inter_area = (xi2 - xi1)*(yi2 - yi1)
# Formula: Union(A,B) = A + B - Inter(A,B)
box1_area = (box1[1][1] - box1[0][1])*(box1[1][0]- box1[0][0])
box2_area = (box2[1][1] - box2[0][1])*(box2[1][0]- box2[0][0])
union_area = (box1_area + box2_area) - inter_area
# compute the IoU
IoU = inter_area / union_area
return IoU
AkkiSony commented
@YsYusaito Hi. Did you get yolov3 running using inference script? I could not get any object detection suing the inference script.
Please let me know if you got it running. Thanks in advance. :)
YsYusaito commented
AkkiSony commented
@YsYusaito Thank you very much for sharing your environment issue. Did you make any changes in the inference.py and utils.py script for getting the objects detected. Please let me know if so.
Would it be possible for you to share your utils.py and inference.py script? It would really help me to get yolov3 run on coral TPU. :)
Thanks in advance! :)