Draw Lines or Region of Interest on Each frame

I want to draw the lines or regions on the frames which i am getting from live stream or video. I am not sure if this is possible through OSD in configurations or directly using python script. Please help.
Below is the python test-1 application which i am trying to use.

P.S: I have no issues running the deepstream, everything is running fine.

You can add display meta to the buffer and nvdsosd will draw it. I have done it only on C, but I know it must be possible with python. Just probe the buffer somewhere after the stream mux and add the custom overlay.

This topic may be useful.