Accuracy index of object detection: F1 & IoU

2023-11-15

Reference:

https://stats.stackexchange.com/questions/273537/f1-dice-score-vs-iou

https://www.pyimagesearch.com/2016/11/07/intersection-over-union-iou-for-object-detection/

 

Definition:

IoU(Intersection over Union) / Jaccard:

TP/(TP+FP+FN)

F1 score/Dice:

2TP/(2TP+FP+FN)

         Thefollowing fig refers to IoU.

 

More explanation:

From the definition of the two metrics, we have that IoU and F score are always within a factor of 2 of each other:

F/2≤IoU≤F

F/2≤IoU≤F

and also that they meet at the extremes of one and zero under the conditions that you would expect (perfect match and completely disjoint).

Note also that the ratio between them can be related explicitly to the IoU:

IoU/F=1/2+IoU/2

IoU/F=1/2+IoU/2

so that the ratio approaches 1/2 as both metrics approach zero.

But there's a stronger statement that can be made for the typical application of classification a la machine learning. For any fixed "ground truth", the two metrics are always positively correlated. That is to say that if classifier A is better than B under one metric, it is also better than classifier B under the other metric.

It is tempting then to conclude that the two metrics are functionally equivalent to the choice between them is arbitrary, but not so fast! The problem comes when taking the average score over a set of inferences. Then the difference emerges when quantifying how much worse classifier B is than A for any given case.

In general, the IoU metric tends to penalize single instances of bad classification more than the F score quantitatively even when they can both agree that this one instance is bad. Similarly to how L2 can penalize the largest mistakes more than L1, the IoUmetric tends to have a "squaring" effect on the errors relative to the F score. So the F score tends to measure something closer to average performance, while the IoU score measures something closer to the worst case performance.

Suppose for example that the vast majority of the inferences are moderately better with classifier A than B, but some of them of them are significantly worse using classifier A. It may be the case then that the F metric favors classifier A while the IoU metric favors classifier B.

To be sure, both of these metrics are much more alike than they are different. But both of them suffer from another disadvantage from the standpoint of taking averages of these scores over many inferences: they both overstate the importance of sets with little-to-no actual ground truth positive sets. In the common example of image segmentation, if an image only has a single pixel of some detectable class, and the classifier detects that pixel and one other pixel, its F score is a lowly 2/3 and the IoU is even worse at 1/2. Trivial mistakes like these can seriously dominate the average score taken over a set of images. In short, it weights each pixel error inversely proportionally to the size of the selected/relevant set rather than treating them equally.

There is a far simpler metric that avoids this problem. Simply use the total error: FN + FP (e.g. 5% of the image's pixels were miscategorized). In the case where one is more important than the other, a weighted average may be used: c0FP + c1FN.

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Accuracy index of object detection: F1 & IoU 的相关文章

  • Nmap扫描原理与用法

    Nmap扫描原理与用法 2012年6月16日 1 Nmap介绍 Nmap扫描原理与用法PDF 下载地址 Nmap是一款开源免费的网络发现 Network Discovery 和安全审计 Security Auditing 工具 软件名字Nm
  • ‘mvn‘ 不是内部或外部命令,也不是可运行的程序 或批处理文件——解决方法(详解,亲测有效)

    错误原因 配置Maven环境变量出现问题 解决方法 以windows 10为例子 步骤一 此电脑 属性 高级系统设置 环境变量 系统变量 新建 变量名 M2 HOME 变量值 D install maven apache maven 3 5
  • jq和vue的区别

    1 从jquery到vue的转变是一个思想想的转变 就是将原有的直接操作dom的思想转变到操作数据上去 2 传统前端开发模式中是以jq为核心的 而vue是现在一个兴起的前端js库 是一个精简的MVVM 3 jQuery是使用选择器 选取DO
  • spring boot定时任务方式

    一 定时任务实现的几种方式 Timer jdk util自带的Timer类 可以调度一个java util TimerTask任务 只能设定任务按照某个频度执行 但不能按设定时间运行 ScheduledExecutorService jdk
  • 使用Python进行测试驱动开发

    作者 Jason Diamond 译者 吴海燕 原文发表日期 12 02 2004 翻译日期 2 17 2005 原文件位置 http www onlamp com pub a python 2004 12 02 tdd pyunit ht
  • 微信小程序使用npm引入三方包详解

    目录 1 前言 2 微信小程序npm环境搭建 2 1 创建package json文件 2 2 修改 project config json 2 3 修改project private config json配置 2 4 构建 npm 包
  • sharepoint 2010 列表数据分页控件介绍 pagination UserControl

    这里主要是介绍下最近开发的一个sharepoint列表或者文档库的分页控件 并且把它包装成一个可以支持自定义列表 Custom list 文档库 Document library 讨论板 Discussion 资源库 Assets libr
  • 创建vue项目-vue2&vue3

    1 安装node 网址 下载 Node js 中文网 可以下载最新版本 也可以点击下方按钮下载其他版本 安装时全部选择默认 点击下一步 完成之后打开cmd命令窗口 检查node js是否安装成功 再查看npm是否安装成功 2 安装vue脚手
  • Redis-事务与持久化

    目录 事务 事务命令 事务的实现 事务的开始 命令入队 事务队列 执行事务 WATCH命令 不监视的情况下 监视的情况下 事务的ACID特性 A 原子性 C 一致性 I 隔离性 D 持久性 持久化 RDB持久化 Redis DataBase
  • 搜狐畅游2018年9月15日校招真题(2)

    通过该道题目 题目描述 示例代码 include
  • 苹果的「AI 建筑师」GAUDI:根据文本生成 3D 场景

    作者 李梅 编辑 陈彩娴 转载自 AI科技评论 aitechtalk 如今 每隔一段时间就有新的文本生成图像模型释出 个个效果都很强大 每每惊艳众人 这个领域已经是卷上天了 不过 像 OpenAI 的 DALL E 2 或谷歌 的 Imag
  • devops之gcp core infrastructure fundamental,应用云;开发、部署、监控

    最后更新2022 02 09 应用云 下面来看看GCP提供什么应用PaaS服务 app engine是提供标准API的 预安装 application 自动部署 自动扩展 经济 免费每日额度 基于使用的计费 SDK 满足开发 测试 部署要求
  • 微信小程序是如何上传文件以及下载文件

    微信小程序可以使用wx uploadFile API来上传文件 使用wx downloadFile API来下载文件 上传文件的步骤如下 1 创建一个选择文件的按钮 2 用户点击按钮后 调用wx chooseImage 方法来选择文件 3
  • 【IoC】Spring IoC容器生命周期内容梳理

    Spring ApplicationContext Lifecycle 前言 关于Spring源码介绍的版本是 5 2 2 REALEASE 如果有流程不一致的地方 可以看下版本是否一致 一 本文概览 Spring IoC容器生命周期整体看
  • PyTorch grad 与 Optimizer(params) 区别

    目录 PyTorch grad 与 Optimizer params 区别 PyTorch grad 与 Optimizer params 区别 Tensor 可以设置属性 requires grad True False 说明其是否进行梯
  • windows构建环境 MSYS2 安装与配置

    1 说明 MSYS2 是提供了bash shell等linux环境 版本控制软件 git hg 和MinGW w64工具链软件 是MSYS的一个升级版 集成了pacman和Mingw w64的Cygwin升级版 一般用于构建windows

随机推荐

  • 西门子、三菱指令大全

    一 西门子PLC编程指令 1 位逻辑指令 1 1 常开接点 地址 1 2 常闭接点 地址 1 3 XOR 位异或 1 4 NOT 信号流反向 1 5 输出线圈 1 6 中间输出 1 7 R 线圈复位 1 8 S 线圈置位 1 9 RS 复位
  • 数据可视化平台理论与实践

    前面说完了大数据开发平台的核心组件 作业调度系统 接下来讨论一下大数据开发平台的脸面之一 数据可视化平台 和调度系统一样 这又是一个很多公司可能想要自己造一个轮子的系统 数据可视化平台是什么 不过 慢着 先等一下 什么是数据可视化平台 我们
  • R语言数据集的学习

    创建数据集 一 数据集的概念 二 数据结构 1 向量 2 矩阵 3 数组 4 数据框 一 数据集的概念 按照个人要求的格式来创建含有研究信息的数据集 这是任何数据分析的第一步 在R中 这个任务包括以下两步 选择一种数据结构来存储数据 将数据
  • ipad如何改造成linux终端,如何实现让ipad上使用终端terminal

    实现的具体步骤如下 1 cydia安装openssh 2 installous安装issh 3 进入issh 选add configuration description 随便填 host localhost port 22 login r
  • matlab内存管理(二)

    转自 http hi baidu com bi CB AB C9 FA BB A8 blog item 5ab86c38ac2f45e715cecbab html 1 确保内存的连续性Matlab 中数组必须占用连续分配的内存段当无法为新建
  • web前端基础:HTML文字和段落标签

    标题标签 h1 h1 h6 h6 段落标签 p p align对齐属性值 值 描述 left 左对齐 right 右对齐 center 居中对齐 justify 对行进行伸展 每行可以有相等的长度 列表标签 有序列表 ol li 列表项 l
  • win10上安装python3.9.0+robotframework

    win10上安装python3 9 robotframework python3 9 0下载安装 robotframework安装 wxpython安装 ride安装 python3 9 0下载安装 下载地址 python3 9 0下载地址
  • el-dialog水平垂直居中

  • 珠玑算法的Java实现

    珠玑算法的Java实现 珠玑算法 也称作Mastermind 是一种猜测和推理游戏 通常由两个玩家参与 一方作为 代码制造者 随机生成一个颜色序列 而另一方作为 代码猜测者 试图在有限的猜测次数内猜出正确的序列 猜测者每次猜测后 制造者会给
  • 6、RC4算法

    参考 https blog csdn net huangyimo article details 82970903 RC4算法 RC4算法变量 RC4算法流程 RC4算法相关 RC4算法 RC4加密算法是Ron Rivest在1987年设计
  • SM系列算法有哪些?一文详解

    SM系列国密算法是由中国国家密码管理局于2007年颁布的一组密码算法标准 是中国自主研发的一种新一代密码技术 SM系列算法分为SM1 SM2 SM3 SM4 SM7 SM9 分别用于对称加密 公钥密码学 哈希算法和消息认证码 其中SM1 S
  • vue-element页面说明文档

    目录 技术栈 环境搭建流程 目录结构 实现页面 技术栈 vue4 0 HbuilderX 是DCloud 数字天堂 推出的一款支持HTML5的Web开发IDE 初学vue不建议用vscode 推荐使用此工具 nodejs 开发依赖 提供np
  • 记录一次spring定时任务,需要多线程执行时遇到的坑

    项目中需要使用定时任务开启多个线程处理组装报文业务 但是在spring xml中配置了
  • 内容公链Contentos首席科学家不建议刚毕业的年轻人直接从事区块链开发

    在区块链开发者队伍中 有一批来自传统的互联网开发人员 在区块链圈子里崇尚年轻和 天才 的文化氛围中 这批开发者因经历了两次重大浪潮的洗礼而更加的扎实和沉稳 戴硕就是其中一位 戴硕 内容公链Contentos首席科学家 清华毕业 中科院硕士
  • 【网络结构】——FastViT论文浅读

    论文 https arxiv org pdf 2303 14189 pdf 关键词 fastvit cnn transformer 重参数化 大卷积核 来自 苹果 文章目录 摘要 1 简介 2 网络结构 2 1 RepMixer 2 2 重
  • 利用Canal把MySQL数据同步到ES

    Canal是阿里巴巴开源的一个数据库变更数据同步工具 主要用于 MySQL 数据库的增量数据到下游的同步 例如同步到 Elasticsearch HBase Hive 等 下面是一个基本的步骤来导入 MySQL 数据库到 Elasticse
  • LLVM在Windows下使用VisualStudio2017添加编译自定义pass

    参考 uu kk LLVM pass on Windows integrating with opt 该方法仍然有效 只不过还需要一些修改 遇到的错误需要解决 错误1 CMake Error at CMakeLists txt 658 me
  • win10安装mysql的步骤_win10 安装mysql 8.0.18-winx64的步骤详解

    1 先去官网下载mysql 安装包 https dev mysql com downloads mysql 2 下载完后解压到你想要安装MSQ 的文件目录下 如 D Mysql 3 管理员命令运行 命令行 进入mysql 安装包的 bin
  • 语义分割 - Semantic Segmentation Papers

    语义分割类的论文与代码汇总 逐渐迁移到搭建的博客上 AIUAI www aiuai cn 新地址 语义分割 Semantic Segmentation Papers AIUAI Semantic Segmentation Convoluti
  • Accuracy index of object detection: F1 & IoU

    Reference https stats stackexchange com questions 273537 f1 dice score vs iou https www pyimagesearch com 2016 11 07 int