Method for machine vision and in particular for parsing a medical image, comprising the steps of: - Providing a network, being a multi-task deep neural network - Providing the image to be parsed - Pre-determining image features derived from the image - Defining - a main task for image parsing and - an adjuvant task for reconstruction of the image features - Training the network by simultaneously learning the deep neural multi-task network on main and adjuvant tasks in a supervised manner, wherein the network is trained with a medical training dataset with a set of images with annotations to find the optimal network weights and parameters according to an objective function by applying back propagation and stochastic gradient descent, wherein the adjuvant task acts as regularization of the network by using a multi-task objective function being a linear combination of task-specific terms, and - performing multi-tasks prediction, wherein the trained network is provided with the image as input and wherein the network provides an output at prediction time, wherein the last layer of the trained network is a hybrid layer designed to address both the main task and adjuvant task, the output comprising: (i) an estimate of class labels according to the main task, and (ii) reconstructed image features that can be automatically computed from the image after projection on its low-dimensional representation and which are used to automatically derive a confidence estimate, wherein confidence is estimated by comparing the reconstructed image features, which have been reconstructed by the network, with the pre-determined image features. - Providing a network, being a multi-task deep neural network - Providing the image to be parsed - Pre-determining image features derived from the image - Defining - a main task for image parsing and - an adjuvant task for reconstruction of the image features - a main task for image parsing and - an adjuvant task for reconstruction of the image features - Training the network by simultaneously learning the deep neural multi-task network on main and adjuvant tasks in a supervised manner, wherein the network is trained with a medical training dataset with a set of images with annotations to find the optimal network weights and parameters according to an objective function by applying back propagation and stochastic gradient descent, wherein the adjuvant task acts as regularization of the network by using a multi-task objective function being a linear combination of task-specific terms, and - performing multi-tasks prediction, wherein the trained network is provided with the image as input and wherein the network provides an output at prediction time, wherein the last layer of the trained network is a hybrid layer designed to address both the main task and adjuvant task, the output comprising: (i) an estimate of class labels according to the main task, and (ii) reconstructed image features that can be automatically computed from the image after projection on its low-dimensional representation and which are used to automatically derive a confidence estimate, wherein confidence is estimated by comparing the reconstructed image features, which have been reconstructed by the network, with the pre-determined image features. the output comprising: (i) an estimate of class labels according to the main task, and (ii) reconstructed image features that can be automatically computed from the image after projection on its low-dimensional representation and which are used to automatically derive a confidence estimate, wherein confidence is estimated by comparing the reconstructed image features, which have been reconstructed by the network, with the pre-determined image features. <EOS>