I apply holistically nested edge detection method for Edge and Boundary Detection in Images. The model can accept only the RGB image. Can anyone help me to accept one channel input image(Gray Scale Image)
Since Caffe model is generally trained on ImageNet which has RGB or 3-channel images, the easiest way to do this is by replicating the monochrome channel by three times. In RGB images, each colour band carries slightly distinct information. If you copy the monochrome channel three times, (theoretically) it will produce an RGB image that has the same information on all channels. This is a common practice in deep learning. Otherwise, you can certainly initialize the network with new input weights and train the network from scratch or perform fine-tuning.
In order to transform RGB or color images database to gray scale images database. You need to apply Principal Component Analysis (PCA) . To do so you need to normalize and than apply PCA or SVD. The attached link is related to the study of PCA, LDA etc., snd you will really enjoy it {https://stats.stackexchange.com/questions/192722/dimension-reduction-using-pca-in-matlab}
Instead of using a single monochrome channel (either R or G or B) you may combine all three into a single grayscale intensity using the relation 0.3R + 0.6G + 0.1B which is the NTSC/PAL standard for B/W TV transmission. Since the human eye is most sensitive towards the green part of the optical spectrum, more weightage is given to the G channel. After that you can replicate this grayscale channel three times.