YOLOv8 – 指定数据增强参数的正确方式是什么?

huangapple go评论156阅读模式
英文:

YOLOv8 - What is the clean and correct way to specify augmentation parameter?

问题

正如标题所说,我在使用YOLOv8时如何设置数据增强的参数?我想使用Python SDK而不是CLI命令。

仓库的维护者多次提到了以下链接:
https://docs.ultralytics.com/modes/predict/#arguments
但我不明白这些参数应该存储在哪里?
此外,我找到了这个。

[来自此网站的评论部分](https://i.stack.imgur.com/4qWX2.png)

将设置与data.yaml文件分开会很好,但首要任务是找到一个可行的解决方案。

英文:

as the title says, how do I set parameters for augmentation while using YOLOv8? I want to use the Python SDK and not the CLI commands.

The mantainer of the repo refer several times to
https://docs.ultralytics.com/modes/predict/#arguments
but I don't understand where to store these parameters?
Also, I found this.

[Comment section from this site](https://i.stack.imgur.com/4qWX2.png)

It would be nice to seperate the settings from data.yaml, but a working solution is the priority

答案1

得分: 0

你可以直接将增强参数存储到训练函数中,像这样:

results = model.train(data='coco128.yaml', epochs=300, degrees=0.25, scale=0.3, perspective=0.0001)

增强参数的列表可以在这里找到:https://docs.ultralytics.com/usage/cfg/#augmentation

英文:

You can store the augmentation parameters directly to the train function like this:

results = model.train(data='coco128.yaml', epochs=300, degrees=0.25, scale=0.3, perspective=0.0001)

List of augmentation parameters: https://docs.ultralytics.com/usage/cfg/#augmentation

答案2

得分: 0

在YOLOv8中,可以在ultralytics/yolo/cfg/default.yaml中找到数据增强的配置。
你可以直接更改YAML文件,或者在model.train()中设置参数,就像上面提到的那样。

英文:

In YOLOv8, the augmentation configuration can be found at ultralytics/yolo/cfg/default.yaml.
You can change the YAML file directly or set the parameter in model.train() as mentioned above.

huangapple
  • 本文由 发表于 2023年7月27日 16:13:01
  • 转载请务必保留本文链接:https://go.coder-hub.com/76777752.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定