Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Add dataset analysis script #172

Merged
merged 32 commits into from
Nov 3, 2022

Conversation

Zheng-LinXiao
Copy link
Contributor

@Zheng-LinXiao Zheng-LinXiao commented Oct 17, 2022

分布图的功能介绍——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:
089888cd67cc9751add0edb7f4ebbf7-min
person_bbox_num

Function 2:
03e55ac1cf90b32829f35565244e8ef-min-min
person_bbox_wh

Function 3:
8e81d221142d713bff325c6d4481208-min
person_bbox_ratio

Function 4:
Under the default area rule(默认面积规则下):
1e6377bf6274ce654b6f7d19094f8fb-min
person_bbox_area

Print List:
a7a40e6827be15b33992bc479206826

@PeterH0323
Copy link
Collaborator

Solve issue #142

@PeterH0323 PeterH0323 changed the title Solve issue # 142 [Feature] Add dataset analysis script Oct 17, 2022
@PeterH0323
Copy link
Collaborator

PeterH0323 commented Oct 17, 2022

Hi @Zheng-LinXiao

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

  1. 请将这几个脚本合并成一个文件,dataset_analysis.py,执行该脚本全部分布图都一起生成
  2. 代码中的变量名修改为 小写,并使用下划线分割,不可使用驼峰式
  3. 该 PR 需要贴上分布图的演示图片

  1. 请在文档加入该功能的描述,用时将 PR 的效果图 link 选择有代表性 or 全部贴到文档对应位置中:
    • docs/zh_cn/user_guides/useful_tools.md
    • docs/en/user_guides/useful_tools.md

@PeterH0323 PeterH0323 mentioned this pull request Oct 19, 2022
32 tasks
@Nioolek
Copy link
Collaborator

Nioolek commented Oct 19, 2022

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

@PeterH0323
Copy link
Collaborator

PeterH0323 commented Oct 19, 2022

Hi @Zheng-LinXiao

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

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

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

docs/zh_cn/user_guides/useful_tools.md Outdated Show resolved Hide resolved
docs/zh_cn/user_guides/useful_tools.md Outdated Show resolved Hide resolved
docs/en/user_guides/useful_tools.md Outdated Show resolved Hide resolved
docs/en/user_guides/useful_tools.md Outdated Show resolved Hide resolved
docs/en/user_guides/useful_tools.md Outdated Show resolved Hide resolved
docs/zh_cn/user_guides/useful_tools.md Show resolved Hide resolved
tools/analysis_tools/dataset_analysis.py Outdated Show resolved Hide resolved
tools/analysis_tools/dataset_analysis.py Outdated Show resolved Hide resolved
tools/analysis_tools/dataset_analysis.py Outdated Show resolved Hide resolved
tools/analysis_tools/dataset_analysis.py Outdated Show resolved Hide resolved
docs/en/user_guides/useful_tools.md Outdated Show resolved Hide resolved
docs/zh_cn/user_guides/useful_tools.md Outdated Show resolved Hide resolved
docs/zh_cn/user_guides/useful_tools.md Outdated Show resolved Hide resolved
docs/zh_cn/user_guides/useful_tools.md Outdated Show resolved Hide resolved
docs/zh_cn/user_guides/useful_tools.md Outdated Show resolved Hide resolved
docs/zh_cn/user_guides/useful_tools.md Outdated Show resolved Hide resolved
tools/analysis_tools/dataset_analysis.py Show resolved Hide resolved
tools/analysis_tools/dataset_analysis.py Outdated Show resolved Hide resolved
tools/analysis_tools/dataset_analysis.py Outdated Show resolved Hide resolved
tools/analysis_tools/dataset_analysis.py Outdated Show resolved Hide resolved
tools/analysis_tools/dataset_analysis.py Outdated Show resolved Hide resolved
tools/analysis_tools/dataset_analysis.py Show resolved Hide resolved
tools/analysis_tools/dataset_analysis.py Show resolved Hide resolved
tools/analysis_tools/dataset_analysis.py Outdated Show resolved Hide resolved
tools/analysis_tools/dataset_analysis.py Outdated Show resolved Hide resolved
tools/analysis_tools/dataset_analysis.py Outdated Show resolved Hide resolved
tools/analysis_tools/dataset_analysis.py Show resolved Hide resolved
tools/analysis_tools/dataset_analysis.py Outdated Show resolved Hide resolved
tools/analysis_tools/dataset_analysis.py Outdated Show resolved Hide resolved
tools/analysis_tools/dataset_analysis.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@PeterH0323 PeterH0323 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hhaAndroid hhaAndroid merged commit 014abbf into open-mmlab:dev Nov 3, 2022
Nioolek pushed a commit to Nioolek/mmyolo-1 that referenced this pull request Nov 3, 2022
* messages

* again

* again1

* again_2

* again_3

* again_4

* again_5

* Update docs/zh_cn/user_guides/useful_tools.md

Co-authored-by: HinGwenWoong <[email protected]>

* Update docs/zh_cn/user_guides/useful_tools.md

Co-authored-by: HinGwenWoong <[email protected]>

