NVIDIA / caffe

Caffe: a fast open framework for deep learning.
http://caffe.berkeleyvision.org/
Other
672 stars 263 forks source link

DetectNetTransformLayer support in OpenCV 3+ #539

Closed mprat closed 5 years ago

mprat commented 6 years ago

When doing make runtest with NVCaffe 0.15.0 (or any future version) using OpenCV 3+ (rather than 2.4, as is installed from apt), tests fail with 3 errors:

[  PASSED  ] 1091 tests.
[  FAILED  ] 3 tests, listed below:
[  FAILED  ] DetectNetTransformationLayerTest/1.TestDesaturation, where TypeParam = caffe::CPUDevice<double>
[  FAILED  ] DetectNetTransformationLayerTest/1.TestAllAugmentation, where TypeParam = caffe::CPUDevice<double>
[  FAILED  ] DetectNetTransformationLayerTest/1.TestHueRotation, where TypeParam = caffe::CPUDevice<double>

This error stems from the deprecation of the cv::split() syntax when passed a Mat_ and a vector<Mat_<_Tp>>: https://docs.opencv.org/ref/2.4/d2/d75/namespacecv.html#a0ecb520e917cc9f41a8d5b9bfc4b991f.

However, the syntax to cv::split() when passed a Mat_ and a vector<Mat> (https://docs.opencv.org/3.4.2/d2/de8/group__core__array.html#ga8027f9deee1e42716be8039e5863fbd9) is supported in both OpenCV 3+ and 2.4. This single file change means NVCaffe has all tests passing with OpenCV 3+.

mprat commented 5 years ago

Any update on this? Do I need to sign something before contributing? I would love to stop having to manually apply this patch when using NVCaffe...

drnikolaev commented 5 years ago

Hi @mprat thank you! Could you do https://github.com/NVIDIA/caffe#contributions please?

drnikolaev commented 5 years ago

Fixed in v0.17.2