A non-transitory computer readable medium comprising instructions, that, when executed by a computer, cause the computer to perform a method of generating synthetic fault images of a semiconductor specimen, wherein a synthetic fault image comprises at least one synthetic defect of interest (DOI), the method comprising:
- obtaining examination output images of a semiconductor specimen generated by an examination tool;
- generating, from a plurality of examination output images, a respective plurality of synthetic fault images, comprising:
- for each examination output image, determining at least one synthetic DOI, comprising:
- determining a DOI planting location in the image;
- determining a planting strength range;
- determining a final DOI shape by fusing a primary DOI shape that is based on optical configuration of the examination tool and secondary DOI shape, selected from a collection of predefined secondary shapes, each comprising a plurality of pixels;
- for each pixel in the final DOI shape, determining a respective DOI pixel strength based on a respective current pixel value and a planting strength selected from within the planting strength range;
- and
- planting the synthetic DOI in the planting location in the image;
- thereby generating a collection of synthetic fault images of the semiconductor specimen, wherein different synthetic fault images in the collection comprise different synthetic DOIs, which differentiate in one or more of planting location, DOI pixel strength, and final DOI shape.