guides/hyperparameter-tuning/ #9536
Replies: 18 comments 54 replies
-
from ultralytics import YOLO Initialize the YOLO modelmodel = YOLO('yolov8n.pt') Tune hyperparameters on COCO8 for 30 epochsmodel.tune(data='coco8.yaml', epochs=30, iterations=300, optimizer='AdamW', plots=False, save=False, val=False) in this portion of code I have facing the following error: local variable 'ckpt_file' referenced before assignment |
Beta Was this translation helpful? Give feedback.
-
Hello, comp sci student here! I just wanted to ask about how to improve the accuracy. I have it trained a custom dataset involving plants, and after training, I used the tune method cause the accuracy after training wasn't enough. I used best.pt from the tune folder for the chosen model but the results were the same before tuning. Is there anything else I need to be doing/changing to see results? |
Beta Was this translation helpful? Give feedback.
-
What optimizers I can use beside AdamW? |
Beta Was this translation helpful? Give feedback.
-
Hello, I got stuck with some issue related with GPU workflow. |
Beta Was this translation helpful? Give feedback.
-
hello I'm trying to find the best hyperparameter using gridsearch, but I'm having trouble comparing each mAP. Is there a solution or reference related to using gridsearch to find the best hyperparameter? |
Beta Was this translation helpful? Give feedback.
-
Hello, I recently tuned the
So far so good. However, I wanted to replicate these results, which I believe is possible since the
In my |
Beta Was this translation helpful? Give feedback.
-
I have a question about hyperparameter tuning: I illusrate this with two pieces of code: Run 500 iteration at once is like:model = YOLO("yolov8m.yaml") Run 250 iterations then 25 iterationsmodel = YOLO("yolov8m.yaml") So, should I get the same results in scenario one and scenario two? |
Beta Was this translation helpful? Give feedback.
-
Hi, I'm new in AI, and I want to fine tuned my yolov10 model. I have already trained it on my own data set. Now I want to test to find the best hyperparameter, but I don't know how to write it. |
Beta Was this translation helpful? Give feedback.
-
Hi there, I'm encountering the following error message: TypeError: 'SegmentMetrics' object is not subscriptable param_grid = { param_combinations = list(itertools.product(*param_grid.values()))
Find the parameters with the best mAPbest_params = max(results_dict, key=results_dict.get) |
Beta Was this translation helpful? Give feedback.
-
Only tuning a set of HyperparametersMy name is Mario, and I am currently conducting research on atherosclerosis detection in coronary angiography medical images using YOLOv8. Due to specific requirements of my project, I have developed a custom data augmentation class and therefore, I am not utilizing any of the YOLOv8 augmentation parameters. I would like to inquire if there is a method by which I can selectively fine-tune a specific set of hyperparameters using the Genetic Algorithm (GA). For instance, I wish to optimize parameters such as Your assistance and guidance on this matter would be greatly appreciated! |
Beta Was this translation helpful? Give feedback.
-
can ı use this for yolov4 |
Beta Was this translation helpful? Give feedback.
-
How can I choose the best parameters for my custom model? Which parameters impact the model's performance? Is using Optuna a good option for finding the best parameter values? |
Beta Was this translation helpful? Give feedback.
-
Greetings, All
|
Beta Was this translation helpful? Give feedback.
-
Hello. I would like to use YOLOv8 hyperparameter tuning but also I want to optimize the copy-paste augmentation. I noticed by default for hyperparameter tuning the copy-paste augmentation is set to zero across all iterations and not explored. How can I enable this? |
Beta Was this translation helpful? Give feedback.
-
hello, I am having trouble running the fine tuning code below """ Initialize the YOLO modelmodel = YOLO("yolov8n.pt") Tune hyperparameters on COCO8 for 30 epochsmodel.tune(data="GlobalWheat2020.yaml", epochs=1, iterations=4, optimizer="AdamW", plots=True, save=True, val=True) paths are correct for both model and data �[34m�[1mTuner: �[0mInitialized Tuner instance with 'tune_dir=C:\Users\msi\runs\detect\tune' �[34m�[1mTuner: �[0m1/4 iterations complete ✅ (2.54s) Printing '�[1m�[30mC:\Users\msi\runs\detect\tune\best_hyperparameters.yaml�[0m' it's like the fine tuning is not doing the training at all and there is no folder train, why is that ? how to solve this ? thank you |
Beta Was this translation helpful? Give feedback.
-
I'm encountering an error when running the following code: from ultralytics import YOLO model = YOLO("yolo8s.pt") The error is: |
Beta Was this translation helpful? Give feedback.
-
Hey there, i want to ask. What a calculation or formula that hyperparameter tuning use for get the fitness score when we using model.tune? is there a spesific formula? |
Beta Was this translation helpful? Give feedback.
-
Hey there. What is the exact formula for fitness score in model.tune function? Where i can find it? I want to compare my grid search method performance with model.tune performance using fitness score on model.tune as based. What the exact formula for this function fitness score? |
Beta Was this translation helpful? Give feedback.
-
guides/hyperparameter-tuning/
Dive into hyperparameter tuning in Ultralytics YOLO models. Learn how to optimize performance using the Tuner class and genetic evolution.
https://docs.ultralytics.com/guides/hyperparameter-tuning/
Beta Was this translation helpful? Give feedback.
All reactions