# Yolo model not get optimized for my custom dataset

**URL:** <https://community.wandb.ai/t/yolo-model-not-get-optimized-for-my-custom-dataset/7055>\
**Category:** W&B Help\
**Created:** [June 30, 2024, 9:28pm UTC](https://community.wandb.ai/t/yolo-model-not-get-optimized-for-my-custom-dataset/7055 "2024-06-30T21:28:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kavindar-edu](https://avatars.discourse-cdn.com/v4/letter/k/848f3c/32.png) [@kavindar-edu](https://community.wandb.ai/u/kavindar-edu)\
**Post date:** [June 30, 2024, 9:28pm UTC](https://community.wandb.ai/t/yolo-model-not-get-optimized-for-my-custom-dataset/7055/1 "2024-06-30T21:28:14Z")

</div>

Hello,

I was playing around with W&B to tune the hyperparameters. Let’s say I am using YOLOv8 to fine-tune a custom dataset (Visdrone dataset). Assume the dataset is well-preprocessed. Here is what I did:

First, I trained the dataset with YOLO without knowing the initial losses and metrics for 100 epochs and obtained the results. I observed that losses like box, classification, and DFL were not minimal, ranging between 0.7 and 2.0. I also observed overfitting.

Then, I tried W&B Sweep to tune the previously trained model for hyperparameter tuning with minimal parameters like initial learning rate, batch size, and momentum. After training for 25 epochs, I was unable to get good values for losses and metrics. So, I tried several parameters, including augmentation. Sometimes, this also ended with overfitting. My questions are:

I) Did I follow the correct process?  
II) Why am I unable to get a good model through hyperparameter tuning?  
III) I also used Ray Tune, and it gives different results for the same initial values. with wandb How is that possible?

I am really confused about getting a good model. Will this approach be the same if I use Keras, TensorFlow, or PyTorch? For this experiment, I just used Ultralytics.

---

<div class="post-metadata">

**Author:** ![jason-arkens17](https://avatars.discourse-cdn.com/v4/letter/j/f07891/32.png) [@jason-arkens17](https://community.wandb.ai/u/jason-arkens17)\
**Post date:** [July 8, 2024, 5:14pm UTC](https://community.wandb.ai/t/yolo-model-not-get-optimized-for-my-custom-dataset/7055/2 "2024-07-08T17:14:32Z")

</div>

Hi Kavinda,

Apologies for the late reply. Are you still experiencing these issues? Let me know where things stand and if you still need assistance 🙂

---

<div class="post-metadata">

**Author:** ![jason-arkens17](https://avatars.discourse-cdn.com/v4/letter/j/f07891/32.png) [@jason-arkens17](https://community.wandb.ai/u/jason-arkens17)\
**Post date:** [July 10, 2024, 5:48pm UTC](https://community.wandb.ai/t/yolo-model-not-get-optimized-for-my-custom-dataset/7055/3 "2024-07-10T17:48:39Z")

</div>

Hi Kavinda,

We wanted to follow up with you regarding your support request as we have not heard back from you. Please let us know if we can be of further assistance or if your issue has been resolved.

Best,  
Weights & Biases

---

<div class="post-metadata">

**Author:** ![jason-arkens17](https://avatars.discourse-cdn.com/v4/letter/j/f07891/32.png) [@jason-arkens17](https://community.wandb.ai/u/jason-arkens17)\
**Post date:** [July 11, 2024, 5:45pm UTC](https://community.wandb.ai/t/yolo-model-not-get-optimized-for-my-custom-dataset/7055/4 "2024-07-11T17:45:50Z")

</div>

Hi Kavinda, since we have not heard back from you we are going to close this request. If you would like to re-open the conversation, please let us know!
