smoking-detection / train.py
Enos-123's picture
Create train.py
f6756f9 verified
raw
history blame contribute delete
427 Bytes
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
)