Detectnet run external python script if person detect

Is there way to make detectnet open python script( when person is detect.

detectnet --model=models/person/ssd-mobilenet.onnx --labels=models/person/labels.txt --input-blob=input_0 --output-cvg=scores --output-bbox=boxes rtsp://


YES. You can add a system call to launch python script when the numDetections > 0 below:


You might also just want to modify and integrate your code into it. That way your whole application can be in Python.

That’s great idea but my doesn’t work with rtsp.
with c…<detectnet --input-codec=h264 “rtsp://”> I am able to see the video window…but with <./ --input-codec=h264 “rtsp://”> I am not able to see the video window.

Hmm interesting, what error are you getting?

Can you try changing so it creates the videoOutput interface first? Like this:

output = jetson.utils.videoOutput(opt.output_URI, argv=sys.argv+is_headless)
input = jetson.utils.videoSource(opt.input_URI, argv=sys.argv)

If you edit jetson-inference/python/examples/, then re-run these commands so that the updated script is copied to the correct install locations:

# after editing jetson-inference/python/examples/
$ cd jetson-inference/build
$ cmake ../
$ make
$ sudo make install