mmyolo icon indicating copy to clipboard operation
mmyolo copied to clipboard

[Feature] Add dataset analysis script

Open Zheng-LinXiao opened this issue 3 years ago • 4 comments

分布图的功能介绍——Function Introduction of Distribution Map 给定一个配置文件,输出以下分布图: 功能一:显示类别和bbox实例个数的分布图 功能二:显示类别和bbox实例宽、高的分布图 功能三:显示类别和bbox实例宽/高比例的分布图 功能四:基于物体大、中、小规则下,显示类别和bbox实例面积的分布图

Given a configuration file, output the following distribution diagram: Function 1: Display the distribution map of categories and number of bbox instances Function 2: Display the width and height distribution of categories and bbox instances Function 3: Display the distribution map of category and bbox instance width/height ratio Function 4: Display the distribution map of category and bbox instance area based on the rules of large, medium and small objects

分布图的演示图片——Demo picture of the distribution map Function 1: a0f3e7b7e65ab3297f300dd34f84d20

Function 2: 18e6de7ae877f9645da3e3d9b96c1f1

Function 3: 987152493f11c3f56fa62969eff5f0b

Function 4: c42be0f651e49d2f41f671d8ce642c1

Zheng-LinXiao avatar Oct 17 '22 20:10 Zheng-LinXiao

Solve issue #142

PeterH0323 avatar Oct 17 '22 23:10 PeterH0323

Hi @Zheng-LinXiao

非常感谢您的 PR。有几点修改建议

  1. 请将这几个脚本合并成一个文件,dataset_analysis.py,执行该脚本全部分布图都一起生成

  2. 代码中的变量名修改为 小写,并使用下划线分割,不可使用驼峰式

  3. 该 PR 需要贴上分布图的演示图片

  4. 请在文档加入该功能的描述,用时将 PR 的效果图 link 选择有代表性 or 全部贴到文档对应位置中:

    • docs/zh_cn/user_guides/useful_tools.md
    • docs/en/user_guides/useful_tools.md

PeterH0323 avatar Oct 17 '22 23:10 PeterH0323

Hello, thank you for you nice PR. It is nice to use built datasets instead of pycocotools. This allows your script to adapt to all datasets in mmyolo. Methods to build datasets in mmyolo you can see: https://github.com/open-mmlab/mmengine/blob/dc01545e267f5bdf5afa2e1fdf781eb05f7df12c/mmengine/runner/runner.py#L1335-#L1343

Nioolek avatar Oct 19 '22 10:10 Nioolek

Hi @Zheng-LinXiao

我看了修改之后挺好的,但是还是需要修改一些细节:

  1. 图片上传 PR 的步骤是这样的,用鼠标拖动需要上传的图片到编辑框,即可完成上传,我说的 Link 是 Github 完成上传之后的 Link。
  2. 执行该脚本,全部分布图都生成就可以了,不需要再选择生成哪种,可以复用的代码要复用

题外话:请不要用 func1 func2 这样的命名,函数名称应反应其本身的用法,如果程序全部都是 func_x,使用者还要跳过去理解程序,效率大大降低了

PeterH0323 avatar Oct 19 '22 23:10 PeterH0323