diff --git a/CMakeLists.txt b/CMakeLists.txt index 421e53a..5e6829e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -88,6 +88,9 @@ target_link_libraries(test_yolo3 tkDNN) add_executable(test_yolo3_tiny tests/yolo3_tiny/yolo3_tiny.cpp) target_link_libraries(test_yolo3_tiny tkDNN) +add_executable(test_yolo3_tiny512 tests/yolo3_tiny512/yolo3_tiny512.cpp) +target_link_libraries(test_yolo3_tiny512 tkDNN) + add_executable(test_yolo3_berkeley tests/yolo3_berkeley/yolo3_berkeley.cpp) target_link_libraries(test_yolo3_berkeley tkDNN) diff --git a/src/CenternetDetection.cpp b/src/CenternetDetection.cpp index edfe1c2..5508b88 100644 --- a/src/CenternetDetection.cpp +++ b/src/CenternetDetection.cpp @@ -1,4 +1,9 @@ #include "CenternetDetection.h" +#include "opencv2/imgproc/imgproc.hpp" +#include +#include + + namespace tk { namespace dnn { @@ -226,7 +231,7 @@ void CenternetDetection::update(cv::Mat &imageORIG) { sz_old = sz; cv::cuda::GpuMat im_Orig; im_Orig = cv::cuda::GpuMat(imageORIG); - // cv::cuda::resize (im_Orig, imageF1_d, cv::Size(new_width, new_height)); + cv::cuda::resize (im_Orig, imageF1_d, cv::Size(new_width, new_height)); checkCuda( cudaDeviceSynchronize() ); sz = imageF1_d.size(); @@ -235,7 +240,7 @@ void CenternetDetection::update(cv::Mat &imageORIG) { std::cout << " TIME resize: " << std::chrono::duration_cast(end_t - step_t).count() << " us" << std::endl; step_t = end_t; - // cv::cuda::warpAffine(imageF1_d, imageF2_d, trans, cv::Size(inp_width, inp_height), cv::INTER_LINEAR ); + cv::cuda::warpAffine(imageF1_d, imageF2_d, trans, cv::Size(inp_width, inp_height), cv::INTER_LINEAR ); checkCuda( cudaDeviceSynchronize() ); end_t = std::chrono::steady_clock::now(); std::cout << " TIME warpAffine: " << std::chrono::duration_cast(end_t - step_t).count() << " us" << std::endl; @@ -248,7 +253,7 @@ void CenternetDetection::update(cv::Mat &imageORIG) { step_t = end_t; dim2 = dim; - // cv::cuda::split(imageF1_d,bgr);//split source + cv::cuda::split(imageF1_d,bgr);//split source end_t = std::chrono::steady_clock::now(); std::cout << " TIME split: " << std::chrono::duration_cast(end_t - step_t).count() << " us" << std::endl; step_t = end_t; @@ -413,4 +418,4 @@ void CenternetDetection::update(cv::Mat &imageORIG) { TIMER_STOP stats.push_back(t_ns); } -}} \ No newline at end of file +}}