Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What's difference between python and c++ plugin in the infernece #326

Open
PythonImageDeveloper opened this issue Sep 20, 2020 · 2 comments
Assignees
Labels
question Further information is requested

Comments

@PythonImageDeveloper
Copy link

Hi all,
I want to know If we write the inference plugin for deep learning models with python or c++, what's difference in the speed up?
All we know, the c/c++ language has more speed than python, and this is right when we want to implement the algorithms from scratch, because we want to impelement inference codes of model that has c/c++ backend but python interface, Writing python gstreamer plugin but running the main codes with c/c++ backend(like tensorflow), How different are their speeds(c/c++ plugin and python plugin)?

@michaelgruner
Copy link
Contributor

Hi @PythonImageDeveloper. I do not have concrete numbers to give you, but I agree with your statement: if the algorithms are written in C/C++ underneath, having a python interface shouldn't be a significant bottleneck. This will be true as long as you can transparently share memory between C/C++ and Python. As a reference, we have some elements written in Python that perform inference underneath (PyTorch in our case) and it works fine.

In the specific case of GstInference, we prefer to stick to a lower level for portability purposes. It is easy for a user to write an app in Python, Rust, C#, if we are in C/C++. It is not true the other way around.

@michaelgruner michaelgruner self-assigned this Sep 21, 2020
@michaelgruner michaelgruner added the question Further information is requested label Sep 21, 2020
@PythonImageDeveloper
Copy link
Author

PythonImageDeveloper commented Oct 12, 2020

Hi @michaelgruner ,
Thanks your suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants