Compare commits
2 Commits
310131d876
...
2a3e5b17e7
Author | SHA1 | Date | |
---|---|---|---|
2a3e5b17e7 | |||
c57c8f3552 |
3
.gitignore
vendored
3
.gitignore
vendored
@ -299,5 +299,6 @@ Temporary Items
|
|||||||
|
|
||||||
# project files
|
# project files
|
||||||
/whl_packages/
|
/whl_packages/
|
||||||
/federated_learning/runs/detect/*
|
runs/
|
||||||
|
*.pt
|
||||||
*.cache
|
*.cache
|
||||||
|
6
yolov8/yolov8.yaml
Normal file
6
yolov8/yolov8.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
train: /mnt/DATA/dataset/uav_dataset/train/images/
|
||||||
|
val: /mnt/DATA/dataset/uav_dataset/val/images/
|
||||||
|
test: /mnt/DATA/dataset/test2/images/
|
||||||
|
# number of classes
|
||||||
|
nc: 1
|
||||||
|
names: ['uav']
|
13
yolov8/yolov8_train.py
Normal file
13
yolov8/yolov8_train.py
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
from ultralytics import YOLO
|
||||||
|
|
||||||
|
# 加载预训练模型
|
||||||
|
model = YOLO('../yolov8n.pt')
|
||||||
|
|
||||||
|
# 开始训练
|
||||||
|
model.train(
|
||||||
|
data='./yolov8.yaml', # 数据配置文件路径
|
||||||
|
epochs=320, # 训练轮数
|
||||||
|
batch=-1, # 批量大小
|
||||||
|
imgsz=640, # 输入图片大小
|
||||||
|
device=0 # 使用的设备(0 表示 GPU,'cpu' 表示 CPU)
|
||||||
|
)
|
Loading…
Reference in New Issue
Block a user