IDEA-Research / DN-DETR

[CVPR 2022 Oral] Official implementation of DN-DETR
Apache License 2.0
528 stars 57 forks source link

How to trainmy own dataset?(not COCO) #32

Open kike-0304 opened 1 year ago

kike-0304 commented 1 year ago

If I use my own dataset, where do I need to change, the AP I get with my own dataset is 0.0?

xueyyao commented 1 year ago

I met the problem too, but I found that I did something wrong about my dataset. I believe you can check your data (especially label) first.

kike-0304 commented 1 year ago

I met the problem too, but I found that I did something wrong about my dataset. I believe you can check your data (especially label) first. I can use my data set normally in other methods, but only this method will have errors, which places have you modified when using your own data set?

FengLi-ust commented 1 year ago

You can transform your dataset to COCO format or write a new dataset class for your dataset.

youarefree123 commented 1 year ago

You can transform your dataset to COCO format or write a new dataset class for your dataset.

Hi, I have recently tried to train other datasets (cityscapes) using for dn_dab_detr. The size of the training set is only 3000, we train the model on 4 Nvidia 3090 GPUs, batch size is 16 (4 images each GPU x 4 GPUs) , accordingly I adjusted the learning rate to 2e-4 (twice of the original), however, when training, I found that the model did not converge, so I changed back to 1e-4, the batch size is still 4, however, after 50 epochs, the result is not as good as baseline (Faster-RCNN), do I still need to try to modify other hyperparameters? Which hyperparameters will be modified to enable the model to work in the new dataset?

FengLi-ust commented 1 year ago

Hey, as our code and dataloader largely follows DETR and Deformable DETR. They have been widely adopted in many custom dataset. you can refer to their issues about how to train your own dataset. For example, in DETR github page, there are many issues about training on the custom dataset, like this.

For modifications to the code for your own dataset, there are also some suggestions, like this and this.

Hope these suggestions work for you.

youarefree123 commented 1 year ago

Hey, as our code and dataloader largely follows DETR and Deformable DETR. They have been widely adopted in many custom dataset. you can refer to their issues about how to train your own dataset. For example, in DETR github page, there are many issues about training on the custom dataset, like this.

For modifications to the code for your own dataset, there are also some suggestions, like this and this.

Hope these suggestions work for you.

Thanks for the detailed reply which helped me a lot.