mirror of
https://github.com/ferdzo/vesselDetection.git
synced 2026-04-05 10:16:25 +00:00
Updates
This commit is contained in:
21
train.py
21
train.py
@@ -1,27 +1,28 @@
|
||||
import os
|
||||
from ultralytics import YOLO
|
||||
|
||||
model = YOLO("yolo11x.pt")
|
||||
model = YOLO("yolo11l.pt")
|
||||
|
||||
data_path = 'ships-aerial-images/data.yaml'
|
||||
|
||||
train_params = {
|
||||
'epochs': 20,
|
||||
'batch': 8,
|
||||
'epochs': 40,
|
||||
'batch': 32,
|
||||
'imgsz': 640,
|
||||
'lr0': 0.01,
|
||||
'lrf': 0.01,
|
||||
'lr0': 5e-4,
|
||||
'lrf': 0.1,
|
||||
'warmup_epochs': 5,
|
||||
'warmup_bias_lr': 1e-6,
|
||||
'momentum': 0.937,
|
||||
'weight_decay': 0.0005,
|
||||
'weight_decay': 0.0001,
|
||||
'optimizer': 'AdamW',
|
||||
'device': '0,1',
|
||||
'pretrained': True,
|
||||
'project': 'runs/train',
|
||||
'name': 'vessel_training',
|
||||
'name': 'vessel_deteciton_v11l',
|
||||
'exist_ok': True,
|
||||
'save_period': 2,
|
||||
'workers': 8,
|
||||
'auto_augment': 'autoaugment',
|
||||
'patience': 20,
|
||||
'cos_lr': True,
|
||||
}
|
||||
|
||||
model.train(data=data_path, **train_params)
|
||||
Reference in New Issue
Block a user