Hi everyone,
as written in the title, I have trained a model with Keras that takes as Input an YCbCr image.
However, when I convert the model with CoreMLTools, my newly converted model takes an ARGB image as an input.
I saw that it is possible to change colorspace into BGR or even Greyscale, but I could not find any information regarding YCbCr.
My question is simple, is there a way to handle it ? What should be done to make a CoreML model use YCbCr image.
Kind Regards
as written in the title, I have trained a model with Keras that takes as Input an YCbCr image.
However, when I convert the model with CoreMLTools, my newly converted model takes an ARGB image as an input.
I saw that it is possible to change colorspace into BGR or even Greyscale, but I could not find any information regarding YCbCr.
My question is simple, is there a way to handle it ? What should be done to make a CoreML model use YCbCr image.
Kind Regards
Core ML models can only accept RGB or BGR images as inputs (the alpha channel is ignored). If your model wants a YCbCr image, you'll need to put the image into an MLMultiArray instead. You'll also need to change the input of the Core ML model to be a multi-array, not an image.
Alternatively, you could add some layers at the start of the model that convert RGB back to YCbCr, but that seems like more trouble than it's worth.
Alternatively, you could add some layers at the start of the model that convert RGB back to YCbCr, but that seems like more trouble than it's worth.