Open YashRunwal opened 3 years ago
Yes, of course you can. You can use opencv to convert your Grayscale images into RGB-style images(with 3 channels).
@YashRunwal @yjh0410 I recommend you guys to read this issue for processing gray image.
Wow, that was a quick reply @yjh0410 and @developer0hye :) Umm, No, I don't want to convert my Grayscale image to RGB. I want to use the 1 channel images for training.
For the pre-trained backbone I can sum the weights of the first layer in the first dimension, thus not losing any information and then I think I can just modify the 1st layer in_channels
to 1, like below:
in_channels = 1
model.backbone.body.conv1.in_channels = in_channels
model.backbone.body.conv1.weight.data = model.backbone.body.conv1.weight.data.sum(dim=1, keepdim=True)
Note: This is just an example and the model used here is the pre-trained Faster RCNN from torchvision.
My question is, does this make sense for the centernet? :)
Sorry ~
I am not sure whether it will work. I have never tried the method you introduced.
@yjh0410 No problem. I will try it out and post the results here. So please don't close this thread, might be helpful for someone else.
Also,
I will post the results here but would need your help from time to time, if possible.
Hello,
great work! Thanks for sharing this with the community.
I would also like to make use of ResNet-18 architecture as the backbone and then use CenterNet architecture. However, I have a dataset of Grayscale images with shape [512, 1536]. So my question is:
Thank You.