1. A computer-implemented method for editing images, comprising: generating, based on a neural network, a first feature vector of a target image to represent a first image layout of the target image, and a second feature vector of a reference image to represent a second image layout of the reference image; computing a distance between the first feature vector of the target image and the second feature vector of the reference image; determining the reference image sharing a similar image layout with the target image based on the distance being below a distance threshold; and producing a new image by replacing content of a first sky in the target image with content of a second sky in the reference image.