Reorder channel layer for smooth native RGB - BGR
See original GitHub issueHere’s why we have that policy:.
Keras developers respond to issues. We want to focus on work that benefits the whole community, e.g., fixing bugs and adding features. Support only helps individuals. GitHub also notifies thousands of people when issues are filed. We want them to see you communicating an interesting problem, rather than being redirected to Stack Overflow.
System information.
- TensorFlow version (you are using): 2.7
- Are you willing to contribute it (Yes/No): Yes
Describe the feature and the current behavior/state.
The feature is a tf.keras
layer to let us reorder the channels of a specific dimension on during the feedforward operation without having to rely on custom implementation. This would be nice to finetune and deploy models with RGB and BGR without having to change the software that calls the TF Serving API.
Will this change the current api? How?
rgb2bgr_layer = tf.keras.layers.ReorderChannel(axis=-1, order[2, 1, 0])
Who will benefit from this feature? Everyone who wants to try and deploy different models without changing the software that calls the TF Serving API.
- Do you want to contribute a PR? (yes/no): yes
- If yes, please read this page for instructions
- Briefly describe your candidate solution(if contributing): Create a ReorderChannel layer that receives parameters as “axis” and order. It will reorder the channels of the axis according to the axis. Simple as that.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (3 by maintainers)
Let’s move this conversation to keras-cv: https://github.com/keras-team/keras-cv/issues/20 @piEsposito
@old-school-kid you are welcome. Thank you for giving me the opportunity to make that clear.