yolo model train error

Hi ,What should I pay attention to if I want to train a model that is not pre training? because i has try to train a few time,every time in the mAP does not go up. i try use30000 image or 60000image or 10000image,and use diff dataset,i just want to train 1 class thank you so much
No description
33 Replies
Skillnoob_
Skillnoob_5w ago
Are you trying to continue training a model? Because I see resume=True in there
harry cow
harry cowOP5w ago
Yes, because sometimes I interrupt the training. I saw in online tutorials that by enabling this, I can resume training from where it was interrupted.
Skillnoob_
Skillnoob_5w ago
If you want to continue a interrupted training that didn't finish, you can point YOLO() to the last.pt and use resume=True
harry cow
harry cowOP5w ago
Thank you. Most of my training sessions are not interrupted. May I ask how many photos I should use for training? My mAP never increases with each session.
Skillnoob_
Skillnoob_5w ago
Can you share the labels.jpg and results.jpg from the train folder?
harry cow
harry cowOP5w ago
thank you so much
No description
No description
No description
harry cow
harry cowOP5w ago
https://universe.roboflow.com/microsoft/coco i download the data from this site
Skillnoob_
Skillnoob_5w ago
no not those there are files that are called labels.jpg and results.jpg in the train folder ultralytics creates
harry cow
harry cowOP5w ago
result
No description
Skillnoob_
Skillnoob_5w ago
They are image files called that inside the runs folder
harry cow
harry cowOP5w ago
i dont have file in runs folder
harry cow
harry cowOP5w ago
No description
harry cow
harry cowOP5w ago
i change the path to D:/
Skillnoob_
Skillnoob_5w ago
thats just windows not loading the folder
harry cow
harry cowOP5w ago
let me find it,i am sorry 🙏
Skillnoob_
Skillnoob_5w ago
then it should be located in that folder
harry cow
harry cowOP5w ago
No description
harry cow
harry cowOP5w ago
i gusee i dont have labels.jpg?
harry cow
harry cowOP5w ago
No description
Skillnoob_
Skillnoob_5w ago
Wait why are you training on the coco dataset The default models are trained on coco
harry cow
harry cowOP5w ago
because i try to train other dataset,but still failed. so i try cocodataset 😆 i want to test is it data problem😆
Skillnoob_
Skillnoob_5w ago
Then you should say what the issue with your original dataset is What are you trying to train?
harry cow
harry cowOP5w ago
i trying to train ,detect to person . and i og dataset issue,is the mAP Not increasing,keey in 0.00xxx
Skillnoob_
Skillnoob_5w ago
You can use the original coco models if you want to detect people
from ultralytics import YOLO

model = YOLO('yolo11n.pt')

model.predict(source='path/to/image.jpg', classes=[0])
from ultralytics import YOLO

model = YOLO('yolo11n.pt')

model.predict(source='path/to/image.jpg', classes=[0])
With this code you will only detect people
harry cow
harry cowOP5w ago
my professor said I cannot use a model that has already been pre-trained 🫠
Skillnoob_
Skillnoob_5w ago
Amazing, great professor You can try:
from ultralytics import YOLO

model = YOLO('yolo11n.yaml')

model.train(data='coco.yaml', classes=[0], batch=-1)
from ultralytics import YOLO

model = YOLO('yolo11n.yaml')

model.train(data='coco.yaml', classes=[0], batch=-1)
This will train the model on the coco dataset with only the person class If you specify coco.yaml, ultralytics will automatically download the dataset it needs
harry cow
harry cowOP4w ago
thanks for your help🙏 ,but it already download few hour,is it normal ?
No description
Skillnoob_
Skillnoob_4w ago
Yes, coco is a large dataset The dataset is about 20gb, how fast it is depends on your internet speed
harry cow
harry cowOP4w ago
thank you,btw can i change the model to yolo12n.yaml?
Skillnoob_
Skillnoob_4w ago
I wouldn't recommend yolo12, its worse than 11
harry cow
harry cowOP4w ago
May I ask what the reason is? From the data, it seems that 12 is faster and more accurate.
Skillnoob_
Skillnoob_4w ago
Its much slower on cpu

Did you find this page helpful?