Yolo 12 x and l not finishing training

Hi All,

I’m training with a small dataset, of only 200 images. I’m using a laptop with a 4090 gpu and 32 GB of ram. I can finish training my model with any of the yolo11 sizes (n to x). When, however, I train using yolo12, I can only finish training on n to m sizes. If I use the sizes of l or x, my system crashes after only 2 epochs, showing me the blue screen (am using Windows 11). Has anyone ever experienced this? If so, do you think it is happening due to my system’s hardware not being able to handle bigger models? Thx,

Ralf

It would help to see a few things:

  1. The command/script you’re using for training.
  2. The output from the yolo checks terminal command.

The YOLO12 model was adopted from the research publication. This means that you would need to use the pretrained Ultralytics YOLO12 models for your starting weights and not the ones from the publication repository, so I would recommend to verify this. The easiest method would be to delete (or move) any existing YOLO12 model weights you have, and then run training or prediction specifying the YOLO12 model you’d like to use, as it will be downloaded automatically. Since you can train the n thru m models for YOLO12, I’d assume you have the correct starting weights. Since it crashes using the larger models, it is likely due to the model structural changes from the research publication. You can try freezing layers to use transfer learning to help reduce memory usage, but the performance of the model after training might vary considerably; you will have to test to know how well it works. See the freeze argument in the Training Settings section of the docs.

I would also recommend using the WSL 2 environment for development on Windows. Using native Windows for model training can work, but it tends to be tricky, and I speak from experience. When you enable WSL 2, you can then use the Ultralytics Docker images, which should make life significantly easier. Just keep in mind that you might need to permit Docker to use additional system memory and CPU cores.

A few more general pointers. First, when training on a laptop, always make sure to use wall power and not the battery, as many laptops will run significantly slower on battery power. It’s also possible that if going from wall to battery, back to wall power, that the system may not correctly move services back to “performance mode” and continue running slowly or fail. My recommendation would be to use a desktop whenever possible, but if a laptop is all that’s available, start training with the laptop plugged into wall power and leave the laptop alone. If the laptop is used while attempting to train, additional processes could significantly slow or interrupt the training process. Your dataset of 200 images would be what I consider a proof of concept, but nowhere near sufficient to train a generalizable model. Make sure you collect significantly more data for training the model you wish to deploy.