TDA4VM: Changing input channels for custom model in edgeai benchmark

Part Number: TDA4VM

Hello time experts! 

This query is related with deploying user pretrained model on SDK TDA4VM(tag 9.1release). We have trained our segmentation model using pytorch framework and we have exported to onnx format. We could see that model has successfully compiled using edgeai tidl tools. In order to deploy on sdk using gst apps, we could see that we need to compile using Benchmark repository. So when we try to add our model dictionary into it we could see some errors related to input channels. 

Our model input shape format: [1, 1, 96, 128]

But got input shape: [1, 3, 96,128]

I could see that default preprocessing function preprocess images in RGB format, how could we modify the script to preprocess images in GRAY format? 

Our model dictionary:

        'imageseg-3': dict(

            task_type='segmentation',

            calibration_dataset=imageseg_calib_dataset,

            input_dataset=imageseg_val_dataset,

            preprocess=preproc_transforms.get_transform_jai((128,96), (128,96), backend='cv2', interpolation=cv2.INTER_LINEAR),

            session=sessions.ONNXRTSession(**jai_session_cfg,

                runtime_options=settings.runtime_options_onnx_np2(),

                model_path=f'/home/mugu/edgeai-benchmark/model/seat.onnx'),

            postprocess=postproc_transforms.get_transform_segmentation_onnx(),

            )

        )

Thanks