liming-ai / AlignDet

Official code for ICCV 2023 Paper: AlignDet: Aligning Pre-training and Fine-tuning in Object Detection.
https://liming-ai.github.io/AlignDet/
Apache License 2.0
142 stars 13 forks source link

loss stucked at 3.0 #26

Open ddeellttaa opened 2 months ago

ddeellttaa commented 2 months ago

Hello, thanks for the nice work! I try to use AlignDet in yolov8, but when I train the model ,I found the contrastive loss stucked at 3.0 after about 50 epochs.

And I check your logs when pretrain fcos and find out the loss of fcos is stuck as well. I wonder if this is normal.

liming-ai commented 2 months ago

Hello, thanks for the nice work! I try to use AlignDet in yolov8, but when I train the model ,I found the contrastive loss stucked at 3.0 after about 50 epochs.

And I check your logs when pretrain fcos and find out the loss of fcos is stuck as well. I wonder if this is normal.

Hi @ddeellttaa,

Thank you for your question.

During the pre-training stage, only a small number of model parameters (Neck/Head) will be trained, so it is indeed possible that the loss cannot continue to decrease, and the model may have converged at this time.

However, if it is stuck at a specific value (such as 3.0), it is very abnormal. I suggest you review the code and related training data.

ddeellttaa commented 2 months ago

Hello, thanks for the nice work! I try to use AlignDet in yolov8, but when I train the model ,I found the contrastive loss stucked at 3.0 after about 50 epochs. And I check your logs when pretrain fcos and find out the loss of fcos is stuck as well. I wonder if this is normal.

Hi @ddeellttaa,

Thank you for your question.

During the pre-training stage, only a small number of model parameters (Neck/Head) will be trained, so it is indeed possible that the loss cannot continue to decrease, and the model may have converged at this time.

However, if it is stuck at a specific value (such as 3.0), it is very abnormal. I suggest you review the code and related training data.

Thanks for your reply.

It seems like the Aligndet works very well although the loss stucked at 3.0. I use the model pretrained by Aligndet and finetune it, the map@0.5 increase 10, better then any other model I trained.

Again, thanks for your great work!

liming-ai commented 2 months ago

Hello, thanks for the nice work! I try to use AlignDet in yolov8, but when I train the model ,I found the contrastive loss stucked at 3.0 after about 50 epochs. And I check your logs when pretrain fcos and find out the loss of fcos is stuck as well. I wonder if this is normal.

Hi @ddeellttaa, Thank you for your question. During the pre-training stage, only a small number of model parameters (Neck/Head) will be trained, so it is indeed possible that the loss cannot continue to decrease, and the model may have converged at this time. However, if it is stuck at a specific value (such as 3.0), it is very abnormal. I suggest you review the code and related training data.

Thanks for your reply.

It seems like the Aligndet works very well although the loss stucked at 3.0. I use the model pretrained by Aligndet and finetune it, the map@0.5 increase 10, better then any other model I trained.

Again, thanks for your great work!

Alright😂

Glad to know AlignDet could be helpful for your work, but the loss here seems strange, maybe you can change the loss weight or temperature of contrastive loss to see whether it would be changed.