aded training script

single_channel
Samuel Dobron 6 months ago
parent 9e42d05e01
commit 569c23e681

@ -0,0 +1,13 @@
# Train/val/test sets as
## 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
path: /home/xdobro23/data/yolov8_16bit/ # dataset root dir
train: images/train # train images (relative to 'path') 128 images
val: images/val # val images (relative to 'path') 128 images
# test: # test images (optional)
# Classes
nc: 1 # number of classes
names: ['green'] # class names
ch: 1

@ -1,6 +1,6 @@
from ultralytics import YOLO from ultralytics import YOLO
# Load a model # Load a model
model = YOLO('yolov8.yaml') model = YOLO('yolov8s.yaml')
results = model.train(data='data/data.yaml', epochs=10, imgsz=640, device='mps', workers=0) results = model.train(data='data.yaml', save_period=10, epochs=5000, batch=10, imgsz=1504, patience=100, device=1)

Loading…
Cancel
Save