* Update docs/en/user_guides/useful_tools.md

Co-authored-by: HinGwenWoong <[email protected]>

* Update docs/en/user_guides/useful_tools.md

Co-authored-by: HinGwenWoong <[email protected]>

* Update docs/en/user_guides/useful_tools.md

Co-authored-by: HinGwenWoong <[email protected]>

* Update docs/zh_cn/user_guides/useful_tools.md

Co-authored-by: HinGwenWoong <[email protected]>

* Update tools/analysis_tools/dataset_analysis.py

Co-authored-by: HinGwenWoong <[email protected]>

* Update tools/analysis_tools/dataset_analysis.py

Co-authored-by: HinGwenWoong <[email protected]>

* Update tools/analysis_tools/dataset_analysis.py

Co-authored-by: HinGwenWoong <[email protected]>

* Update tools/analysis_tools/dataset_analysis.py

Co-authored-by: HinGwenWoong <[email protected]>

* modify code

* Update docs/en/user_guides/useful_tools.md

Co-authored-by: HinGwenWoong <[email protected]>

* Modify document

* Modify document

* new code

* revise decuments and codes

* Revise datails

* Update tools/analysis_tools/dataset_analysis.py

Co-authored-by: HinGwenWoong <[email protected]>

* modify func name

* code

* Documentation and code

* modify error meaasge

* deleted height,

Co-authored-by: HinGwenWoong <[email protected]>
hhaAndroid pushed a commit that referenced this pull request Nov 3, 2022
* messages

* again

* again1

* again_2

* again_3

* again_4

* again_5

* Update docs/zh_cn/user_guides/useful_tools.md

Co-authored-by: HinGwenWoong <[email protected]>

* Update docs/zh_cn/user_guides/useful_tools.md

Co-authored-by: HinGwenWoong <[email protected]>

* Update docs/en/user_guides/useful_tools.md

Co-authored-by: HinGwenWoong <[email protected]>

* Update docs/en/user_guides/useful_tools.md

Co-authored-by: HinGwenWoong <[email protected]>

* Update docs/en/user_guides/useful_tools.md

Co-authored-by: HinGwenWoong <[email protected]>

* Update docs/zh_cn/user_guides/useful_tools.md

Co-authored-by: HinGwenWoong <[email protected]>

* Update tools/analysis_tools/dataset_analysis.py

Co-authored-by: HinGwenWoong <[email protected]>

* Update tools/analysis_tools/dataset_analysis.py

Co-authored-by: HinGwenWoong <[email protected]>

* Update tools/analysis_tools/dataset_analysis.py

Co-authored-by: HinGwenWoong <[email protected]>

* Update tools/analysis_tools/dataset_analysis.py

Co-authored-by: HinGwenWoong <[email protected]>

* modify code

* Update docs/en/user_guides/useful_tools.md

Co-authored-by: HinGwenWoong <[email protected]>

* Modify document

* Modify document

* new code

* revise decuments and codes

* Revise datails

* Update tools/analysis_tools/dataset_analysis.py

Co-authored-by: HinGwenWoong <[email protected]>

* modify func name

* code

* Documentation and code

* modify error meaasge

* deleted height,

Co-authored-by: HinGwenWoong <[email protected]>
@Zheng-LinXiao Zheng-LinXiao deleted the branchname branch November 6, 2022 09:38
wanghonglie pushed a commit that referenced this pull request Nov 10, 2022
* messages

* again

* again1

* again_2

* again_3

* again_4

* again_5

* Update docs/zh_cn/user_guides/useful_tools.md

Co-authored-by: HinGwenWoong <[email protected]>

* Update docs/zh_cn/user_guides/useful_tools.md

Co-authored-by: HinGwenWoong <[email protected]>

* Update docs/en/user_guides/useful_tools.md

Co-authored-by: HinGwenWoong <[email protected]>

* Update docs/en/user_guides/useful_tools.md

Co-authored-by: HinGwenWoong <[email protected]>

* Update docs/en/user_guides/useful_tools.md

Co-authored-by: HinGwenWoong <[email protected]>

* Update docs/zh_cn/user_guides/useful_tools.md

Co-authored-by: HinGwenWoong <[email protected]>

* Update tools/analysis_tools/dataset_analysis.py

Co-authored-by: HinGwenWoong <[email protected]>

* Update tools/analysis_tools/dataset_analysis.py

Co-authored-by: HinGwenWoong <[email protected]>

* Update tools/analysis_tools/dataset_analysis.py

Co-authored-by: HinGwenWoong <[email protected]>

* Update tools/analysis_tools/dataset_analysis.py

Co-authored-by: HinGwenWoong <[email protected]>

* modify code

* Update docs/en/user_guides/useful_tools.md

Co-authored-by: HinGwenWoong <[email protected]>

* Modify document

* Modify document

* new code

* revise decuments and codes

* Revise datails

* Update tools/analysis_tools/dataset_analysis.py

Co-authored-by: HinGwenWoong <[email protected]>

* modify func name

* code

* Documentation and code

* modify error meaasge

* deleted height,

Co-authored-by: HinGwenWoong <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants