Jetson tx2

my code uses c++
at the beginning of my code, i want to add yolo to detect object.
but yolo uses python.
is there any way to add python code to my c++ code?

hello imini,

how about refer to DeepStream SDK APIs.
you may also check for the samples.

It isn’t particularly efficient, but you could also consider the C “system()” function and “pipe()” functions. If you want to see this in man pages (the Jetson usually doesn’t install this, but can run “sudo /usr/local/sbin/unminimize” to add to a Jetson), then you can go through all man pages on that topic via:
man -a system
man -a pipe
…each time you hit the “q” character to quit the next man page section will show up. Some of them are not C functions, but the ones which are will be useful. In C++ you can wrap C functions in “extern "C" {...}”. Some of the headers mentioned in the C man pages have a C++ version wrapping those for you, e.g., “<stdio.h>” is available as “<cstdio>” with extern built into it for C++ if you’ve installed the C++ headers.

Calling external python programs this way is not efficient, especially if each call opens up the python program new each time. If you have a single python program running continuously, and you make calls to run commands or data to/from the running program, then it isn’t too bad, but still is not as good as running in a single language (due to running in a single process).