赞
踩
文中包括了YOLOv5作者分享的提高模型指标小技巧和吴恩达(Andrew Ng
)在做缺陷检测项目( steel sheets for defects
)时遇到的需要提高模型指标的问题是如何解决的。
大多数情况下,只要数据集足够大且良好标注(provided your dataset is sufficiently large and well labelled
),就可以在不更改模型或训练设置的情况下获得良好的结果。如果一开始没有得到好的结果,在考虑任何更改之前,首先使用所有默认设置进行训练。这有助于建立性能baseline和需要改进的地方。
YOLOv5提供了大量的信息包括训练损失, 验证损失, 精确率(P), 召回率(R), mAP等可视化结果, 包括PR曲线(PR curve),混淆矩阵(confusion matrix), 马赛克训练, 测试结果等数据集统计图像。这些信息的图像所在目录是yolov5/runs/Train/exp
first train with default settings to establish a performance baseline
)hpy.scratch.yaml
中。建议先使用默认超参数进行训练,然后再考虑修改任何参数。一般来说,增加augmentation超参数将减少和延迟过度拟合,从而允许更长的训练时间和更高的最终mAP。减少loss component gain
超参数(如hyp[‘obj’])
将有助于减少对特定loss component
的过度拟合。Asks how you can change the model to improve performance.
)Asks how you can change or improve your data to improve performance.
)The first step to training a neural net is to not touch any neural net code at all and instead begin by thoroughly inspecting your data. This step is critical.
)your model architecture is good enough.To summarize — don’t try to outsmart a room full of PhDs. Instead, make sure the quality of your data is top-notch before trying to improve the model.
)The data flywheel: develop model and data in tandem
)Annotate the data yourself, at least at the beginning
)Use tools to reduce the MLOps hassle as much as possible
)注释
tandem: adv. 二马纵列地,这里翻译成两项工作同时展开 MLOps: 全称是`Machine Learning Operations
Andrew` Ng在他的ppt中这样描述MLOps最重要的任务是在ML项目生命周期的所有阶段提供高质量的数据。(MLOps’ most important task is to make high quality data available through all stages of the ML project lifecycle.)
数据数量还是数据质量(Data Quantity
vs. Data Quality
)
如果要追求数据的质量,我们就必须有严格而统一的标注规则,反之就是指标下降
Andrew Ng和他的团队在进行钢铁缺陷检测项目( steel sheets for defects)时,accuracy卡在了76.2%,期望结果是accuracy>=90%。于是他把团队拆分,各个小组做不同的事。一个小组保持模型不变,做new
examples,data augmentation,labeling等提高数据质量的工作,另一个小组保持数据不变,但尝试改进模型。从事数据工作的小组能够将准确率提高到93.1%,而另一个小组却丝毫没能提高baseline。
详细结果看Andrew Ng的ppt,如下图
参考
Stop treating data as a commodity
Andrew Ng MLOps-From-Model-centric-to-Data-centric-AI
A Recipe for Training Neural Networks
YOLOv5 issues
YOLOv5 issues
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。