UFF SSD Plugins on Python

Hello. I have managed to launch the sampleUffSSD both on Float and INT8. But all code is in C++. I am not very good (at all) with C++ so I would like to launch the same sample, but with python. I have seen that there’s a python/custom_layer sample with the custom layers being written in C++ and then ‘transformed’ with SWIG to be called with python. I was trying to just copy and paste the Plugin and PluginFactory from the sampleUffSSD.cpp, but I get a few pages of errors when I try to compile it.

Here’s a link to a pastebin with the error: https://pastebin.com/bxKXiaft
Here’s a link to a pastebin with the plugin code I have copied to the python/custom_layers/tensorrtplugins/src: https://pastebin.com/JpZxWSq6

Can somebody please tell me what am I doing wrong and maybe there’s another way?

After some fixing I have managed to fix all the errors from my code. Now all the errors are coming from the plugin_wrap.cpp: https://pastebin.com/76tB4HfR

I have also figured out that the SWIG does not support the unique_ptr. I have changed them to shared_ptr and the thing compiled, but it does not work the intended way. It just crashes with segmentation fault when trying to parse [TensorRT] INFO: UFFParser: Operation of node StridedSlice

The TensorRT does not support this op, but it works like a charm while using the same exact plugin and plugin factory in the c++ sample code.