Simone Cammarasana, Giuseppe Patanè
The paper proposes a novel weighted convolution for signals defined on regular grids (2D images) by optimising a density function that scales the contribution of neighbouring pixels according to their distance from the central pixel. This choice differs from the uniform convolution, which treats all neighbouring pixels equally. Given a convolutional network, we compute the optimal density by minimising a loss functional, with the density function as the variable. Then, the weighted convolution is applied to CNNs to improve the accuracy of image-processing tasks (denoising, classification). The optimal density improves the convergence of the weights of the learning model with respect to the uniform density. The framework separates the optimisation of the convolutional kernel weights (using a stochastic gradient descent method) from the density optimisation (using the DIRECT-L algorithm). Experimental tests on SOTA learning models for image denoising and classification show that the weighted convolution significantly improves the performance compared to standard convolution. For example, the denoising of the DIV2K dataset with Gaussian noise through the DnCNN model with the weighted convolution reaches a PSNR of 31.02, compared to the 29.09 value of the model with the standard convolution. While our method increases execution time by on standard hardware and by on GPU in modern HPC environments, it is robust across several hyperparameters of the learning model. • We introduce an optimal weighted convolution that applies a density function to scale pixel contribution. • A density function is optimised to increase the accuracy of learning models. • Optimal weighted convolution improves image denoising and classification problems.