}
#endif // HAVE_DNN_NGRAPH
+
+#ifdef HAVE_CUDA
+ Ptr<BackendNode> initCUDA(
+ void *context_,
+ const std::vector<Ptr<BackendWrapper>>& inputs,
+ const std::vector<Ptr<BackendWrapper>>& outputs
+ ) override
+ {
+ auto context = reinterpret_cast<csl::CSLContext*>(context_);
+
+ cuda4dnn::InterpolationType itype;
+ if (interpolation == "nearest")
+ itype = InterpolationType::NEAREST_NEIGHBOUR;
+ else if (interpolation == "bilinear")
+ itype = InterpolationType::BILINEAR;
+ else
+ CV_Error(Error::StsNotImplemented, "Requested interpolation mode is not available in resize layer.");
+
+ return make_cuda_node<cuda4dnn::ResizeOp>(preferableTarget, std::move(context->stream), itype, scaleHeight, scaleWidth);
+ }
+#endif
+
+
protected:
int outWidth, outHeight;
- const int zoomFactorWidth, zoomFactorHeight;
+ const float zoomFactorWidth, zoomFactorHeight;
String interpolation;
float scaleWidth, scaleHeight;
bool alignCorners;
1, 2, 0.989633f, 0.450719f, 0.463353f, 0.496305f, 0.522258f, // a car
1, 2, 0.997412f, 0.647584f, 0.459939f, 0.821038f, 0.663947f); // a car
- double scoreDiff = (target == DNN_TARGET_OPENCL_FP16 || target == DNN_TARGET_MYRIAD) ? 0.006 : 8e-5;
- double iouDiff = (target == DNN_TARGET_OPENCL_FP16 || target == DNN_TARGET_MYRIAD) ? 0.042 : 3e-4;
-
+ double scoreDiff = 8e-5, iouDiff = 3e-4;
+ if (target == DNN_TARGET_OPENCL_FP16 || target == DNN_TARGET_MYRIAD)
+ {
+ scoreDiff = 0.006;
- iouDiff = 0.018;
++ iouDiff = 0.042;
+ }
+ else if (target == DNN_TARGET_CUDA_FP16)
+ {
+ scoreDiff = 0.04;
+ iouDiff = 0.03;
+ }
std::string config_file = "yolov3.cfg";
std::string weights_file = "yolov3.weights";
ocv_add_dispatched_file(morph SSE2 SSE4_1 AVX2)
ocv_add_dispatched_file(smooth SSE2 SSE4_1 AVX2)
ocv_add_dispatched_file(sumpixels SSE2 AVX2 AVX512_SKX)
-ocv_add_dispatched_file(undistort SSE2 AVX2)
ocv_define_module(imgproc opencv_core WRAP java python js)
+
+ ocv_check_environment_variables(OPENCV_IPP_GAUSSIAN_BLUR)
+ option(OPENCV_IPP_GAUSSIAN_BLUR "Enable IPP optimizations for GaussianBlur (+8Mb in binary size)" OFF)
+ if(OPENCV_IPP_GAUSSIAN_BLUR)
+ ocv_append_source_file_compile_definitions(${CMAKE_CURRENT_SOURCE_DIR}/src/smooth.dispatch.cpp "ENABLE_IPP_GAUSSIAN_BLUR=1")
+ endif()