Our model input is fixed width and height( depends on model) and BCHW format, nomalized with 0 - 1.0.
So we need do below preprocesses from a RGB image:
- resize RGB image to model height x height, currently we use opencv resize function.
- change BHWC to BCHW, batch size is always 1.
- normalize CHW data( 0 - 255, one byte ) to 0 - 1.0 ( 4 bytes float), just do “x / 255”
I want to accelerate those preprocesses by hardware, can you give me help how I can impelment them?
We use C/C++ for our project.