We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
""" iou函数未检测当两个框没有intersection的时候,如 box1 = (1,2,3,4) box2 = (5,6,7,8) """ def iou(box1, box2): xi1 = np.maximum(box1_x1, box2_x1) yi1 = np.maximum(box1_y1, box2_y1) xi2 = np.minimum(box1_x2, box2_x2) yi2 = np.minimum(box1_y2, box2_y2) inter_width = xi1-xi2 inter_height =yi1-yi2 inter_area = inter_width * inter_height #suggest add the code below if inter_width>0 and inter_height>0: inter_area = 0
box1_area = (box1_x1 - box1_x2)*(box1_y1-box1_y2) box2_area = (box2_x1 - box2_x2)*(box2_y1-box2_y2) union_area = box1_area + box2_area - inter_area # compute the IoU iou = inter_area/ union_area
The text was updated successfully, but these errors were encountered:
""" iou函数未检测当两个框没有intersection的时候,如 box1 = (1,2,3,4) box2 = (5,6,7,8) """ def iou(box1, box2): xi1 = np.maximum(box1_x1, box2_x1) yi1 = np.maximum(box1_y1, box2_y1) xi2 = np.minimum(box1_x2, box2_x2) yi2 = np.minimum(box1_y2, box2_y2) inter_width = xi1-xi2 inter_height =yi1-yi2 inter_area = inter_width * inter_height #suggest add the code below if inter_width>0 and inter_height>0: inter_area = 0 box1_area = (box1_x1 - box1_x2)*(box1_y1-box1_y2) box2_area = (box2_x1 - box2_x2)*(box2_y1-box2_y2) union_area = box1_area + box2_area - inter_area # compute the IoU iou = inter_area/ union_area
在吴恩达深度学习car detection的代码iou函数中
Sorry, something went wrong.
No branches or pull requests
"""
iou函数未检测当两个框没有intersection的时候,如
box1 = (1,2,3,4)
box2 = (5,6,7,8)
"""
def iou(box1, box2):
xi1 = np.maximum(box1_x1, box2_x1)
yi1 = np.maximum(box1_y1, box2_y1)
xi2 = np.minimum(box1_x2, box2_x2)
yi2 = np.minimum(box1_y2, box2_y2)
inter_width = xi1-xi2
inter_height =yi1-yi2
inter_area = inter_width * inter_height
#suggest add the code below
if inter_width>0 and inter_height>0:
inter_area = 0
The text was updated successfully, but these errors were encountered: