目标检测数据集分析
·
原文链接:https://ghlcode.cn/pages/250d97
目标检测数据集分析
📢 新增支持数据集可视化,Ghlerrix/DataAnalyze
平时我们经常需要对我们的数据集进行各种分析,以便我们找到更好的提高方式。所以我将我平时分析数据集的一些方法打包发布在了Github上,分享给大家,有什么错误和意见,请多多指教!
项目地址
https://github.com/Ghlerrix/DataAnalyze
图片数量、标注框数量、类别信息
这些信息会在终端打印出来,格式如下:
Parsing dataset, please wait...
Parsing done. (0.013s)
number of images: 1266
number of annotations: 2950
number of categories: 6
names of categories: ['inclusion', 'rolled-in_scale', 'pitted_surface', 'patches', 'crazing', 'scratches']
所有图片宽度和高度的散点图
这里只有一个点,是因为所有的图片尺寸相同

所有标注框宽度和高度的散点图

标注框宽度和高度之比 横坐标为比率,纵坐标为数量

每一类的标注框数量


每一类图片数量


每一张图片上的标注框数量
横坐标为一张图片上的标注框数量,纵坐标为图片数量

不同尺寸的图片数量
根据coco的划分规则计算


使用方法
Ghlerrix/DataAnalyze: Object-detection dataset analyze (github.com)
Install
git clone https://github.com/Ghlerrix/DataAnalyze.gitcd DataAnalyzepip install -r requirements.txt
Usage
python analyze.py ${type} ${path} [--out ${out}]
typeThe format of the dataset, optional ‘coco’ or ‘voc’.pathThe path of dataset. Iftypeis ‘coco’, thepathis the json file path. Iftypeis ‘voc’, thepathis the path of the xml file directory.-outis the output directory, default is ‘./out’
Example
python analyze.py coco ./tarin.json --out ./out/
python analyze.py voc ./xml/ --out ./out/
魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐


所有评论(0)