A computer-implemented method to determine a mask for pixel modification in an image, the method comprising: determining (205, 300) a spatial function for a detected feature depicted in the image, wherein the detected feature is facial skin included in a detected face, wherein the spatial function indicates pixels of the image relative to a feature boundary estimated from the detected feature, wherein determining (205, 300) the spatial function includes determining a prior probability feature mask for the detected feature, wherein the prior probability feature mask is based on the feature boundary and indicates, for each of a plurality of pixels in the image, an associated first probability that the pixel is a feature pixel; determining (206, 400) a respective color likelihood distribution (1200, 1500) for each region (1102, 1104, 1110, 1112, 1114) of a plurality of regions of the image based on one or more distributions of color values in each of the regions, wherein the regions include a feature region and a non-feature region (1104, 1110, 1112, 1114), wherein the plurality of non-feature regions include one or more facial landmark regions (1110, 1112, 1114) and one or more background regions outside the feature boundary and different than the feature region, wherein the one or more facial landmark regions (1110, 1112, 1114) include at least one of: a mouth region, an eye region, and an eyebrow region, and wherein determining (206, 400) the respective color likelihood distribution (1200, 1500) for each region includes determining a respective color likelihood distribution (1200, 1500) for each of the one or more facial landmark regions (1110, 1112, 1114); determining (208, 600) a confidence mask based on the spatial function and one or more of the color likelihood distributions (1200, 1500), wherein the confidence mask includes, for each of a plurality of pixels of the image, an associated confidence value that the pixel is a feature pixel, wherein the confidence mask is based on a posterior feature mask and a posterior non-feature mask, wherein the posterior feature mask is based on the prior probability feature mask and the one or more color likelihood distributions and indicates, for each of the plurality of pixels of the image, an associated second probability that the pixel is a feature pixel, wherein the posterior non-feature mask is based on a prior probability non-feature mask and a combination of the color likelihood distributions for the one or more background regions and for the one or more facial landmark regions (1110, 1112, 1114); and applying, by one or more edit operations, a modification to pixels in the image using the confidence mask. determining (205, 300) a spatial function for a detected feature depicted in the image, wherein the detected feature is facial skin included in a detected face, wherein the spatial function indicates pixels of the image relative to a feature boundary estimated from the detected feature, wherein determining (205, 300) the spatial function includes determining a prior probability feature mask for the detected feature, wherein the prior probability feature mask is based on the feature boundary and indicates, for each of a plurality of pixels in the image, an associated first probability that the pixel is a feature pixel; determining (206, 400) a respective color likelihood distribution (1200, 1500) for each region (1102, 1104, 1110, 1112, 1114) of a plurality of regions of the image based on one or more distributions of color values in each of the regions, wherein the regions include a feature region and a non-feature region (1104, 1110, 1112, 1114), wherein the plurality of non-feature regions include one or more facial landmark regions (1110, 1112, 1114) and one or more background regions outside the feature boundary and different than the feature region, wherein the one or more facial landmark regions (1110, 1112, 1114) include at least one of: a mouth region, an eye region, and an eyebrow region, and wherein determining (206, 400) the respective color likelihood distribution (1200, 1500) for each region includes determining a respective color likelihood distribution (1200, 1500) for each of the one or more facial landmark regions (1110, 1112, 1114); determining (208, 600) a confidence mask based on the spatial function and one or more of the color likelihood distributions (1200, 1500), wherein the confidence mask includes, for each of a plurality of pixels of the image, an associated confidence value that the pixel is a feature pixel, wherein the confidence mask is based on a posterior feature mask and a posterior non-feature mask, wherein the posterior feature mask is based on the prior probability feature mask and the one or more color likelihood distributions and indicates, for each of the plurality of pixels of the image, an associated second probability that the pixel is a feature pixel, wherein the posterior non-feature mask is based on a prior probability non-feature mask and a combination of the color likelihood distributions for the one or more background regions and for the one or more facial landmark regions (1110, 1112, 1114); and applying, by one or more edit operations, a modification to pixels in the image using the confidence mask.