-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtrain.py
More file actions
32 lines (29 loc) · 955 Bytes
/
train.py
File metadata and controls
32 lines (29 loc) · 955 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# This file is part of owo-dusk.
#
# Copyright (c) 2024-present EchoQuill
#
# Portions of this file are based on code by EchoQuill, licensed under the
# GNU General Public License v3.0 (GPL-3.0).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# Use ultralytics to train a YOLO model
from ultralytics import YOLO
# Make sure to edit path!
model = YOLO("/mnt/mintuser-home/mint-profile/Desktop/dusk-dev/runs/detect/runs/train/captcha_test9/weights/best.pt")
# Made sure to remove the annoying rotate.
# That was causing issues with `m` and `w`
model.train(
data="data.yaml",
epochs=40,
batch=16,
imgsz=384,
workers=0,
project="runs/train",
name="captcha_test_stabilise",
patience=10,
fliplr=0.0,
flipud=0.0,
)