{"action":"created","issue":{"url":"https://api.github.com/repos/OpenCVBlueprints/OpenCVBlueprints/issues/8","repository_url":"https://api.github.com/repos/OpenCVBlueprints/OpenCVBlueprints","labels_url":"https://api.github.com/repos/OpenCVBlueprints/OpenCVBlueprints/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/OpenCVBlueprints/OpenCVBlueprints/issues/8/comments","events_url":"https://api.github.com/repos/OpenCVBlueprints/OpenCVBlueprints/issues/8/events","html_url":"https://github.com/OpenCVBlueprints/OpenCVBlueprints/issues/8","id":147208097,"number":8,"title":"Chapter 5 possible errata and doubt","user":{"login":"LorenaGdL","id":9889214,"avatar_url":"https://avatars.githubusercontent.com/u/9889214?v=3","gravatar_id":"","url":"https://api.github.com/users/LorenaGdL","html_url":"https://github.com/LorenaGdL","followers_url":"https://api.github.com/users/LorenaGdL/followers","following_url":"https://api.github.com/users/LorenaGdL/following{/other_user}","gists_url":"https://api.github.com/users/LorenaGdL/gists{/gist_id}","starred_url":"https://api.github.com/users/LorenaGdL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LorenaGdL/subscriptions","organizations_url":"https://api.github.com/users/LorenaGdL/orgs","repos_url":"https://api.github.com/users/LorenaGdL/repos","events_url":"https://api.github.com/users/LorenaGdL/events{/privacy}","received_events_url":"https://api.github.com/users/LorenaGdL/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-10T09:04:07Z","updated_at":"2016-04-10T12:59:09Z","closed_at":null,"body":"Hi guys! As the title says, this is about Chapter 5 of the book, so this is mainly for you @StevenPuttemans \r\n\r\n**1. Reporting a possible trivial errata**. The cascade classification process in detail > Step2  > First paragraph: [...] *especially when knowing that a model of 24x24 pixels can yield more than 16,000 features* -> Shouldn't it be 160,000 features? Not the most important errata at all, but just letting you know.\r\n\r\n**2. A question about the explanation of the maxFalseAlarmRate param**. I'm not sure if this is an errata, a confusing explanation, or just that I'm plain wrong. I'll start by copying the book explanation:\r\n\r\n*- maxFalseAlarmRate: This is the threshold that defines how much of your negative samples need to be classified as negatives before the boosting process should stop adding weak classifiers to the current stage. The default value is 0.5 and ensures that a stage of weak classifier will only do slightly better than random guessing on the negative samples. Increasing this value too much could lead to a single stage that already filters out most of your given windows, resulting in a very slow model at detection time due to the vast amount of features that need to be validated for each window. This will simply remove the large advantage of the concept of early window rejection.*\r\n\r\nSo, what's confusing me is the second half the of paragraph. You say increasing the param value results in more filtering and more number of features to validate per stage. As I understand it, increasing the maxFalseAlarmRate implies letting the stage to misclassify more negative samples as positive ones. Therefore, less negative samples are rejected in that stage, and a higher number of accepted windows passes to the next stage. Also, I think (though I'm not too sure here) that the number of weak classifiers/features per stage is lower as the maxFalseAlarmRate is higher. In fact, as you say later on, *This process continues until the false acceptance ratio on the negative samples is lower than the maximum false alarm rate set.* Therefore, with a higher maxFalseAlarmRate, the chances to get a lower acceptance ratio increases, leading to stages with less features.\r\n\r\nTo sum up, did you really want to say *increasing this value* instead of *decreasing this value*, or did I simply get it wrong?\r\n\r\n**3. An additional doubt (I can post it in the OpenCV forum if you prefer)**. Based on your experience, is there any con (at detection time) of using more number of stages, but with less restrictive conditions? e.g. using 20 stages with minHit 0.990 instead of using 10 stages with minHit 0.995 (supposing you have enough data to tackle training in both cases, and that the final minHit is the same -haven't done math-)\r\n\r\n**4. Good job on the chapter ;)**"},"comment":{"url":"https://api.github.com/repos/OpenCVBlueprints/OpenCVBlueprints/issues/comments/207982352","html_url":"https://github.com/OpenCVBlueprints/OpenCVBlueprints/issues/8#issuecomment-207982352","issue_url":"https://api.github.com/repos/OpenCVBlueprints/OpenCVBlueprints/issues/8","id":207982352,"user":{"login":"StevenPuttemans","id":4621239,"avatar_url":"https://avatars.githubusercontent.com/u/4621239?v=3","gravatar_id":"","url":"https://api.github.com/users/StevenPuttemans","html_url":"https://github.com/StevenPuttemans","followers_url":"https://api.github.com/users/StevenPuttemans/followers","following_url":"https://api.github.com/users/StevenPuttemans/following{/other_user}","gists_url":"https://api.github.com/users/StevenPuttemans/gists{/gist_id}","starred_url":"https://api.github.com/users/StevenPuttemans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StevenPuttemans/subscriptions","organizations_url":"https://api.github.com/users/StevenPuttemans/orgs","repos_url":"https://api.github.com/users/StevenPuttemans/repos","events_url":"https://api.github.com/users/StevenPuttemans/events{/privacy}","received_events_url":"https://api.github.com/users/StevenPuttemans/received_events","type":"User","site_admin":false},"created_at":"2016-04-10T12:59:09Z","updated_at":"2016-04-10T12:59:09Z","body":"@LorenaGdL your explanation is making 150% sense and it is indeed all about subtleties here. I will add the erratum also to the page and report it back to Packt to avoid future misunderstanding of this parameter. \r\n\r\nBesides that I have taken the time to surf the net a bit and it seems to me that I just wrote the explanation in a wrong way, though your meaning was exactly what I was aiming for!"}}