The main point of this PR is to greatly improve the runtime of depth map rasterization. It is currently written on Python and this PR takes only the hot loop and codes it in C++.
The main guiding points here:
1 - Don't break compatibility. Every user of PRNet should be using the code in the same way, without installing any additional dependency or doing extra steps. So the code will gracefully fallback to the original Python code if the user do not compile the C++ code.
2 - Easy to use. The compilation step is quite simple, and a build.sh script is available for Unix users. Also the required dependencies to compile are a C++ compiler and cmake to make life easier on different OSes. So no additional libs or tools are required.
3 - Touch the minimal amount of code so that the debugging and maintenance process stays as much as possible on Python.
4 - Must be quite fast. For a 250x250 image, the runtime went from 2376ms to 2.152ms on a i7-8700K. Notice that no threads o parallel computing was used, it was just a plain conversion from the Python code to C++.
I've noticed that there is a cython implementation, however it is on another repo, and it may be hard to setup for people that do not have any cython knowledge.
The main point of this PR is to greatly improve the runtime of depth map rasterization. It is currently written on Python and this PR takes only the hot loop and codes it in C++.
The main guiding points here: 1 - Don't break compatibility. Every user of PRNet should be using the code in the same way, without installing any additional dependency or doing extra steps. So the code will gracefully fallback to the original Python code if the user do not compile the C++ code. 2 - Easy to use. The compilation step is quite simple, and a build.sh script is available for Unix users. Also the required dependencies to compile are a C++ compiler and cmake to make life easier on different OSes. So no additional libs or tools are required. 3 - Touch the minimal amount of code so that the debugging and maintenance process stays as much as possible on Python. 4 - Must be quite fast. For a 250x250 image, the runtime went from 2376ms to 2.152ms on a i7-8700K. Notice that no threads o parallel computing was used, it was just a plain conversion from the Python code to C++.
I've noticed that there is a cython implementation, however it is on another repo, and it may be hard to setup for people that do not have any cython knowledge.
On a side note, amazing work on PRNet! :D