Skip to content

[DOC] Add custom dataset guide#306

Merged
hhaAndroid merged 73 commits into
open-mmlab:devfrom
PeterH0323:hin/custom_dataset
Nov 30, 2022
Merged

[DOC] Add custom dataset guide#306
hhaAndroid merged 73 commits into
open-mmlab:devfrom
PeterH0323:hin/custom_dataset

Conversation

@PeterH0323

Copy link
Copy Markdown
Collaborator

Motivation

Add custom dataset guide

Modification

docs/zh_cn/user_guides/custom_dataset.md

@PeterH0323 PeterH0323 changed the title [DOC] Add custom dataset guide [WIP DOC] Add custom dataset guide Nov 21, 2022
@PeterH0323 PeterH0323 added WIP documentation Improvements or additions to documentation labels Nov 21, 2022
@PeterH0323 PeterH0323 mentioned this pull request Nov 21, 2022
32 tasks
@PeterH0323 PeterH0323 changed the title [WIP DOC] Add custom dataset guide [DOC] Add custom dataset guide Nov 23, 2022
@PeterH0323 PeterH0323 removed the WIP label Nov 23, 2022
Comment thread docs/zh_cn/user_guides/custom_dataset.md Outdated
Comment thread docs/zh_cn/user_guides/custom_dataset.md Outdated
Comment thread docs/zh_cn/user_guides/custom_dataset.md Outdated
Comment thread docs/zh_cn/user_guides/custom_dataset.md Outdated
Comment thread docs/zh_cn/user_guides/custom_dataset.md Outdated
Comment thread docs/zh_cn/user_guides/custom_dataset.md Outdated
Comment thread docs/zh_cn/user_guides/custom_dataset.md Outdated
Comment thread docs/zh_cn/user_guides/custom_dataset.md Outdated

max_epochs = 200 # 训练的最大 epoch
data_root = '/path/to/data_root' # 数据集目录的绝对路径
work_dir = './work_dirs/yolov5_s-v61_syncbn_fast_1xb8-200e_cat' # 结果保存的路径

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

这个不用写,会自动生成

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

用户会对同一个 config 进行调试,这里我暴露出来是为了让用户知道这个可以自己指定

因为是我们自定义的数据集,所以我们需要自己重写 config 中的部分信息,我们在 configs 目录下新建一个子集的 config 文件,这个 config 继承的是 `yolov5_s-v61_syncbn_8xb16-300e_coco.py`,数据集中的类是猫,`bs=8`,`200epoch`,可以命令为 `yolov5_s-v61_syncbn_fast_1xb8-200e_cat.py`,添加以下内容:

```python
_base_ = './yolov5/yolov5_s-v61_syncbn_8xb16-300e_coco.py'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

这个配置优有点长,建议能继承的就不要重写了,否则内容太长。 我还有一个提议:咱们开一个 project/misc,这个文件夹后面专门放一些杂项,例如本文的配置就非常合适。后面一些乱七八糟的配置脚本都可以放这个文件夹下。一些正样本可视化分析代码也可以放里面。确保 readme 写清楚就行

@PeterH0323 PeterH0323 Nov 26, 2022

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

这个 config 内容已经是最精简了 😢

Comment thread docs/zh_cn/user_guides/custom_dataset.md
Comment thread docs/zh_cn/user_guides/custom_dataset.md Outdated
Comment thread docs/zh_cn/user_guides/custom_dataset.md Outdated
Comment thread docs/zh_cn/user_guides/custom_dataset.md Outdated
Comment thread docs/zh_cn/user_guides/custom_dataset.md Outdated
Comment thread docs/zh_cn/user_guides/custom_dataset.md Outdated
Comment thread docs/zh_cn/user_guides/custom_dataset.md Outdated
Comment thread docs/zh_cn/user_guides/custom_dataset.md Outdated
Comment thread docs/zh_cn/user_guides/custom_dataset.md Outdated
Comment thread docs/zh_cn/user_guides/custom_dataset.md Outdated
Comment thread docs/zh_cn/user_guides/custom_dataset.md Outdated
Comment thread docs/zh_cn/user_guides/custom_dataset.md Outdated
Comment thread docs/zh_cn/user_guides/custom_dataset.md Outdated
Comment thread docs/zh_cn/user_guides/custom_dataset.md Outdated
Comment thread docs/zh_cn/user_guides/custom_dataset.md Outdated
Comment thread docs/zh_cn/user_guides/custom_dataset.md Outdated
Comment thread docs/zh_cn/user_guides/custom_dataset.md

@RangeKing RangeKing left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

最后一个建议,英文文档下新建一个 custom_dataset.md,里面写上 Coming soon. Please refer to [chinese documentation](../../zh_cn/user_guides/custom_dataset.md)。并修改对应 index.est

Comment thread docs/zh_cn/user_guides/custom_dataset.md Outdated
Comment thread docs/zh_cn/user_guides/custom_dataset.md Outdated
Comment thread docs/zh_cn/user_guides/custom_dataset.md Outdated
Comment thread docs/zh_cn/user_guides/custom_dataset.md
@hhaAndroid hhaAndroid merged commit b8afd00 into open-mmlab:dev Nov 30, 2022
@PeterH0323 PeterH0323 deleted the hin/custom_dataset branch November 30, 2022 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

application documentation Improvements or additions to documentation Feature:P0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants