File size: 427 Bytes
f6756f9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from ultralytics import YOLO
model = YOLO('yolo11m.pt')

model.train(
    data='/content/cigarette-3/data.yaml',
    epochs=30,
    imgsz=640,
    batch=16,
    patience=5,
    optimizer="SGD",
    lr0=0.001,
    lrf=0.01,
    momentum=0.937,
    weight_decay=0.0005,
    warmup_epochs=3,
    hsv_h=0.015, hsv_s=0.7, hsv_v=0.4,
    translate=0.1, scale=0.5,
    fliplr=0.5, mosaic=1.0, mixup=0.1,
    device=0,
    cache=True
)