About training
long123524 opened this issue · comments
It looks a bit weird. Did you use the VGG pre-trained weights?
I didn't use it. Do I have to use pre-trained weights to proceed? Because my original image is in 6 bands, adding pre-training weights will report an error
I didn't use it. Do I have to use pre-trained weights to proceed? Because my original image is in 6 bands, adding pre-training weights will report an error
Hi @long123524,
For 6 bands, do you mean your input has 6 channels? If that's the case, you can try to load the weights for the VGG backbone except the first layer.
I try to load the weights for the VGG backbone include the first layer. The training data is BSDS, and the result is obviously different from my own data set. The VGG weight of the first layer should be more important. How should I modify the weight of the first layer of pre-training so that it can read the 6-channel data set?
Hi @long123524, I wonder if you can try to load the weights for the VGG backbone excluding the first layer and train on BSDS dataset? This can help to check if the parameters in the first layer are indeed essential.
After removing the first-layer weight of VGG, the BSDS data set will not get good training results or without pre-training VGG, the effect is not good, as shown in the picture.
Therefore, I think VGG pre-training weights are necessary, and the first layer is also necessary. My idea is to change the first layer of VGG to 6 channels, but how to modify such a pre-training weight file? Or how did this pre-training weight file come from? Can we make a pre-trained VGG ourselves?
Hi @long123524, the pre-trained weight file comes from original HED repo, and I think this weight file is pretrained on ImageNet classification (may need to double check). It seems the first layer is necessary in your visualization. However, I am not sure if there is a easy way to convert the current 3-channel input layer to 6-channel. In addition, perhaps the 6-channel input of your dataset has different value distribution from the RGB images in HED. Could you tell me what's the meaning of each channel in your data? We can design some conversion given the property of your data.
Thank you very much for your reply. My own research direction is remote sensing. The 6 channels I input are the 6 bands in the remote sensing image, and each band has its own spectral information in it.
Gotcha, I would suggest if you can compute the statistics of the 6 channels (e.g. max/min/std/avg) and choose suitable normalization. Afterward, you can attempt to copy the 3-channel input layer weights twice to make 6-channel input weights and see if this way can help training.
I think you may attempt to lower down the learning rate and try several possible values.