Intensity inhomogeneities are very common in MR images, especially at higher field strengths. This can cause problems for image interpretation, as well as introduce errors in many quantitative post-processing methods. Here it is proposed to use a Generative Adversarial Network that is trained to provide homogeneous MR images of a particular anatomy. During application, the network is used to produce the (homogeneous) image most similar to the query image (QI). A conventional fitting method can then be used to identify the inhomogeneity field and correct the query image.