Embodiments relate to methods, systems and computer-readable media for editing images. An embodiment of a method for editing an image includes accessing a
source image for editing, accessing a
reference image, generating a mapping, wherein the mapping relates at least one source attribute value to at least one target attribute value, and modifying the
source image to generate an edited image by applying the generated mapping, the edited image having at least one attribute value based on the attribute values of the
reference image. Embodiments also relate to methods, systems and computer-readable media for training
machine learning models. An embodiment of a method for training a
machine learning model to edit an image, includes accessing a
source image for editing, accessing a
reference image, generating a source
histogram for the source image and a reference
histogram for the reference image, inputting the source
histogram and the reference histogram into an
encoder to generate a source histogram vector and a target histogram vector, concatenating the source histogram vector and the reference histogram vector into a concatenated vector, inputting the concatenated vector into the
machine learning model, generate a mapping using the
machine learning model, applying the mapping to the source image, calculating at least one
loss function, and updating the parameters of the
machine learning model on the basis of the at least one
loss function.