LiQiufu / WaveSNet

29 stars 3 forks source link

Dimension Question #1

Open Marcelo5444 opened 3 years ago

Marcelo5444 commented 3 years ago

Hi, I am trying to use the wsegnet_vgg19() model but want to use as input 1D images (grayscale) what parameters of the cfg do I need to change?

LiQiufu commented 3 years ago

Are you processing one-channel images? You should set the "in_channel = 1" in the first convolutional layer of VGG19, which can be implemented by replacing the line 100 in "SegNet.py" with "in_channels = 1".

Marcelo5444 commented 3 years ago

Thank you so much for the help!Also looking at the folder of the DWT-IDWT I have a question:What are the difference between the DWT_IDWT_layer and the DWT_IDWT_CS? I have found the same classes but with different implementations

LiQiufu commented 3 years ago

Thank you so much for the help!Also looking at the folder of the DWT-IDWT I have a question:What are the difference between the DWT_IDWT_layer and the DWT_IDWT_CS? I have found the same classes but with different implementations

In "DWT_IDWT_layer", DWT and IDWT are implemented using matrix operations, while they are implemented using convolution and naive sampling operations in "DWT_IDWT_CS". In theory, the latter is faster than the former. You could get more information about these two implementation from paper "Wavelet Integrated CNNs for Noise-Robust Image Classification" and "WaveSNet: Wavelet Integrated Deep Networks for Image Segmentation".