Object Detection: Unusual warning while training Detectron2 Faster R-CNN
I am trying to train a Detectron2 faster_rcnn_R_50_FPN_3x model on a custom dataset, pretrained on PublayNet Dataset. While training, I am getting the following warning:
WARNING [01/14 14:35:22 fvcore.common.checkpoint]: Skip loading parameter 'roi_heads.box_predictor.cls_score.weight' to the model due to incompatible shapes: (7, 1024) in the checkpoint but (6, 1024) in the model! You might want to double check if this is expected.
WARNING [01/14 14:35:22 fvcore.common.checkpoint]: Skip loading parameter 'roi_heads.box_predictor.cls_score.bias' to the model due to incompatible shapes: (7,) in the checkpoint but (6,) in the model! You might want to double check if this is expected.
WARNING [01/14 14:35:22 fvcore.common.checkpoint]: Skip loading parameter 'roi_heads.box_predictor.bbox_pred.weight' to the model due to incompatible shapes: (24, 1024) in the checkpoint but (20, 1024) in the model! You might want to double check if this is expected.
WARNING [01/14 14:35:22 fvcore.common.checkpoint]: Skip loading parameter 'roi_heads.box_predictor.bbox_pred.bias' to the model due to incompatible shapes: (24,) in the checkpoint but (20,) in the model! You might want to double check if this is expected.
WARNING [01/14 14:35:22 fvcore.common.checkpoint]: Some model parameters or buffers are not found in the checkpoint:
roi_heads.box_predictor.bbox_pred.{bias, weight}
roi_heads.box_predictor.cls_score.{bias, weight}
Upon furthur investigation, I found out from this link that the above warning message is expected because my dataset has different number of classes from the pre-trained model, and a few pre-trained weights have to be skipped.
PublayNet has 5 classes {text, title, list, table, figure}
and my dataset has exactly these 5 classes. But unfortunately the model, pretrained on PublayNet, is having 6 classes. Shouldn't it be having 5 classes? I am confused about this extra class and any help is appreciated!
Topic document-understanding faster-rcnn object-detection training
Category Data Science