I think the problem was with my parameters. When I uploaded my dataset to the Ultralytics Hub and trained from there, the model performed well. Most likely there was a problem with the rect parameter, as you call it image size or as you say. I transmit the new parameters:
hyp_last.yaml
epochs: 100
lr0: 0.01
lrf: 0.01
momentum: 0.937
weight_decay: 0.0005
warmup_epochs: 3.0
warmup_momentum: 0.8
warmup_bias_lr: 0.1
box: 7.5
cls: 0.5
dfl: 1.5
pose: 12.0
kobj: 1.0
label_smoothing: 0.0
nbs: 64
hsv_h: 0.010
hsv_s: 0.2
hsv_v: 0.2
degrees: 2.0
translate: 0.1
scale: 0.5
shear: 1.0
perspective: 0.0
flipud: 0.0
fliplr: 0.0
bgr: 0.0
mosaic: 1.0
iou: 0.7
max_det: 20
batch: -1
imgsz: 640
train.py =
from ultralytics import YOLO
import yaml
import wandb
from wandb.integration.ultralytics import add_wandb_callback
# WandB oturumunu başlatın
if __name__ == "__main__":
wandb.login()
with open('hyp.yaml', 'r') as file:
hyperparameters = yaml.safe_load(file)
project="Alpha"
group = "yolov8l-hub"
deneme=3
wandb.init(project=project, job_type="training", group=group , name=f"{group}{deneme}" , config=hyperparameters)
# Modeli yükleyin
#hub.login()
model = YOLO('/root/yolov8/yolov8l.pt')
# WandB callback'ini ekleyin
add_wandb_callback(model, enable_model_checkpointing=True)
# Modeli eğitin
model.train(
data='/root/yolov8/datasets/detect/detect.yaml',
project=project,
name=f"{group}{deneme}",
cfg='hyp_last.yaml',
verbose=True,
plots=True,
)
model.val()
# WandB oturumunu sonlandırın
wandb.finish()
Thank you for your help:) The training is in progress, I will forward the training results when it is finished