yolov5训练相关参数解释

很多常用术语不太懂,毕竟咱不是这专业的,也算个初学者,总之,菜是原罪,能学就学。

1.官方解释

查看https://github.com/ultralytics/yolov5/wiki/Train-Custom-Data,里面有这样一句话。

For training command outputs and further details please see the training section of Google Colab Notebook.

打开这个notebook(需要点手段,你们懂的)。
总结一下,这个notebook中有关train 的信息。

  1. actual training is much longer, around 300-1000 epochs, depending on your dataset
  2. --cfg选择model文件(models/yolo5s.yaml)
  3. --data选择datase文件(data/coco128.yaml)
  4. --weights指定初始权重文件(随机初始化--weights ''
  5. All training results are saved to runs/exp0 for the first experiment, then runs/exp1, runs/exp2 etc. for subsequent experiments.(实验发现到10就停下了,之后不断更新exp10)
  6. 可选tensorboard(还不会用。。。)
  7. A Mosaic Dataloader is used for training
  8. View test_batch0_gt.jpg to see test batch 0 ground truth labels.
  9. View test_batch0_pred.jpg to see test batch 0 predictions.
  10. Training losses and performance metrics are saved to Tensorboard and also to a runs/exp0/results.txt logfile. results.txt is plotted as results.png after training completes.

然后就没了。。。。。显然对咱深入理解没啥帮助,也就勉强一用。

2.源码阅读

传参都在这了。

if __name__ == '__main__':
    check_git_status()
    parser = argparse.ArgumentParser()
    parser.add_argument('--cfg', type=str, default='models/yolov5s.yaml', help='model.yaml path')
    parser.add_argument('--data', type=str, default='data/coco128.yaml', help='data.yaml path')
    parser.add_argument('--hyp', type=str, default='', help='hyp.yaml path (optional)')
    parser.add_argument('--epochs', type=int, default=300)
    parser.add_argument('--batch-size', type=int, default=16)
    parser.add_argument('--img-size', nargs='+', type=int, default=[640, 640], help='train,test sizes')
    parser.add_argument('--rect', action='store_true'
评论 54
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值