IDEA-Research / detrex

detrex is a research platform for DETR-based object detection, segmentation, pose estimation and other visual recognition tasks.
https://detrex.readthedocs.io/en/latest/
Apache License 2.0
1.9k stars 199 forks source link

About finetuning a DINO model you provided on my custom dataset #306

Closed Kim-yhao closed 10 months ago

Kim-yhao commented 10 months ago

I want to finetune a DINO with swin-b you provided in Model Zoo on my custom dataset, but it shows that the number of categories does not match. 3932ffe3038a43467f62ea4bec757a3 I guess this is because I didn't change the number of categories. Can you tell me where to change it? Or are there some parameters I need to ignore when loading the model? Where to change them if I need to? THX!

rentainhe commented 10 months ago

I want to finetune a DINO with swin-b you provided in Model Zoo on my custom dataset, but it shows that the number of categories does not match. 3932ffe3038a43467f62ea4bec757a3 I guess this is because I didn't change the number of categories. Can you tell me where to change it? Or are there some parameters I need to ignore when loading the model? Where to change them if I need to? THX!

You should check your config and modify the classes num in the config file

Kim-yhao commented 10 months ago

I add model.num_classes to the config. It works. THX!