A computer-implemented method for automatically detecting anatomical structures in a medical image of a subject, the method comprising the steps of: a) receiving at least one medical image of a field-of-view of the subject; b) applying an object detector function to the medical image, wherein the object detector function is trained to detect a plurality of classes of anatomical structures, thereby generating as output the coordinates of a plurality of bounding boxes and a confidence score for each bounding box, the confidence score giving the probability of the bounding box containing an anatomical structure belonging to one of the plurality of classes; characterized in that the object detector function performs the steps of: - applying a first neural network to the medical image, wherein the first neural network is trained to detect a first plurality of classes of larger-sized anatomical structures, thereby generating as output the coordinates of at least one first bounding box and the confidence score of it containing a larger-sized anatomical structure; - cropping the medical image to the first bounding box, thereby generating a cropped image containing the image content within the first bounding box; - applying a second neural network to the cropped medical image, wherein the second neural network is trained to detect at least one second class of smaller-sized anatomical structures, thereby generating as output the coordinates of at least one second bounding box and the confidence score of it containing a smaller-sized anatomical structure, - the object detector function is based on a hierarchical relationship between larger-sized and smaller-sized anatomical structures, wherein at least one of the first plurality of classes of larger-sized anatomical structures is expected to contain one or several of the classes of smaller-sized anatomical structures. a) receiving at least one medical image of a field-of-view of the subject; b) applying an object detector function to the medical image, wherein the object detector function is trained to detect a plurality of classes of anatomical structures, thereby generating as output the coordinates of a plurality of bounding boxes and a confidence score for each bounding box, the confidence score giving the probability of the bounding box containing an anatomical structure belonging to one of the plurality of classes; - applying a first neural network to the medical image, wherein the first neural network is trained to detect a first plurality of classes of larger-sized anatomical structures, thereby generating as output the coordinates of at least one first bounding box and the confidence score of it containing a larger-sized anatomical structure; - cropping the medical image to the first bounding box, thereby generating a cropped image containing the image content within the first bounding box; - applying a second neural network to the cropped medical image, wherein the second neural network is trained to detect at least one second class of smaller-sized anatomical structures, thereby generating as output the coordinates of at least one second bounding box and the confidence score of it containing a smaller-sized anatomical structure, - the object detector function is based on a hierarchical relationship between larger-sized and smaller-sized anatomical structures, wherein at least one of the first plurality of classes of larger-sized anatomical structures is expected to contain one or several of the classes of smaller-sized anatomical structures.