A computer implemented method for generating a phase image, the method comprising: receiving a training data set comprising one or more matched sets of images, wherein each matched set of images comprises: a plurality of brightfield images corresponding to an image view of a specimen, each of the plurality of brightfield images corresponding to a different focal plane; and a ground truth phase image generated based on the plurality of brightfield images; selecting at least one visual artifact to simulate; generating one or more additional matched sets of images by modifying at least one of the one or more matched sets of images of the received training data set to simulate the at least one selected visual artifact in the image view of the specimen, wherein modifying a given matched set of images comprises modifying at least one of the corresponding plurality of brightfield images based on the at least one selected visual artifact; adding the one or more additional matched sets of images to the training data set; training a machine learning model based on the training data set, wherein training the machine learning model is based on comparing generated output of the machine learning model for a given matched set of images with the corresponding ground truth phase image; receiving a first input brightfield image and a second input brightfield image; and generating, using the trained machine learning model, a phase image corresponding to the first input brightfield image and the second input brightfield image. receiving a training data set comprising one or more matched sets of images, wherein each matched set of images comprises: a plurality of brightfield images corresponding to an image view of a specimen, each of the plurality of brightfield images corresponding to a different focal plane; and a ground truth phase image generated based on the plurality of brightfield images; a plurality of brightfield images corresponding to an image view of a specimen, each of the plurality of brightfield images corresponding to a different focal plane; and a ground truth phase image generated based on the plurality of brightfield images; selecting at least one visual artifact to simulate; generating one or more additional matched sets of images by modifying at least one of the one or more matched sets of images of the received training data set to simulate the at least one selected visual artifact in the image view of the specimen, wherein modifying a given matched set of images comprises modifying at least one of the corresponding plurality of brightfield images based on the at least one selected visual artifact; adding the one or more additional matched sets of images to the training data set; training a machine learning model based on the training data set, wherein training the machine learning model is based on comparing generated output of the machine learning model for a given matched set of images with the corresponding ground truth phase image; receiving a first input brightfield image and a second input brightfield image; and generating, using the trained machine learning model, a phase image corresponding to the first input brightfield image and the second input brightfield image. <EOS>