A medical instrument comprising: - a medical imaging system configured for acquiring medical imaging data from a subject ; - a subject support configured for supporting the subject during acquisition of the medical imaging data; - an optical imaging system configured for acquiring optical imaging data of the subject on the subject support; - a memory storing machine executable instructions and a generator neural network , wherein the generator neural network is trained to generate a synthetic image of the subject on the subject support in response to inputting an initial vector ; - a processor , wherein execution of the machine executable instructions causes the processor to: - control the optical imaging system to acquire the optical imaging data; - generate the initial vector using the optical imaging data, - generate the synthetic image by inputting the initial vector into the generator neural network; - calculate a difference between the synthetic image and the optical imaging data; and - provide a warning signal if the difference differs by a predetermined threshold; wherein the initial vector is generated by any one of the following: - generating a random vector , generating an intermediate image by feeding the random vector into the generator neural network, and calculating the initial vector using the intermediate image and the optical imaging data; and - wherein the memory further stores a trained encoder neural network , wherein the initial vector is generated by inputting the optical imaging data into the trained encoder neural network. - a medical imaging system configured for acquiring medical imaging data from a subject ; - a subject support configured for supporting the subject during acquisition of the medical imaging data; - an optical imaging system configured for acquiring optical imaging data of the subject on the subject support; - a memory storing machine executable instructions and a generator neural network , wherein the generator neural network is trained to generate a synthetic image of the subject on the subject support in response to inputting an initial vector ; - a processor , wherein execution of the machine executable instructions causes the processor to: - control the optical imaging system to acquire the optical imaging data; - generate the initial vector using the optical imaging data, - generate the synthetic image by inputting the initial vector into the generator neural network; - calculate a difference between the synthetic image and the optical imaging data; and - provide a warning signal if the difference differs by a predetermined threshold; - control the optical imaging system to acquire the optical imaging data; - generate the initial vector using the optical imaging data, - generate the synthetic image by inputting the initial vector into the generator neural network; - calculate a difference between the synthetic image and the optical imaging data; and - provide a warning signal if the difference differs by a predetermined threshold; - generating a random vector , generating an intermediate image by feeding the random vector into the generator neural network, and calculating the initial vector using the intermediate image and the optical imaging data; and - wherein the memory further stores a trained encoder neural network , wherein the initial vector is generated by inputting the optical imaging data into the trained encoder neural network. <EOS>