microsoft / RegionCLIP

[CVPR 2022] Official code for "RegionCLIP: Region-based Language-Image Pretraining"

Repository from Github https://github.commicrosoft/RegionCLIPRepository from Github https://github.commicrosoft/RegionCLIP

Train detectors on own datasets

dongfeicui opened this issue · comments

Thank you for presenting such interesting work!
I want to train on my own dataset, but it's not like COCO with natural images, and it only has 4 categories. I used 'Extract Concept Features' to obtain concept embeddings for my dataset, and I passed the extracted results to MODEL.CLIP.TEXT_EMB_PATH and MODEL.CLIP.OPENSET_TEST_TEXT_EMB_PATH. However, I encountered the following error, and I suspect it might be due to a mismatch in the number of classes between my dataset and the classes in MODEL.CLIP.BB_RPN_WEIGHTS ./pretrained_ckpt/rpn/rpn_coco_48.pth.

image

So, if that's the case, how should I proceed to resolve it? Should I retrain rpn_coco_4.pth?

I have solved this problem by changing NUM_CLASSES in config files. Thanks.