Loading...
Loading...
Use when improving or comparing Ultralytics YOLO models in Platform or code, or running hyperparameter search/autotraining — Platform experiment comparison, the systematic improvement playbook, model.tune() genetic evolution, Ray Tune, search spaces, and deciding whether tuning is worthwhile. For one training run and its arguments, see yolo-training.
npx skill4agent add ultralytics/skills yolo-tuningconfusion_matrix.pngtrain_batch*.jpgepochspatienceimgszdegrees=180 flipud=0.5copy_paste=0.3mixup=0.1hsv_htraining-args.mdproject=username/project-slugname.ptfrom ultralytics import YOLO
model = YOLO("yolo26n.pt")
model.tune(data="data.yaml", epochs=30, iterations=300, plots=False, save=False, val=False)yolo tunelr0lrfmomentumweight_decaywarmup_epochswarmup_momentumboxclscls_pwdflhsv_*degreestranslatescaleshearperspectiveflipudfliplrbgrmosaicmixupcutmixcopy_pasteclose_mosaic(min, max)model.tune(data="data.yaml", epochs=30, iterations=100, space={"lr0": (1e-5, 1e-1), "mosaic": (0.5, 1.0)})runs/<task>/tune/best_hyperparameters.yamltune_results.ndjsonmongodb_uri=mongodb_db=mongodb_collection=model = YOLO("yolo26n.pt")
result_grid = model.tune(use_ray=True, data="data.yaml", iterations=20, epochs=30, gpu_per_trial=1)pip install "ray[tune]"grace_periodsearch_alg="random"wandbnsepochsplots=False save=False val=Falsedatayolo checksyolo cfg