欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 文旅 > 美景 > yolo7 自定义数据训练

yolo7 自定义数据训练

2024/11/30 14:50:33 来源:https://blog.csdn.net/hzh839900/article/details/141609068  浏览:    关键词:yolo7 自定义数据训练

数据打标labelimg

预定义标签 格式name label 

数据集定义文件errimg.yaml

train: /home/kean/works/yolov7/dataset/train.txt
val: /home/kean/works/yolov7/dataset/val.txt
# number of classes
nc: 1
# class names
names: ["error_dialog"]

数据定义文件train.txt  val.txt

/home/kean/works/yolov7/dataset/errorimg/0001_20240827161436885_000002_error_dialog_000000_10.jpg
/home/kean/works/yolov7/dataset/errorimg/0001_20240827161535653_000004_error_dialog_000000_11.jpg
/home/kean/works/yolov7/dataset/errorimg/0001_20240827161607499_000000_error_dialog_000000_000000_1.jpg
/home/kean/works/yolov7/dataset/errorimg/0001_20240827161624781_000005_error_dialog_000000_12.jpg
/home/kean/works/yolov7/dataset/errorimg/0001_20240827161653984_000007_error_dialog_000000_2.jpg
/home/kean/works/yolov7/dataset/errorimg/0001_20240827161706026_000008_error_dialog_000000_3.jpg
/home/kean/works/yolov7/dataset/errorimg/0001_20240827161718809_000009_error_dialog_000000_4.jpg
/home/kean/works/yolov7/dataset/errorimg/0001_20240827161730368_000010_error_dialog_000000_5.jpg
/home/kean/works/yolov7/dataset/errorimg/0001_20240827161742384_000011_error_dialog_000000_6.jpg
/home/kean/works/yolov7/dataset/errorimg/0001_20240827161753549_000012_error_dialog_000000_8.jpg
/home/kean/works/yolov7/dataset/errorimg/0001_20240827161804745_000013_error_dialog_000000_9.jpg
/home/kean/works/yolov7/dataset/errorimg/0001_20240827161640191_000006_error_dialog_000000_13.png

图片文件和标签文件放在一起

执行训练:

(yolov7) kean@kean-MS-7D48:~/works/yolov7$ python train.py --weights yolov7.pt  --cfg cfg/training/yolov7.yaml  --data dataset/errimg.yaml --epoch 200 --batch-size 8 --img 640
 

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com