Python 官方文档:入门教程 => 点击学习
一.训练数据集准备 YOLOv8的训练数据格式与YOLOv5的训练数据格式一致,这一部分可以进行沿用。之前博文有发布VOC标注格式转YOLO标注格式的脚本,有需要可以查看。 二.项目克隆 YOLOv8项目文件
pip install -r requirements.txt
NWPU VHR-10 dataset/split_data
train
images
000001.jpg
000002.jpg
000003.jpg
......
labels
000001.txt
000002.txt
000003.txt
......
val
images
......
labels
......
test
images
......
labels
......
# Train settings -------------------------------------------------------------------------------------------------------model: # path to model file, i.e. yolov8n.pt, yolov8n.yamldata: # path to data file, i.e. i.e. coco128.yamlepochs: 100 # number of epochs to train forpatience: 50 # epochs to wait for no observable improvement for early stopping of trainingbatch: 16 # number of images per batch (-1 for AutoBatch)imgsz: 640 # size of input images as integer or w,hsave: True # save train checkpoints and predict resultscache: False # True/ram, disk or False. Use cache for data loadingdevice: # device to run on, i.e. cuda device=0 or device=0,1,2,3 or device=cpuworkers: 8 # number of worker threads for data loading (per RANK if DDP)project: # project namename: # experiment nameexist_ok: False # whether to overwrite existing experimentpretrained: False # whether to use a pretrained modeloptimizer: SGD # optimizer to use, choices=['SGD', 'Adam', 'AdamW', 'RMSProp']verbose: True # whether to print verbose outputseed: 0 # random seed for reproducibilitydeterministic: True # whether to enable deterministic modesingle_cls: False # train multi-class data as single-classimage_weights: False # use weighted image selection for trainingrect: False # support rectangular training if mode='train', support rectangular evaluation if mode='val'cos_lr: False # use cosine learning rate schedulerclose_mosaic: 10 # disable mosaic augmentation for final 10 epochsresume: False # resume training from last checkpointmin_memory: False # minimize memory footprint loss function, choices=[False, True, ]
python train.py
来源地址:https://blog.csdn.net/weixin_42182534/article/details/129040961
--结束END--
本文标题: YOLOv8进行改进并训练自定义的数据集
本文链接: https://www.lsjlt.com/news/384513.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-03-01
2024-03-01
2024-03-01
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0