diff --git a/retinaface/CMakeLists.txt b/retinaface/CMakeLists.txt index a2cb331..509b52e 100644 --- a/retinaface/CMakeLists.txt +++ b/retinaface/CMakeLists.txt @@ -25,6 +25,7 @@ endif() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Ofast -Wfatal-errors -D_MWAITXINTRIN_H_INCLUDED") cuda_add_library(decodeplugin SHARED ${PROJECT_SOURCE_DIR}/decode.cu) +target_link_libraries(decodeplugin nvinfer cudart) find_package(OpenCV) include_directories(OpenCV_INCLUDE_DIRS) diff --git a/retinaface/decode.h b/retinaface/decode.h index d69ddf7..419187a 100644 --- a/retinaface/decode.h +++ b/retinaface/decode.h @@ -113,6 +113,7 @@ namespace nvinfer1 static PluginFieldCollection mFC; static std::vector mPluginAttributes; }; + REGISTER_TENSORRT_PLUGIN(DecodePluginCreator); }; #endif diff --git a/retinaface/retina_r50.cpp b/retinaface/retina_r50.cpp index 4324d12..7629de5 100644 --- a/retinaface/retina_r50.cpp +++ b/retinaface/retina_r50.cpp @@ -34,7 +34,6 @@ const char* OUTPUT_BLOB_NAME = "prob"; using namespace nvinfer1; static Logger gLogger; -REGISTER_TENSORRT_PLUGIN(DecodePluginCreator); cv::Mat preprocess_img(cv::Mat& img) { int w, h, x, y;