IoU

 #include <cstdio>
#include <algorithm>
#define re(i,a,b) for(int i=a;i<=b;i++)
using namespace std; int main(){
int T; scanf("%d", &T);
while(T--){
int x[],y[],w[],h[];
re(i,,) scanf("%d%d%d%d", &x[i],&y[i],&w[i],&h[i]);
double sum=;
re(i,,) sum+=w[i]*h[i];
double overlap=(min(x[]+w[],x[]+w[])-max(x[],x[]))*
(min(y[]+h[],y[]+h[])-max(y[],y[]));
if((min(x[]+w[],x[]+w[])-max(x[],x[]))< && overlap>) overlap=;
if(overlap<=) printf("0.00\n");
else printf("%.2lf\n", overlap/(sum-overlap));
}
return ;
}

IoU的更多相关文章

  1. GNS3 IOU 配置

    GNS3使用视频: http://edu.51cto.com/lesson/id-25295.html GNS3 IOU 与VM http://www.mamicode.com/info-detail ...

  2. 目标检测 IOU(交并比) 理解笔记

    交并比(Intersection-over-Union,IoU): 目标检测中使用的一个概念 是产生的候选框(candidate bound)与原标记框(ground truth bound)的交叠率 ...

  3. iou与giou对比

    设矩形1大小为100x100,矩形2从左上角顶点重合开始,向右滑动250个单位. c++源码(基于opencv3.4.0) float iou(const cv::Rect& r1, cons ...

  4. 第二十七节,IOU和非极大值抑制

    你如何判断对象检测算法运作良好呢?在这一节中,你将了解到并交比函数,可以用来评价对象检测算法. 一 并交比(Intersection over union ) 在对象检测任务中,你希望能够同时定位对象 ...

  5. IOU和非极大值抑制

    如何判断对象检测算法运作良好呢? 一.交并比(Intersection over union,IoU) 是产生的候选框(candidate bound)与原标记框(ground truth bound ...

  6. 目标检测——IoU 计算

    Iou 的计算 我们先考虑一维的情况:令 \(A = [x_1,x_2], B = [y_1, y_2]\),若想要 \(A\) 与 \(B\) 有交集,需要满足如下情况: 简言之,要保证 \(A\) ...

  7. (原)IOU的计算

    转载请注明出处: http://www.cnblogs.com/darkknightzh/p/9043395.html 参考网址: https://github.com/deepinsight/ins ...

  8. 【NMS与IOU代码】

    # -*- coding: utf-8 -*- import numpy as np def IOU1(A,B): #左上右下坐标(x1,y1,x2,y2) w=max(0,min(A[2],B[2] ...

  9. Torch 两个矩形框重叠面积的计算 (IoU between tow bounding box)

    Torch 两个矩形框重叠面积的计算 (IoU between tow bounding box) function DecideOberlap(BBox_x1, BBox_y1, BBox_x2, ...

随机推荐

  1. Windows 10 RS4 无法完全关闭Hyper-V导致Virtual Box 虚拟机无法启动

    https://www.jianshu.com/p/2e3429d45aea 起因 因为需要使用Virtual Box做一些工作,卸载了Windows Docker.按照经验,关闭了Hyper-V. ...

  2. sunzl is not in the sudoers file.This incident will be reported

    Description: [sunzl@localhost nuc900bsp$] ./install.sh sorry!you are not the root !! [sunzl@localhos ...

  3. 从已删除邮箱copy数据到活动邮箱

    Start Windows PowerShell Start > search for "PowerShell" > Start Windows PowerShell ...

  4. HTTP Server to Client Communication

    1. Client browser short polling The most simple solution, client use Ajax to sends a request to the ...

  5. 1. 通过DHCP服务器动态获取IP地址之后无法上网的解决方法

    故障:内网正常,在同一个局域网内的其它PC端通过DHCP获取IP地址并且可以正常上网. 1.通过wireshark抓包,使用ipconfig /renew时,wireshark内出现DHCP请求服务, ...

  6. memset与fill的区别

    简介与区别 memset函数 按照字节填充某字符 在头文件<cstring>里面 fill函数 按照单元赋值,将一个区间的元素都赋同一个值 在头文件<algorithm>里面 ...

  7. [STM32F103]定时器中断

    l 使能定时器时钟. RCC_APB1PeriphClockCmd(); l 初始化定时器,配置ARR,PSC. TIM_TimeBaseInit(); l 开启定时器中断,配置NVIC. void ...

  8. int main(int argc,char* argv[]) 的含义和用法

    1.基本概念 argc,argv 用命令行编译程序时有用. 主函数main中变量(int argc,char *argv[ ])的含义,有些编译器允许将main()的返回类型声明为void,这已不再是 ...

  9. TestNG实现日志输出

    这里介绍的是TestNG中的Report类来实现简单的log输出这个很简单直接看例子吧 package com.rrx.test; import java.io.IOException; import ...

  10. TestNG+Java+Selenium+Maven 代码实例

    搭环境时注意不要忘记testng的jar包,selenium的jar包 package com.guge.test; import org.testng.annotations.Test;import ...