[Feature] Add dataset analysis script
分布图的功能介绍——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:

Function 2:

Function 3:

Function 4:

Solve issue #142
Hi @Zheng-LinXiao
非常感谢您的 PR。有几点修改建议
-
请将这几个脚本合并成一个文件,
dataset_analysis.py,执行该脚本全部分布图都一起生成 -
代码中的变量名修改为 小写,并使用下划线分割,不可使用驼峰式
-
该 PR 需要贴上分布图的演示图片

-
请在文档加入该功能的描述,用时将 PR 的效果图 link 选择有代表性 or 全部贴到文档对应位置中:
- docs/zh_cn/user_guides/useful_tools.md
- docs/en/user_guides/useful_tools.md
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
Hi @Zheng-LinXiao
我看了修改之后挺好的,但是还是需要修改一些细节:
- 图片上传 PR 的步骤是这样的,用鼠标拖动需要上传的图片到编辑框,即可完成上传,我说的 Link 是 Github 完成上传之后的 Link。
- 执行该脚本,全部分布图都生成就可以了,不需要再选择生成哪种,可以复用的代码要复用
题外话:请不要用 func1 func2 这样的命名,函数名称应反应其本身的用法,如果程序全部都是 func_x,使用者还要跳过去理解程序,效率大大降低了