1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 23:33:05 +04:00

Test for FP16 version of OpenCV face detection network

This commit is contained in:
Dmitry Kurtaev
2018-02-05 18:10:18 +03:00
parent 56bcdfd7d9
commit 8817907647
2 changed files with 9 additions and 3 deletions
+8 -2
View File
@@ -460,10 +460,11 @@ TEST(Test_Caffe, multiple_inputs)
normAssert(out, first_image + second_image);
}
TEST(Test_Caffe, opencv_face_detector)
typedef testing::TestWithParam<std::string> opencv_face_detector;
TEST_P(opencv_face_detector, Accuracy)
{
std::string proto = findDataFile("dnn/opencv_face_detector.prototxt", false);
std::string model = findDataFile("dnn/opencv_face_detector.caffemodel", false);
std::string model = findDataFile(GetParam(), false);
Net net = readNetFromCaffe(proto, model);
Mat img = imread(findDataFile("gpu/lbpcascade/er.png", false));
@@ -482,6 +483,11 @@ TEST(Test_Caffe, opencv_face_detector)
0.95097077, 0.51901293, 0.45863652, 0.5777427, 0.5347801);
normAssert(out.reshape(1, out.total() / 7).rowRange(0, 6).colRange(2, 7), ref);
}
INSTANTIATE_TEST_CASE_P(Test_Caffe, opencv_face_detector, Values(
"dnn/opencv_face_detector.caffemodel",
"dnn/opencv_face_detector_fp16.caffemodel"
));
TEST(Test_Caffe, FasterRCNN_and_RFCN)
{