简体   繁体   English

LBHP算法中的Python OpenCV 3.x使用阈值

[英]Python OpenCV 3.x use threshold in LBHP algorithm

I wrote a Face detection script with the LBPH algorithm (in Python) cv2.face.createLBPHFaceRecognizer() . 我使用LBPH算法(在Python中) cv2.face.createLBPHFaceRecognizer()编写了人脸检测脚本。
My problem is any other person that the algorithm is not trained on, returns me my number. 我的问题是没有训练算法的任何其他人,给我我的电话号码。 (If it is me it returns 1 but if it's an other person it does the same). (如果是我,则返回1,但如果是其他人,则返回相同)。 So I want to know what I can do, I read something about threshold but I don`t know how to use it and I read about a bug Link to bug . 所以我想知道我能做什么,我读了一些关于阈值的知识,但是我不知道如何使用它,而我却读到了关于Bug的链接 But I don't know how to rebuild the stuff. 但是我不知道如何重建这些东西。 So I want to know what you recommend me, threshold or rebuilding, or anything else. 所以我想知道您向我推荐的内容,门槛或重建金额,或其他任何内容。

So I had a wrong indentation in my code. 所以我的代码缩进错误。 I returned the number for training with the python return command and so it stoped looping and only trained one number and image. 我使用python return命令返回了用于训练的数字,因此它停止了循环,只训练了一个数字和图像。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM