A method for training a machine-learning model for use in a scientific or surgical imaging system, the method comprising:
- obtaining a plurality of images of a scientific or surgical imaging system, for use as training input images;
- obtaining a plurality of training outputs that are based on the plurality of training input images and that are based on an image processing workflow of the scientific or surgical imaging system, the image processing workflow comprising a plurality of image processing steps;
- and
- training the machine-learning model using the plurality of training input images and the plurality of training outputs.