mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 23:33:05 +04:00
Merge pull request #21607 from fengyuentau:fix_FaceDetectorYN_dynamic_shape
Use YuNet of fixed input shape to fix not-supported-dynamic-zero-shape for FaceDetectorYN * use yunet with input of fixed shape * update yunet used in face recognition regression
This commit is contained in:
@@ -78,7 +78,7 @@ TEST(Objdetect_face_detection, regression)
|
||||
// }
|
||||
|
||||
// Initialize detector
|
||||
std::string model = findDataFile("dnn/onnx/models/yunet-202109.onnx", false);
|
||||
std::string model = findDataFile("dnn/onnx/models/yunet-202202.onnx", false);
|
||||
Ptr<FaceDetectorYN> faceDetector = FaceDetectorYN::create(model, "", Size(300, 300));
|
||||
faceDetector->setScoreThreshold(0.7f);
|
||||
|
||||
@@ -178,7 +178,7 @@ TEST(Objdetect_face_recognition, regression)
|
||||
}
|
||||
|
||||
// Initialize detector
|
||||
std::string detect_model = findDataFile("dnn/onnx/models/yunet-202109.onnx", false);
|
||||
std::string detect_model = findDataFile("dnn/onnx/models/yunet-202202.onnx", false);
|
||||
Ptr<FaceDetectorYN> faceDetector = FaceDetectorYN::create(detect_model, "", Size(150, 150), score_thresh, nms_thresh);
|
||||
|
||||
std::string recog_model = findDataFile("dnn/onnx/models/face_recognizer_fast.onnx", false);
|
||||
|
||||
Reference in New Issue
Block a user