Closed momopusheen closed 1 year ago
You can add a layer that maps 7 channels to 3 channels before entering the backbone. But I recommend modifying the input channel of the first layer of the backbone from 3 to 7.
Thanks for your advice!
Btw, I'm using swin transformer as backbone. Would it work if i modify the default 'in_chans' of it when defining backbone?
here:
def __init__( self, pretrain_img_size=224, patch_size=4, in_chans=3, embed_dim=96,
@momopusheen Sure, you can change the number of input channels of the backbone.
Thank you sincerely!
Hi there, Thanks for your excellent work! I'm trying to train DINO on my own data, which are not regular RGB images but images with more channels (more than 7). I found that in torch, the input channel can be modifed by adding an extra conv layer, and then concat it with the original model. However, I didn't find examples of doing so in detrex (or detectron2). ;( So I wonder if I could do this with detrex. If possible, would you mind giving me an example?
Thanks a lot! XD