1. A computer implemented method for touching up a source image to produce a target image, comprising: partitioning a source image into non-overlapping tiles of pixels; labeling each tile with a label; inferring a probability distribution of the labels, in which the probability distribution is a conditional random field; determining weights from the conditional random field; and transforming each tile of the source image according to the weights to produce a corresponding tile of a target image, in which the transforming maximizes a conditional likelihood of the target image given the source image, while marginalizing over all possible labelings of the source image.