Adding a python module to a C++ developed application

Hi friends,

I had an application that I had previously developed with OpenCV and C++ that did operations such as object tracking and serial communication. Now I want to add an object detection module to my application. However, object detection applications use python to a large extent. After training the models using python, there are also problems in running them using C++. For example, I could not run different models trained with Yolo v5 or tf2 using OpenCV C++. Many people have not found a solution. Therefore, after capturing the images from the camera with C++, can I do object tracking with C++ and object detection parts with python? So, can I get the output back after sending and processing the image taken from C++ in python? If such a thing is possible, how can I do it?