Sense-X / Co-DETR

[ICCV 2023] DETRs with Collaborative Hybrid Assignments Training
MIT License
950 stars 100 forks source link

[Solved] Why doesn't best.pth File Automatically Generate? #125

Closed jeonga0303 closed 4 months ago

jeonga0303 commented 5 months ago

I'm encountering an issue where the best.pth file does not automatically generate as expected in my project. Despite following the usual procedures and ensuring my configurations are correctly set, this file, which should represent the best model state based on validation performance, is not being created. Could there be a specific reason for this, or is there a step I might be missing? Any insights or suggestions on how to troubleshoot this problem would be greatly appreciated.

image

Additionally, I've noticed that my logs do not display class-wise accuracy, which is crucial for a detailed analysis of my model's performance across different categories. I am unsure if this feature requires additional configuration or if it's a limitation of the tools I'm using. Could someone advise on how to enable or set up logging to include class-wise accuracy? Detailed steps or references to documentation would be extremely helpful.

TempleX98 commented 4 months ago

The CheckpointHook of MMDetection V2.25.3 can not save the best checkpoint by default. I recommend you use the Co-DETR implemented by MMDetection V3, which supports such checkpoint saving features.

jeonga0303 commented 4 months ago

The CheckpointHook of MMDetection V2.25.3 can not save the best checkpoint by default. I recommend you use the Co-DETR implemented by MMDetection V3, which supports such checkpoint saving features.

my mmdet was an older version. Thanks for letting me know.

image
jeonga0303 commented 4 months ago

@TempleX98

Are you saying that the 'best.pth' file is generated starting from mmdetection version 3.x.x? I think that's incorrect. I added the checkpoint_config option to config file to automatically generate the 'best.pth' file, and it was automatically created.

checkpoint_config = dict( interval=1, max_keep_ckpts=3, save_last=True, )