windows下labelImg使用,以及训练一个yolov8模型(已标注240张图片有下载地址,零门槛学习)
(1)下载项目
https://github.com/TommyAK/yolov8-borzoi-detector 项目好像是老毛子撸的,咱只能祝他们好运了
我把它下载到D:\github_yolo\TommyAK\yolov8-borzoi-detector
(2)打开labelImg-1.8.6
已经标注好了,如果不需要修改的话这一步骤可以不看
把data/classes.txt拷贝到data\train\labels
点左边的按钮‘Open Dir’,选择路径:D:\github_yolo\TommyAK\yolov8-borzoi-detector\data\train\images
点左边的按钮‘Change Save Dir’,选择路径:D:\github_yolo\TommyAK\yolov8-borzoi-detector\data\train\labels
(3)安装yolov8配置
找到: %appdata%/Ultralytics/settings.yaml 把里面的每一行前面加井号注释掉。不能删除文件,否则还会创建的,只能注释
(4)在预训练模型基础上训练
cd /d D:\github_yolo\TommyAK\yolov8-borzoi-detector
yolo task=detect mode=train model= D:\github_yolo\TommyAK\yolov8-borzoi-detector\yolov8n.pt data=D:\github_yolo\TommyAK\yolov8-borzoi-detector\data\data.yaml epochs=100 batch=16
(5)使用模型物体检测
yolo task=detect mode=predict model=./runs/detect/train/weights/best.pt source=./data/test/images/ save=True
检测结果在:.\runs\detect\predict\里面
参考:
https://blog.csdn.net/qq_43585355/article/details/132289491
预训练模型下载地址:
https://docs.ultralytics.com/models/yolov8/
https://github.com/ultralytics/assets/releases
https://zhuanlan.zhihu.com/p/621030971