diff --git a/demo/mask_detection/README.md b/demo/mask_detection/README.md index e6c824527fe37ceb0b51b9d4fa9f7e8ed0af0653..ad8aa9204749d58907a7fa8a54f43a93efae56e9 100644 --- a/demo/mask_detection/README.md +++ b/demo/mask_detection/README.md @@ -1,4 +1,4 @@ -# 百度PaddlePaddle实现口罩检测应用 +# PaddleHub实现口罩佩戴检测应用 ## 0 项目介绍 ![image](https://note.youdao.com/yws/public/resource/b0a4695bc7d58aed3b1ff797409aee1e/BB6BC87A45D146CEBA7BF237B5383835?ynotemdtimestamp=1582271320612) diff --git a/demo/mask_detection/cpp/main.cc b/demo/mask_detection/cpp/main.cc index d673001d7c293d03bc48ac15f39b4edec265bf3a..5a28b591c05dff612d5284d4e6b2974857ec4701 100644 --- a/demo/mask_detection/cpp/main.cc +++ b/demo/mask_detection/cpp/main.cc @@ -68,7 +68,7 @@ int main(int argc, char* argv[]) { item.rect[2], item.rect[3], item.class_id, - item.score); + item.confidence); } // Visualization result diff --git a/demo/mask_detection/cpp/mask_detector.cc b/demo/mask_detection/cpp/mask_detector.cc index f321dbd0af6ffb315c1d3f59505b90116fcb1a08..06e17ebab0c19707c1697d5281d43c3789869fbb 100644 --- a/demo/mask_detection/cpp/mask_detector.cc +++ b/demo/mask_detection/cpp/mask_detector.cc @@ -77,7 +77,7 @@ void VisualizeResult(const cv::Mat& img, text = "NO MASK: "; roi_color = cv::Scalar(0, 0, 255); } - text += std::to_string(static_cast(results[i].score*100)) + "%"; + text += std::to_string(static_cast(results[i].confidence * 100)) + "%"; int font_face = cv::FONT_HERSHEY_TRIPLEX; double font_scale = 1.f; float thickness = 1; @@ -243,7 +243,7 @@ void MaskClassifier::Postprocess(std::vector* faces) { } } (*faces)[i].class_id = best_class_id; - (*faces)[i].score = best_class_score; + (*faces)[i].confidence = best_class_score; } } diff --git a/demo/mask_detection/cpp/mask_detector.h b/demo/mask_detection/cpp/mask_detector.h index 0b10794fb38d4fd71f1d306df7d83925df82717e..1ca35106c8b151fc7171195b6ac554aba2e22c4d 100644 --- a/demo/mask_detection/cpp/mask_detector.h +++ b/demo/mask_detection/cpp/mask_detector.h @@ -32,7 +32,7 @@ struct FaceResult { // Detection result: cv::Mat of face rectange cv::Mat roi_rect; // Classification result: confidence - float score; + float confidence; // Classification result : class id int class_id; };