Thank you for the answer.
I understand that we can use config file and start the application via
deepstream-app -c source1_csi_dec_infer_resnet_int8.txt
However, my task is required to work python because I need to extract the bounding box and other metadata to do some post processing.
In the example the file source gst pipeline start with this
print("Creating Source \n ")
source = Gst.ElementFactory.make("filesrc", "file-source")
if not source:
sys.stderr.write(" Unable to create Source \n")
So, is it possible to start the gst pipeline with the CSI camera in python?
Edit: I have found the solution!