A method for training a first neural network ( f v) to detect the viewpoint of an object visible on an image, centered, and belonging to a given category of object when this image is inputted to the first neural network, comprising: providing a dataset of pairs of images ( I i,I' i), each pair of images comprising a first image on which an object belonging to said category is visible under a first viewpoint (v) and centered, and a second image on which the same object is visible under a second viewpoint (v') which differs from the first viewpoint, and centered, providing a second neural network ( f a) configured to be able to deliver appearance information ( a) of an object visible on an image and belonging to said category when this image is inputted to the second neural network, providing a third neural network ( f d) configured to be able to deliver a synthetic image of an object of said category when appearance information of an object and a viewpoint are inputted to the third neural network, jointly training the first neural network, the second neural network, and the third neural network by adapting the parameters of the first neural network, the second neural network, and the third neural network so as to minimize the distance between: at least a portion of the first image of a pair of images from the dataset of pairs of image, this portion showing the object visible on the image, and a synthetic image (f d (f a (I'),f v)) delivered by the third neural network it receives as input a viewpoint delivered by inputting the first image to the first neural network and appearance information delivered by inputting the second image of the pair to the second neural network, characterized in that the first neural network is configured to deliver a plurality of viewpoint hypothesis, the viewpoint hypothesis associated with the smallest distance being used for adapting said parameters. providing a dataset of pairs of images ( I i,I' i), each pair of images comprising a first image on which an object belonging to said category is visible under a first viewpoint (v) and centered, and a second image on which the same object is visible under a second viewpoint (v') which differs from the first viewpoint, and centered, providing a second neural network ( f a) configured to be able to deliver appearance information ( a) of an object visible on an image and belonging to said category when this image is inputted to the second neural network, providing a third neural network ( f d) configured to be able to deliver a synthetic image of an object of said category when appearance information of an object and a viewpoint are inputted to the third neural network, jointly training the first neural network, the second neural network, and the third neural network by adapting the parameters of the first neural network, the second neural network, and the third neural network so as to minimize the distance between: at least a portion of the first image of a pair of images from the dataset of pairs of image, this portion showing the object visible on the image, and a synthetic image (f d (f a (I'),f v)) delivered by the third neural network it receives as input a viewpoint delivered by inputting the first image to the first neural network and appearance information delivered by inputting the second image of the pair to the second neural network, characterized in that the first neural network is configured to deliver a plurality of viewpoint hypothesis, the viewpoint hypothesis associated with the smallest distance being used for adapting said parameters. at least a portion of the first image of a pair of images from the dataset of pairs of image, this portion showing the object visible on the image, and a synthetic image (f d (f a (I'),f v)) delivered by the third neural network it receives as input a viewpoint delivered by inputting the first image to the first neural network and appearance information delivered by inputting the second image of the pair to the second neural network, characterized in that the first neural network is configured to deliver a plurality of viewpoint hypothesis, the viewpoint hypothesis associated with the smallest distance being used for adapting said parameters.