How to add black and white filter in pipeline using videobalance

No. model-color-format=2 means the model needs gray input. gst-nvinfer will convert the video/image data to gray according to this parameter.

Where did you get the yolov4 model? Can you show us the input layer(s)’ dimension?

You don’t need to do this. The gst-nvinfer can do preprocess inrenally. Just fill correct information about your model in the configuration file, gst-nvinfer will handle the color space transformation. DeepStream SDK FAQ - Intelligent Video Analytics / DeepStream SDK - NVIDIA Developer Forums