A non-transitory computer readable medium comprising computer readable code which, when executed by one or more processors, cause said one or more processors to generate a training dataset to train a machine learning model to predict illumination conditions for different positions relative to a scene, said training dataset including training images and reference data, said computer readable code causing said one or more processors to:
- obtain a training image of a training scene, to be included in the training dataset, acquired by a first camera having a first coordinate system associated thereto;
- determine a plurality of local illumination maps, each of the local illumination maps being associated to a respective position relative to the training scene in a respective second coordinate system and representing in said respective second coordinate system the illumination received from different directions of arrival around said respective position;
- transform the position of each of the local illumination maps from the respective second coordinate system to the first coordinate system;
- responsive to determining that the transformed position of the respective local illumination map is visible in the training image:
- transform said local illumination map from the respective second coordinate system to the first coordinate system and include the transformed local illumination map and its transformed position in the reference data associated to the training image to enable training the machine learning model to predict the different illumination conditions for the different positions relative to the scene.