I'm experimenting on automatic colorization of 3D Scenes in image space with libtorch. The model input is the L component of an image and predicts the AB values to colorize it.
I am wondering what is the most efficient method of converting the RGB values of the pixels to CIELAB and then fetch them to do the predictions?