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
4 卷积神经网络/Week3 目标检测/4.3 目标检测/Car detection for Autonomous Driving/Autonomous driving application-Car detection-v1-answer.ipynb,计算iou的函数,此段代码有bug: xi1 = max(box1[0], box2[0]) yi1 = max(box1[1], box2[1]) xi2 = min(box1[2], box2[2]) yi2 = min(box1[3], box2[3]) inter_area = (yi2 - yi1) * (xi2 - xi1) 当两个框没有重叠时,yi2 - yi1和xi2 - xi1的值都是负数,inter_area应该是0,所以应该这么写: xi1 = max(box1[0], box2[0]) yi1 = max(box1[1], box2[1]) xi2 = min(box1[2], box2[2]) yi2 = min(box1[3], box2[3]) if (yi2 - yi1 < 0) or (xi2 - xi1 < 0): inter_area = 0 else: inter_area = (yi2 - yi1) * (xi2 - xi1)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
4 卷积神经网络/Week3 目标检测/4.3 目标检测/Car detection for Autonomous Driving/Autonomous driving application-Car detection-v1-answer.ipynb,计算iou的函数,此段代码有bug:
xi1 = max(box1[0], box2[0])
yi1 = max(box1[1], box2[1])
xi2 = min(box1[2], box2[2])
yi2 = min(box1[3], box2[3])
inter_area = (yi2 - yi1) * (xi2 - xi1)
当两个框没有重叠时,yi2 - yi1和xi2 - xi1的值都是负数,inter_area应该是0,所以应该这么写:
xi1 = max(box1[0], box2[0])
yi1 = max(box1[1], box2[1])
xi2 = min(box1[2], box2[2])
yi2 = min(box1[3], box2[3])
if (yi2 - yi1 < 0) or (xi2 - xi1 < 0):
inter_area = 0
else:
inter_area = (yi2 - yi1) * (xi2 - xi1)
The text was updated successfully, but these errors were encountered: