Method for training a machine learning model, comprising: - providing training data, wherein the training data for each object of a multiplicity of objects comprise i) at least one reference image recording of an optical code introduced into a surface of the object, and ii) a transformed reference image recording (RI t) of the optical code, wherein decoding the optical code in the transformed reference image recording (RI t) generates fewer decoding errors than decoding the optical code in the reference image recording, wherein for each object the transformed reference image recording (RI t) was generated by applying one or more transformations to the at least one reference image recording, wherein the one or more transformations increase the contrast between the optically readable code and the surrounding part of the surface and/or reduce or eliminate distortions and/or reduce or eliminate reflections, wherein the objects are different specimens of a plant or animal product, - providing a machine learning model, wherein the machine learning model is configured to generate a second image recording on the basis of at least one first image recording and on the basis of model parameters, wherein the second image recording is a transformed first image recording, - training the machine learning model, wherein the training for each object of the multiplicity of objects comprises: o inputting the at least one reference image recording into the machine learning model, o receiving a predicted transformed reference image recording (I*) from the machine learning model, o calculating a deviation between the transformed reference image recording (RI t) and the predicted transformed reference image recording (I*), o modifying the model parameters with regard to reducing the deviation, - storing and/or outputting the trained machine learning model (MLM t) and/or communicating the trained machine learning model (MLM t) to a separate computer system and/or using the trained machine learning model (MLM t) to generate a transformed image recording from at least one new image recording of an object. - providing training data, wherein the training data for each object of a multiplicity of objects comprise i) at least one reference image recording of an optical code introduced into a surface of the object, and ii) a transformed reference image recording (RI t) of the optical code, wherein decoding the optical code in the transformed reference image recording (RI t) generates fewer decoding errors than decoding the optical code in the reference image recording, wherein for each object the transformed reference image recording (RI t) was generated by applying one or more transformations to the at least one reference image recording, wherein the one or more transformations increase the contrast between the optically readable code and the surrounding part of the surface and/or reduce or eliminate distortions and/or reduce or eliminate reflections, wherein the objects are different specimens of a plant or animal product, - providing a machine learning model, wherein the machine learning model is configured to generate a second image recording on the basis of at least one first image recording and on the basis of model parameters, wherein the second image recording is a transformed first image recording, - training the machine learning model, wherein the training for each object of the multiplicity of objects comprises: o inputting the at least one reference image recording into the machine learning model, o receiving a predicted transformed reference image recording (I*) from the machine learning model, o calculating a deviation between the transformed reference image recording (RI t) and the predicted transformed reference image recording (I*), o modifying the model parameters with regard to reducing the deviation, o inputting the at least one reference image recording into the machine learning model, o receiving a predicted transformed reference image recording (I*) from the machine learning model, o calculating a deviation between the transformed reference image recording (RI t) and the predicted transformed reference image recording (I*), o modifying the model parameters with regard to reducing the deviation, - storing and/or outputting the trained machine learning model (MLM t) and/or communicating the trained machine learning model (MLM t) to a separate computer system and/or using the trained machine learning model (MLM t) to generate a transformed image recording from at least one new image recording of an object.