open_model_zoo
open_model_zoo copied to clipboard
Why do python interfaces use shared library modules written in C++ instead of separate python code
I have a question, why do python interfaces use shared library modules written in C++ instead of separate python code.
Like this one, [human_pose_estimation_3d_demo] 's pose_extractor module. Or where can I get code written in Python? I mean, models like Pose 3D. Because to use them cross-platform, I had to recompile them instead of using them directly.
it is common optimization practice to use C++ compiled modules to speed up heavy calculations. This shared library contains the code for localization pose points from 3d mesh grid, pure python realization will be very slow...
it is common optimization practice to use C++ compiled modules to speed up heavy calculations. This shared library contains the code for localization pose points from 3d mesh grid, pure python realization will be very slow...
Thanks for your reply. Is there a better cross-platform solution if I use them on Jupyter Notebook? Now I have to compile a copy on the host machine if I want to use them.
Sorry, the code written only for demonstration purposes, it is not ready to use solution and moreover without any intention to use it as cross-platform code. You can try to create wheel from this lib for your purposes and install it or rewrite in convenient for you way. Beside that, there is also simple realization of model adapter in accuracy checker in python (but may have not full functionality available in demo), you can try to use it as reference