{
  "id": 575799,
  "title": "Yolo train differs",
  "url": "/competitions/byu-locating-bacterial-flagellar-motors-2025/discussion/575799",
  "author_name": "eikyou",
  "post_date": "2025-05-01T02:30:43.230000",
  "votes": 5,
  "comment_count": 21,
  "views": 0,
  "content": "<p>I trained YOLO11 2 times on the same data and the same parameters (don't ask me why i did this). And I got extremely different results. Both optimal F1 threshold and LB are absolutely different. <br>\nI do understand that training itself is kinda random and augmentations are random too. I am wondering if such a behaviour is normal or am I missing something?</p>",
  "messages": [
    {
      "id": 3194267,
      "postDate": "2025-05-05T15:42:34.343Z",
      "content": "<h3>FYI.Ultralytics YOLO reproducibility</h3>\n<ul>\n<li>The default setting is <strong>deterministic is false.</strong></li>\n</ul>\n<pre><code>\ndef init_seeds(=0, =):\n.\n</code></pre>\n<ul>\n<li>Therefore, to ensure reproducibility, <strong>deterministic must be set to True</strong> in the Torch implementation.</li>\n<li>According to the Ultralytics src and manual, it can be set up as follows:</li>\n</ul>\n<pre><code>\n ultralytics.utils.torch_utils import init_seeds\ninit_seeds(=42, =)\n\n\nimport torch.backends.cudnn as cudnn\n(cudnn.deterministic)\n\n⇒\n</code></pre>\n<p>P.S I have limited computing resources, so this is just an observation based on looking at the source, but I hope it will be helpful.</p>",
      "rawMarkdown": "### FYI.Ultralytics YOLO reproducibility\n* The default setting is **deterministic is false.**\n```\n# ultralytics/ultralytics/utils/torch_utils.py\ndef init_seeds(seed=0, deterministic=False):\n...\n```\n* Therefore, to ensure reproducibility, **deterministic must be set to True** in the Torch implementation.\n* According to the Ultralytics src and manual, it can be set up as follows:\n```\n# YOLO deterministic setting\nfrom ultralytics.utils.torch_utils import init_seeds\ninit_seeds(seed=42, deterministic=True)\n\n# Check torch deterministic\nimport torch.backends.cudnn as cudnn\nprint(cudnn.deterministic)\n\n⇒True\n```\n\nP.S I have limited computing resources, so this is just an observation based on looking at the source, but I hope it will be helpful.",
      "votes": 5,
      "replies": [
        {
          "id": 3194296,
          "postDate": "2025-05-05T16:44:40.647Z",
          "content": "<p>who could've known that seed is not enough… thanks!</p>",
          "rawMarkdown": "who could've known that seed is not enough... thanks!",
          "votes": 1
        }
      ]
    },
    {
      "id": 3190706,
      "postDate": "2025-05-01T02:30:43.230Z",
      "content": "<p>I trained YOLO11 2 times on the same data and the same parameters (don't ask me why i did this). And I got extremely different results. Both optimal F1 threshold and LB are absolutely different. <br>\nI do understand that training itself is kinda random and augmentations are random too. I am wondering if such a behaviour is normal or am I missing something?</p>",
      "rawMarkdown": "I trained YOLO11 2 times on the same data and the same parameters (don't ask me why i did this). And I got extremely different results. Both optimal F1 threshold and LB are absolutely different. \nI do understand that training itself is kinda random and augmentations are random too. I am wondering if such a behaviour is normal or am I missing something?",
      "votes": 5
    },
    {
      "id": 3192933,
      "postDate": "2025-05-03T15:00:22.617Z",
      "content": "<p>With a fixed seed, I consistently obtain the same results when using the same training parameters. The training code is adapted from the Kaggle YOLO baseline.</p>",
      "rawMarkdown": "With a fixed seed, I consistently obtain the same results when using the same training parameters. The training code is adapted from the Kaggle YOLO baseline.",
      "votes": 3
    },
    {
      "id": 3191256,
      "postDate": "2025-05-01T15:42:40.890Z",
      "content": "<p>Do you have an early stopping condition?  It’s possible your LR is too high or too low so one model got stuck in a local minima while the other moved closer to the global minima.  Maybe try tuning your LR or using something like a decaying LR?  I’m guessing one model plateaued early and hit an early stopping condition whereas the other had a better initialization and was fortunate to find a better “path”</p>",
      "rawMarkdown": "Do you have an early stopping condition?  It’s possible your LR is too high or too low so one model got stuck in a local minima while the other moved closer to the global minima.  Maybe try tuning your LR or using something like a decaying LR?  I’m guessing one model plateaued early and hit an early stopping condition whereas the other had a better initialization and was fortunate to find a better “path”",
      "votes": 1,
      "replies": [
        {
          "id": 3191384,
          "postDate": "2025-05-01T17:13:12.133Z",
          "content": "<p>I don't use eraly stopping, but LR Indeed seems to be an issue, it's quite low 1e-4, maybe 2e-4 or 3e-4 would be more more stable. Thanks for a suggestion!</p>",
          "rawMarkdown": "I don't use eraly stopping, but LR Indeed seems to be an issue, it's quite low 1e-4, maybe 2e-4 or 3e-4 would be more more stable. Thanks for a suggestion!",
          "replies": [
            {
              "id": 3191481,
              "postDate": "2025-05-01T19:10:36.527Z",
              "content": "<p>No problem, sometimes I start it large like 1e-3 and then once it stops performing I drop it by a factor of 10.  I hope this helps :D</p>",
              "rawMarkdown": "No problem, sometimes I start it large like 1e-3 and then once it stops performing I drop it by a factor of 10.  I hope this helps :D"
            }
          ]
        }
      ]
    },
    {
      "id": 3190744,
      "postDate": "2025-05-01T03:50:32.313Z",
      "content": "<p>I think the problem is about the \"optimal threshold\", there may be not so much difference in the yolo, but the  LB is very sensitive to threshold..  </p>",
      "rawMarkdown": "I think the problem is about the \"optimal threshold\", there may be not so much difference in the yolo, but the  LB is very sensitive to threshold..  ",
      "votes": 1,
      "replies": [
        {
          "id": 3191083,
          "postDate": "2025-05-01T11:15:21.090Z",
          "content": "<p><a href=\"https://www.kaggle.com/yksinyoung\" target=\"_blank\">@yksinyoung</a> I tried various thresholds and the results are much worse. First model on the threshold 0.3 shows performance 0.796, the second one on the same threshold shows 0.667, which is obviously much worse than the first model and only a bit better than the second model on optimal threshold from yolo training. ;)</p>",
          "rawMarkdown": "@yksinyoung I tried various thresholds and the results are much worse. First model on the threshold 0.3 shows performance 0.796, the second one on the same threshold shows 0.667, which is obviously much worse than the first model and only a bit better than the second model on optimal threshold from yolo training. ;)",
          "replies": [
            {
              "id": 3201617,
              "postDate": "2025-05-14T06:39:12.213Z",
              "content": "<p>I used the setting of iou=0.5 during training. When inferencing on the same model, the iou is changed from 0.45 to 0.3, and the lb score dropped.</p>",
              "rawMarkdown": "I used the setting of iou=0.5 during training. When inferencing on the same model, the iou is changed from 0.45 to 0.3, and the lb score dropped."
            }
          ]
        }
      ]
    },
    {
      "id": 3192857,
      "postDate": "2025-05-03T13:01:34.673Z",
      "content": "<p>Hey <a href=\"https://www.kaggle.com/eikyou\" target=\"_blank\">@eikyou</a>, did you used seeds in your training? <br>\nI've trained my models with seeds and I'm going to try retraining them nd submitting to see what happens. I'll tell you later how it goes.<br>\nA similar thing is happening to me, trained a 5 fold cv (yolo10x) and got models scoring from 0.725 to 0.792.</p>",
      "rawMarkdown": "Hey @eikyou, did you used seeds in your training? \nI've trained my models with seeds and I'm going to try retraining them nd submitting to see what happens. I'll tell you later how it goes.\nA similar thing is happening to me, trained a 5 fold cv (yolo10x) and got models scoring from 0.725 to 0.792.",
      "votes": 2,
      "replies": [
        {
          "id": 3192867,
          "postDate": "2025-05-03T13:23:57.160Z",
          "content": "<p>I didn't fix seed in YOLO itself, and I didn't use CV, i used hold out. Guess i just randomly got a good model ;) Will focus on CV scheme</p>",
          "rawMarkdown": "I didn't fix seed in YOLO itself, and I didn't use CV, i used hold out. Guess i just randomly got a good model ;) Will focus on CV scheme",
          "votes": 1
        },
        {
          "id": 3193557,
          "postDate": "2025-05-04T15:03:06.553Z",
          "content": "<p>How many epochs do you typically train your model?</p>",
          "rawMarkdown": "How many epochs do you typically train your model?",
          "replies": [
            {
              "id": 3193573,
              "postDate": "2025-05-04T15:57:54.830Z",
              "content": "<p><a href=\"https://www.kaggle.com/sjtuwangshuo\" target=\"_blank\">@sjtuwangshuo</a> I usually train for 50 epochs. But I noticed that my models might be overfitting, or that selecting best.pt automatically isn't as optimal as I thought. In one of my folds, I got the best.pt file at different epochs: around 28, 40, and the final one at 50. The respectives scores were 0.816, 0.752, and 0.744.</p>\n<p>I had assumed Ultralytics saves the model with the best validation loss, but now I'm not so sure (or that best validation loss = best lb). I need to take a look into that. This experiment wasn’t really planned, I just didn’t have time to train all the folds and didn't want to lose daily submissions.</p>",
              "rawMarkdown": "@sjtuwangshuo I usually train for 50 epochs. But I noticed that my models might be overfitting, or that selecting best.pt automatically isn't as optimal as I thought. In one of my folds, I got the best.pt file at different epochs: around 28, 40, and the final one at 50. The respectives scores were 0.816, 0.752, and 0.744.\n\nI had assumed Ultralytics saves the model with the best validation loss, but now I'm not so sure (or that best validation loss = best lb). I need to take a look into that. This experiment wasn’t really planned, I just didn’t have time to train all the folds and didn't want to lose daily submissions.",
              "votes": 1
            },
            {
              "id": 3193578,
              "postDate": "2025-05-04T16:19:56.293Z",
              "content": "<p>Thanks for sharing your interesting findings. In Ultralytics, the best checkpoint is usually saved based on a weighted metric: 0.1 × mAP@0.5 + 0.9 × mAP@0.5:0.95 (<a href=\"https://github.com/ultralytics/ultralytics/issues/14137\" target=\"_blank\">as referenced here</a>). </p>\n<p>Besides, how did you decide which epoch's checkpoint to submit (e.g., 28, 40, or 50)? Does the checkpoint at epoch 28 have the lowest dfl loss?</p>",
              "rawMarkdown": "Thanks for sharing your interesting findings. In Ultralytics, the best checkpoint is usually saved based on a weighted metric: 0.1 × mAP@0.5 + 0.9 × mAP@0.5:0.95 ([as referenced here](https://github.com/ultralytics/ultralytics/issues/14137)). \n\nBesides, how did you decide which epoch's checkpoint to submit (e.g., 28, 40, or 50)? Does the checkpoint at epoch 28 have the lowest dfl loss?"
            },
            {
              "id": 3193626,
              "postDate": "2025-05-04T17:48:24.833Z",
              "content": "<p>Thanks <a href=\"https://www.kaggle.com/sjtuwangshuo\" target=\"_blank\">@sjtuwangshuo</a>. It wasn’t a thought out decision. I just used whatever checkpoint I had ready at the time to use my daily submissions. Unfortunaly, my \"val_period\" was set to 5, so the training plot it's not that useful to find what epoch was best.</p>\n<p>The checkpoint at epoch 28 didn’t have the lowest loss overall, but the validation loss was lower than the training loss, wich is good. Also, there’s a big shift in the loss curve around epoch 40. that’s when mosaic augmentation stops.<br>\nMaybe if I used a later checkpoint before closing mosaic it would have a better lb than a chekpoint in epoch 28, I still have to test this.</p>\n<p>Here's the training curve below so you can see what I mean.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2221915%2Fe01979fd60cde14a1a364d36c99dfee9%2Fdfl_loss_curve.png?generation=1746380314405281&amp;alt=media\" alt=\"training loss curve (period=5)\"></p>",
              "rawMarkdown": "Thanks @sjtuwangshuo. It wasn’t a thought out decision. I just used whatever checkpoint I had ready at the time to use my daily submissions. Unfortunaly, my \"val_period\" was set to 5, so the training plot it's not that useful to find what epoch was best.\n\nThe checkpoint at epoch 28 didn’t have the lowest loss overall, but the validation loss was lower than the training loss, wich is good. Also, there’s a big shift in the loss curve around epoch 40. that’s when mosaic augmentation stops.\nMaybe if I used a later checkpoint before closing mosaic it would have a better lb than a chekpoint in epoch 28, I still have to test this.\n\nHere's the training curve below so you can see what I mean.\n\n![training loss curve (period=5)](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2221915%2Fe01979fd60cde14a1a364d36c99dfee9%2Fdfl_loss_curve.png?generation=1746380314405281&alt=media)",
              "votes": 1
            },
            {
              "id": 3193656,
              "postDate": "2025-05-04T18:49:59.583Z",
              "content": "<p>btw, i noticed that better models get lower optimal thresholds for F1 on validation. 0.2~ for good models and 0.4~ for much worse models. Maybe it's a coincidence, but still.<br>\nAlso i noticed that optimal threshold for LB is 0.3~</p>",
              "rawMarkdown": "btw, i noticed that better models get lower optimal thresholds for F1 on validation. 0.2~ for good models and 0.4~ for much worse models. Maybe it's a coincidence, but still.\nAlso i noticed that optimal threshold for LB is 0.3~",
              "votes": 2
            },
            {
              "id": 3195257,
              "postDate": "2025-05-06T19:59:53.093Z",
              "rawMarkdown": "",
              "isDeleted": true
            },
            {
              "id": 3197016,
              "postDate": "2025-05-07T18:11:37.047Z",
              "content": "<p><a href=\"https://www.kaggle.com/sersasj\" target=\"_blank\">@sersasj</a> <br>\nThanks for suggesting so interesting finding!<br>\nClose mosic may cause overfittting…<br>\nbtw, What did you set mosaic rate?<br>\n( I think yolo set mosaic as 1.0 in default setting)</p>",
              "rawMarkdown": "@sersasj \nThanks for suggesting so interesting finding!\nClose mosic may cause overfittting...\nbtw, What did you set mosaic rate?\n( I think yolo set mosaic as 1.0 in default setting)\n"
            },
            {
              "id": 3197028,
              "postDate": "2025-05-07T18:34:20.073Z",
              "content": "<p>Thanks <a href=\"https://www.kaggle.com/npinpi\" target=\"_blank\">@npinpi</a>! It was set to 1.0 </p>",
              "rawMarkdown": "Thanks @npinpi! It was set to 1.0 "
            }
          ]
        }
      ]
    },
    {
      "id": 3200223,
      "postDate": "2025-05-12T09:16:19.147Z",
      "content": "<p>hey, can anyone tell me from where it is considered as high LR and from where it is considered as low LR. which is the avg LR like the safest number to start with. and how initial learning rate and final learning rate works. </p>",
      "rawMarkdown": "hey, can anyone tell me from where it is considered as high LR and from where it is considered as low LR. which is the avg LR like the safest number to start with. and how initial learning rate and final learning rate works. ",
      "replies": [
        {
          "id": 3200337,
          "postDate": "2025-05-12T12:31:23.133Z",
          "content": "<p><a href=\"https://www.kaggle.com/mohanapavanbezawada\" target=\"_blank\">@mohanapavanbezawada</a> 1e-4 or 3e-4 are usually ok to start with</p>",
          "rawMarkdown": "@mohanapavanbezawada 1e-4 or 3e-4 are usually ok to start with",
          "votes": 1
        }
      ]
    }
  ],
  "comments": [
    {
      "id": 3194267,
      "author_name": "yukiZ",
      "author_url": "",
      "post_date": "2025-05-05T15:42:34.343000",
      "content": "<h3>FYI.Ultralytics YOLO reproducibility</h3>\n<ul>\n<li>The default setting is <strong>deterministic is false.</strong></li>\n</ul>\n<pre><code>\ndef init_seeds(=0, =):\n.\n</code></pre>\n<ul>\n<li>Therefore, to ensure reproducibility, <strong>deterministic must be set to True</strong> in the Torch implementation.</li>\n<li>According to the Ultralytics src and manual, it can be set up as follows:</li>\n</ul>\n<pre><code>\n ultralytics.utils.torch_utils import init_seeds\ninit_seeds(=42, =)\n\n\nimport torch.backends.cudnn as cudnn\n(cudnn.deterministic)\n\n⇒\n</code></pre>\n<p>P.S I have limited computing resources, so this is just an observation based on looking at the source, but I hope it will be helpful.</p>",
      "votes": 5,
      "replies": [
        {
          "id": 3194296,
          "author_name": "eikyou",
          "author_url": "",
          "post_date": "2025-05-05T16:44:40.647000",
          "content": "<p>who could've known that seed is not enough… thanks!</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 3192933,
      "author_name": "atom1231",
      "author_url": "",
      "post_date": "2025-05-03T15:00:22.617000",
      "content": "<p>With a fixed seed, I consistently obtain the same results when using the same training parameters. The training code is adapted from the Kaggle YOLO baseline.</p>",
      "votes": 3,
      "replies": []
    },
    {
      "id": 3191256,
      "author_name": "Connor",
      "author_url": "",
      "post_date": "2025-05-01T15:42:40.890000",
      "content": "<p>Do you have an early stopping condition?  It’s possible your LR is too high or too low so one model got stuck in a local minima while the other moved closer to the global minima.  Maybe try tuning your LR or using something like a decaying LR?  I’m guessing one model plateaued early and hit an early stopping condition whereas the other had a better initialization and was fortunate to find a better “path”</p>",
      "votes": 1,
      "replies": [
        {
          "id": 3191384,
          "author_name": "eikyou",
          "author_url": "",
          "post_date": "2025-05-01T17:13:12.133000",
          "content": "<p>I don't use eraly stopping, but LR Indeed seems to be an issue, it's quite low 1e-4, maybe 2e-4 or 3e-4 would be more more stable. Thanks for a suggestion!</p>",
          "votes": 0,
          "replies": [
            {
              "id": 3191481,
              "author_name": "Connor",
              "author_url": "",
              "post_date": "2025-05-01T19:10:36.527000",
              "content": "<p>No problem, sometimes I start it large like 1e-3 and then once it stops performing I drop it by a factor of 10.  I hope this helps :D</p>",
              "votes": 0,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 3190744,
      "author_name": "Yksin Young",
      "author_url": "",
      "post_date": "2025-05-01T03:50:32.313000",
      "content": "<p>I think the problem is about the \"optimal threshold\", there may be not so much difference in the yolo, but the  LB is very sensitive to threshold..  </p>",
      "votes": 1,
      "replies": [
        {
          "id": 3191083,
          "author_name": "eikyou",
          "author_url": "",
          "post_date": "2025-05-01T11:15:21.090000",
          "content": "<p><a href=\"https://www.kaggle.com/yksinyoung\" target=\"_blank\">@yksinyoung</a> I tried various thresholds and the results are much worse. First model on the threshold 0.3 shows performance 0.796, the second one on the same threshold shows 0.667, which is obviously much worse than the first model and only a bit better than the second model on optimal threshold from yolo training. ;)</p>",
          "votes": 0,
          "replies": [
            {
              "id": 3201617,
              "author_name": "Heeler-Deer",
              "author_url": "",
              "post_date": "2025-05-14T06:39:12.213000",
              "content": "<p>I used the setting of iou=0.5 during training. When inferencing on the same model, the iou is changed from 0.45 to 0.3, and the lb score dropped.</p>",
              "votes": 0,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 3192857,
      "author_name": "Sergio Alvarez",
      "author_url": "",
      "post_date": "2025-05-03T13:01:34.673000",
      "content": "<p>Hey <a href=\"https://www.kaggle.com/eikyou\" target=\"_blank\">@eikyou</a>, did you used seeds in your training? <br>\nI've trained my models with seeds and I'm going to try retraining them nd submitting to see what happens. I'll tell you later how it goes.<br>\nA similar thing is happening to me, trained a 5 fold cv (yolo10x) and got models scoring from 0.725 to 0.792.</p>",
      "votes": 2,
      "replies": [
        {
          "id": 3192867,
          "author_name": "eikyou",
          "author_url": "",
          "post_date": "2025-05-03T13:23:57.160000",
          "content": "<p>I didn't fix seed in YOLO itself, and I didn't use CV, i used hold out. Guess i just randomly got a good model ;) Will focus on CV scheme</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 3193557,
          "author_name": "AnnieGo",
          "author_url": "",
          "post_date": "2025-05-04T15:03:06.553000",
          "content": "<p>How many epochs do you typically train your model?</p>",
          "votes": 0,
          "replies": [
            {
              "id": 3193573,
              "author_name": "Sergio Alvarez",
              "author_url": "",
              "post_date": "2025-05-04T15:57:54.830000",
              "content": "<p><a href=\"https://www.kaggle.com/sjtuwangshuo\" target=\"_blank\">@sjtuwangshuo</a> I usually train for 50 epochs. But I noticed that my models might be overfitting, or that selecting best.pt automatically isn't as optimal as I thought. In one of my folds, I got the best.pt file at different epochs: around 28, 40, and the final one at 50. The respectives scores were 0.816, 0.752, and 0.744.</p>\n<p>I had assumed Ultralytics saves the model with the best validation loss, but now I'm not so sure (or that best validation loss = best lb). I need to take a look into that. This experiment wasn’t really planned, I just didn’t have time to train all the folds and didn't want to lose daily submissions.</p>",
              "votes": 1,
              "replies": []
            },
            {
              "id": 3193578,
              "author_name": "AnnieGo",
              "author_url": "",
              "post_date": "2025-05-04T16:19:56.293000",
              "content": "<p>Thanks for sharing your interesting findings. In Ultralytics, the best checkpoint is usually saved based on a weighted metric: 0.1 × mAP@0.5 + 0.9 × mAP@0.5:0.95 (<a href=\"https://github.com/ultralytics/ultralytics/issues/14137\" target=\"_blank\">as referenced here</a>). </p>\n<p>Besides, how did you decide which epoch's checkpoint to submit (e.g., 28, 40, or 50)? Does the checkpoint at epoch 28 have the lowest dfl loss?</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 3193626,
              "author_name": "Sergio Alvarez",
              "author_url": "",
              "post_date": "2025-05-04T17:48:24.833000",
              "content": "<p>Thanks <a href=\"https://www.kaggle.com/sjtuwangshuo\" target=\"_blank\">@sjtuwangshuo</a>. It wasn’t a thought out decision. I just used whatever checkpoint I had ready at the time to use my daily submissions. Unfortunaly, my \"val_period\" was set to 5, so the training plot it's not that useful to find what epoch was best.</p>\n<p>The checkpoint at epoch 28 didn’t have the lowest loss overall, but the validation loss was lower than the training loss, wich is good. Also, there’s a big shift in the loss curve around epoch 40. that’s when mosaic augmentation stops.<br>\nMaybe if I used a later checkpoint before closing mosaic it would have a better lb than a chekpoint in epoch 28, I still have to test this.</p>\n<p>Here's the training curve below so you can see what I mean.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2221915%2Fe01979fd60cde14a1a364d36c99dfee9%2Fdfl_loss_curve.png?generation=1746380314405281&amp;alt=media\" alt=\"training loss curve (period=5)\"></p>",
              "votes": 1,
              "replies": []
            },
            {
              "id": 3193656,
              "author_name": "eikyou",
              "author_url": "",
              "post_date": "2025-05-04T18:49:59.583000",
              "content": "<p>btw, i noticed that better models get lower optimal thresholds for F1 on validation. 0.2~ for good models and 0.4~ for much worse models. Maybe it's a coincidence, but still.<br>\nAlso i noticed that optimal threshold for LB is 0.3~</p>",
              "votes": 2,
              "replies": []
            },
            {
              "id": 3195257,
              "author_name": "",
              "author_url": "",
              "post_date": "2025-05-06T19:59:53.093000",
              "content": "",
              "votes": 0,
              "replies": []
            },
            {
              "id": 3197016,
              "author_name": "shiba-inu",
              "author_url": "",
              "post_date": "2025-05-07T18:11:37.047000",
              "content": "<p><a href=\"https://www.kaggle.com/sersasj\" target=\"_blank\">@sersasj</a> <br>\nThanks for suggesting so interesting finding!<br>\nClose mosic may cause overfittting…<br>\nbtw, What did you set mosaic rate?<br>\n( I think yolo set mosaic as 1.0 in default setting)</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 3197028,
              "author_name": "Sergio Alvarez",
              "author_url": "",
              "post_date": "2025-05-07T18:34:20.073000",
              "content": "<p>Thanks <a href=\"https://www.kaggle.com/npinpi\" target=\"_blank\">@npinpi</a>! It was set to 1.0 </p>",
              "votes": 0,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 3200223,
      "author_name": "mohanapavan bezawada",
      "author_url": "",
      "post_date": "2025-05-12T09:16:19.147000",
      "content": "<p>hey, can anyone tell me from where it is considered as high LR and from where it is considered as low LR. which is the avg LR like the safest number to start with. and how initial learning rate and final learning rate works. </p>",
      "votes": 0,
      "replies": [
        {
          "id": 3200337,
          "author_name": "eikyou",
          "author_url": "",
          "post_date": "2025-05-12T12:31:23.133000",
          "content": "<p><a href=\"https://www.kaggle.com/mohanapavanbezawada\" target=\"_blank\">@mohanapavanbezawada</a> 1e-4 or 3e-4 are usually ok to start with</p>",
          "votes": 1,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "3194267": "### FYI.Ultralytics YOLO reproducibility\n* The default setting is **deterministic is false.**\n```\n# ultralytics/ultralytics/utils/torch_utils.py\ndef init_seeds(seed=0, deterministic=False):\n...\n```\n* Therefore, to ensure reproducibility, **deterministic must be set to True** in the Torch implementation.\n* According to the Ultralytics src and manual, it can be set up as follows:\n```\n# YOLO deterministic setting\nfrom ultralytics.utils.torch_utils import init_seeds\ninit_seeds(seed=42, deterministic=True)\n\n# Check torch deterministic\nimport torch.backends.cudnn as cudnn\nprint(cudnn.deterministic)\n\n⇒True\n```\n\nP.S I have limited computing resources, so this is just an observation based on looking at the source, but I hope it will be helpful.",
    "3190706": "I trained YOLO11 2 times on the same data and the same parameters (don't ask me why i did this). And I got extremely different results. Both optimal F1 threshold and LB are absolutely different. \nI do understand that training itself is kinda random and augmentations are random too. I am wondering if such a behaviour is normal or am I missing something?",
    "3192933": "With a fixed seed, I consistently obtain the same results when using the same training parameters. The training code is adapted from the Kaggle YOLO baseline.",
    "3191256": "Do you have an early stopping condition?  It’s possible your LR is too high or too low so one model got stuck in a local minima while the other moved closer to the global minima.  Maybe try tuning your LR or using something like a decaying LR?  I’m guessing one model plateaued early and hit an early stopping condition whereas the other had a better initialization and was fortunate to find a better “path”",
    "3190744": "I think the problem is about the \"optimal threshold\", there may be not so much difference in the yolo, but the  LB is very sensitive to threshold..  ",
    "3192857": "Hey @eikyou, did you used seeds in your training? \nI've trained my models with seeds and I'm going to try retraining them nd submitting to see what happens. I'll tell you later how it goes.\nA similar thing is happening to me, trained a 5 fold cv (yolo10x) and got models scoring from 0.725 to 0.792.",
    "3200223": "hey, can anyone tell me from where it is considered as high LR and from where it is considered as low LR. which is the avg LR like the safest number to start with. and how initial learning rate and final learning rate works. "
  }
}