open-mmlab/mmdetection

How to modify the conv1 of the pre training weights of the Mask RCnn to fit my 5-channel dataset

MoonDiana17 opened this issue · 0 comments

Describe the issue

In order to increase the number of channels to 5, I have made some modifications to the code. Until this step, I knew that the conv1 of the pre training weight did not match the number of channels in the input image, but I didn't know how to correct it. Even if I set init_cfg=None, I will still report an error.

Reproduction

  1. What command or script did you run?
python tools/train.py work_dirs/mask-rcnn_r101-caffe_fpn_ms-poly-3x_coco/mask-rcnn_r101-caffe_fpn_ms-poly-3x_coco.py

Snipaste_2024-05-07_17-31-56