yolov8 trains its own fall data set

reference:

https://www.bilibili.com/video/BV1xL411B7ax

https://www.dgrt.cn/a/2364195.html?action=onClick

https://blog.roboflow.com/how-to-train-yolov8-on-a-custom-dataset/

1. Data set production (generally in coco format):

lableme, or online at https://universe.roboflow.com/

insert image description here
Each data of pictures and labels has a corresponding picture and label, and the two names of picture and label correspond to the same
insert image description here
label. txt file format, the first one is category, the last four are x, y coordinates and w, h
insert image description here
insert image description here

Dataset download address: https://universe.roboflow.com/hero-d6kgf/yolov5-fall-detection/dataset/1

(The roboflow data can basically be used after downloading)
There is only one category.
insert image description here
After downloading, put it in ultralytics-main, download git clone https://github.com/ultralytics/ultralytics.git

Create a dataset folder, put the dataset below, change the name of the dataset, and special symbols will affect
insert image description here
data.yamlinsert image description here

2. Training

Reference: https://www.cnblogs.com/thx2199/p/17165169.html https://mp.weixin.qq.com/s?__biz=MzU1NjEwMTY0Mw==&mid=2247580124&idx=2&sn=d3a2bffed619fb0470de6468a8b7e0e0&chksm= fbc9c0b8ccbe49ae7dffd1fda5aeec8a805df8f227345a7927f9e67c8ac843f734c15d40da08&scene=
27

For training, enter ultralytics-main and open the cmd window:

It is best to use an absolute path for data

 yolo task=detect mode=train model=yolov8s.pt data=D:\opencv2\ultralytics-main\dataset\Fall_Detection\data.yaml epochs=15 imgsz=640

CPU training is slow. . .
insert image description here
insert image description here
Breakpoint in training:
Reference: https://blog.csdn.net/qq_40835644/article/details/129283661

复制last.pt的路径,继续训练使用以下命令:

yolo task=detect mode=train model=/home/*****uns/detect/train10/weights/last.pt data=mydata_orange.yaml epochs=300 batch=16 save=True resume=True

The weight of the training process data results will be stored in this address: runs\detect\train2
insert image description here

Model Validation Inference

Training 15epco, the effect feels average

yolo detect predict model=D:\opencv2\ultralytics-main\runs\detect\train2\weights\best.pt  source=d5.jpg

insert image description here
insert image description here

Guess you like

Origin blog.csdn.net/weixin_42357472/article/details/131412851
Recommended