We review different single and mixed noise models in variational image processing, and derive a new one for mixed noise, consistently with the statistical assumptions on the noise through MAP estimation, and combining standard fidelity terms used for single-noise denoising in an infimal convolution fashion. In order to determine the noise model in the corrupted images (the different weights), we propose a bilevel optimization approach in function space with the variational image restoration models as constraints. In the flavour of supervised machine learning, the approach presupposes the existence of a training set of clean and noisy images. The problems are treated as mathematical programs with variational inequality constraints and tailored regularization schemes for the approximation of the optimal parameters are proposed. Instead or relying on a priori statistical assumptions on the training set, the optimal parameter values are numerically computed by using a dynamically sampled quasi-Newton method, together with semismooth Newton algorithms for the solution of the image restoration subproblems.