{"action":"created","issue":{"url":"https://api.github.com/repos/Itseez/opencv_contrib/issues/512","repository_url":"https://api.github.com/repos/Itseez/opencv_contrib","labels_url":"https://api.github.com/repos/Itseez/opencv_contrib/issues/512/labels{/name}","comments_url":"https://api.github.com/repos/Itseez/opencv_contrib/issues/512/comments","events_url":"https://api.github.com/repos/Itseez/opencv_contrib/issues/512/events","html_url":"https://github.com/Itseez/opencv_contrib/issues/512","id":125961055,"number":512,"title":"Predict confidence no longer accessible from Python","user":{"login":"cmcfadden","id":211655,"avatar_url":"https://avatars.githubusercontent.com/u/211655?v=3","gravatar_id":"","url":"https://api.github.com/users/cmcfadden","html_url":"https://github.com/cmcfadden","followers_url":"https://api.github.com/users/cmcfadden/followers","following_url":"https://api.github.com/users/cmcfadden/following{/other_user}","gists_url":"https://api.github.com/users/cmcfadden/gists{/gist_id}","starred_url":"https://api.github.com/users/cmcfadden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmcfadden/subscriptions","organizations_url":"https://api.github.com/users/cmcfadden/orgs","repos_url":"https://api.github.com/users/cmcfadden/repos","events_url":"https://api.github.com/users/cmcfadden/events{/privacy}","received_events_url":"https://api.github.com/users/cmcfadden/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Itseez/opencv_contrib/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/Itseez/opencv_contrib/labels/category:%20face","name":"category: face","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-01-11T14:50:06Z","updated_at":"2016-04-21T15:18:22Z","closed_at":null,"body":"Recent changes to faces.hpp mean you can't call into the version of predict that returns label and confidence, you can only access the single argument version of the method.  See this thread for more details:\r\nhttp://answers.opencv.org/question/82294/cant-get-predict-confidence/"},"comment":{"url":"https://api.github.com/repos/Itseez/opencv_contrib/issues/comments/212968546","html_url":"https://github.com/Itseez/opencv_contrib/issues/512#issuecomment-212968546","issue_url":"https://api.github.com/repos/Itseez/opencv_contrib/issues/512","id":212968546,"user":{"login":"protocol114","id":1875039,"avatar_url":"https://avatars.githubusercontent.com/u/1875039?v=3","gravatar_id":"","url":"https://api.github.com/users/protocol114","html_url":"https://github.com/protocol114","followers_url":"https://api.github.com/users/protocol114/followers","following_url":"https://api.github.com/users/protocol114/following{/other_user}","gists_url":"https://api.github.com/users/protocol114/gists{/gist_id}","starred_url":"https://api.github.com/users/protocol114/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/protocol114/subscriptions","organizations_url":"https://api.github.com/users/protocol114/orgs","repos_url":"https://api.github.com/users/protocol114/repos","events_url":"https://api.github.com/users/protocol114/events{/privacy}","received_events_url":"https://api.github.com/users/protocol114/received_events","type":"User","site_admin":false},"created_at":"2016-04-21T15:18:22Z","updated_at":"2016-04-21T15:18:22Z","body":"@mshabunin I would have replied earlier but I have never actually successfully built OpenCV until now... but yes, your changes appear to have fixed the problem.\r\n\r\nHere's an example output from my program:\r\nprediction for face: 2 with confidence 28.366159106486375\r\n\r\nHere's the relevant code (where log is a method that outputs to file as opposed to printing to stdout):\r\n\r\n```python\r\nprediction, conf = self.application.recognizer.predict(test_image[y: y + h, x: x + w])\r\nlog(\"prediction for face: \" + str(prediction) + ' with confidence ' + str(conf))\r\n```\r\n\r\nThe threshold changes work as well, here's with a 0.0 threshold (should always return -1)\r\nprediction for face: -1 with confidence 1.7976931348623157e+308\r\n\r\nThanks for fixing it! This is for a semester project and having these features working helps a lot! "}}