A computer-implemented method of generating a segmentation outcome which indicates individual instances of one or more object classes for an image in a sequence of images, the method comprising: a. determining a coherent region of the image, wherein a coherent region is an image region where it should be likely to detect an object, b. processing the image by a deep learning model outputting a tensor representing pixel-specific confidence scores for one or more object classes, c. generating a series of temporary segmentation masks for the coherent region, wherein each temporary segmentation mask is generated by interpreting the tensor with respect to a single object class using a different temporary confidence score threshold, wherein each confidence score threshold sets the minimum confidence score that is required for a pixel to be interpreted as depicting a corresponding object class, d. evaluating the series of temporary segmentation masks to determine if an object mask condition is met by one or more of the temporary segmentation masks, wherein an object mask condition is a condition which indicates that a temporary segmentation mask corresponds to an object, e. in case the object mask condition is met by one or more of the temporary segmentation masks, setting the temporary confidence score threshold used for generating one of the one or more temporary segmentation masks meeting the object mask condition as a final confidence score threshold for the pixels of the temporary segmentation mask, f. in case the object mask condition is not met by any one of the temporary segmentation masks, setting a default confidence score threshold as a final confidence score threshold for the coherent region, g. generating a final segmentation outcome for the image, wherein the part of the final segmentation outcome covering the coherent region is generated by interpreting the tensor using the final confidence score threshold. a. determining a coherent region of the image, wherein a coherent region is an image region where it should be likely to detect an object, b. processing the image by a deep learning model outputting a tensor representing pixel-specific confidence scores for one or more object classes, c. generating a series of temporary segmentation masks for the coherent region, wherein each temporary segmentation mask is generated by interpreting the tensor with respect to a single object class using a different temporary confidence score threshold, wherein each confidence score threshold sets the minimum confidence score that is required for a pixel to be interpreted as depicting a corresponding object class, d. evaluating the series of temporary segmentation masks to determine if an object mask condition is met by one or more of the temporary segmentation masks, wherein an object mask condition is a condition which indicates that a temporary segmentation mask corresponds to an object, e. in case the object mask condition is met by one or more of the temporary segmentation masks, setting the temporary confidence score threshold used for generating one of the one or more temporary segmentation masks meeting the object mask condition as a final confidence score threshold for the pixels of the temporary segmentation mask, f. in case the object mask condition is not met by any one of the temporary segmentation masks, setting a default confidence score threshold as a final confidence score threshold for the coherent region, g. generating a final segmentation outcome for the image, wherein the part of the final segmentation outcome covering the coherent region is generated by interpreting the tensor using the final confidence score threshold.