增加cvat反向上传
This commit is contained in:
19
ultralytics_yolo11-main/train_xiantiao_detect.py
Normal file
19
ultralytics_yolo11-main/train_xiantiao_detect.py
Normal file
@ -0,0 +1,19 @@
|
||||
from ultralytics import YOLO
|
||||
|
||||
if __name__ == '__main__':
|
||||
#model = YOLO(r'/home/hx/yolo/ultralytics_yolo11-main/ultralytics/cfg/models/11/yolo11-obb.yaml')
|
||||
model = YOLO(r'/home/hx/yolo/ultralytics_yolo11-main/ultralytics/cfg/models/11/yolo11.yaml')
|
||||
results = model.train(
|
||||
data='xiantiaodata.yaml',
|
||||
epochs=2000,
|
||||
imgsz=640,
|
||||
batch=4,
|
||||
workers=10,
|
||||
device='0',
|
||||
project='runs/train',
|
||||
name='exp_detect',
|
||||
exist_ok=False,
|
||||
optimizer='AdamW',
|
||||
lr0=0.0005,
|
||||
patience=0,
|
||||
)
|
||||
@ -2,7 +2,7 @@
|
||||
# YOLO11 object detection model with P3-P5 outputs. For Usage examples see https://docs.ultralytics.com/tasks/detect
|
||||
|
||||
# Parameters
|
||||
nc: 1 # number of classes
|
||||
nc: 2 # number of classes
|
||||
scales: # model compound scaling constants, i.e. 'model=yolo11n.yaml' will call yolo11.yaml with scale 'n'
|
||||
# [depth, width, max_channels]
|
||||
n: [0.50, 0.25, 1024] # summary: 319 layers, 2624080 parameters, 2624064 gradients, 6.6 GFLOPs
|
||||
|
||||
7
ultralytics_yolo11-main/xiantiaodata.yaml
Normal file
7
ultralytics_yolo11-main/xiantiaodata.yaml
Normal file
@ -0,0 +1,7 @@
|
||||
path: /home/hx/开发/ML_xiantiao/class_xiantiao_pc/test_image # 数据集所在路径
|
||||
train: train # 数据集路径下的train.txt
|
||||
val: val # 数据集路径下的val.txt
|
||||
test: test # 数据集路径下的test.txt
|
||||
|
||||
nc: 2
|
||||
names: ['hole','crack']
|
||||
Reference in New Issue
Block a user