{"id":100,"date":"2009-11-09T11:13:35","date_gmt":"2009-11-09T01:13:35","guid":{"rendered":"http:\/\/www.computer-vision-software.com\/blog\/?p=100"},"modified":"2009-11-30T13:00:58","modified_gmt":"2009-11-30T03:00:58","slug":"detect-attention-please","status":"publish","type":"post","link":"http:\/\/www.computer-vision-software.com\/blog\/2009\/11\/detect-attention-please\/","title":{"rendered":"Detect attention, please!"},"content":{"rendered":"<p style=\"padding-left: 30px;\">Nowadays, different audience measurement systems become more and more popular. They are used in active advertising, for gathering statistics, etc. One of the key features of these smart systems is <strong>attention detection<\/strong>.\u00a0 For advertisers, for instance,\u00a0 it seems very\u00a0 important to know, how much attention commercial attracts. In this article, I will describe attention detector module, used in our <a onclick=\"javascript:pageTracker._trackPageview('\/outgoing\/www.computer-vision-software.com\/blog\/2009\/10\/audience-measurement-face-tracker-gender-recognition-attention-recognition-etc\/');\"  href=\"http:\/\/www.computer-vision-software.com\/blog\/2009\/10\/audience-measurement-face-tracker-gender-recognition-attention-recognition-etc\/\" target=\"_blank\">Audience Measurement system<\/a>.<\/p>\n<p><!--more--><\/p>\n<p>We started our work with attempts to understand, what attention we want to detect.\u00a0 On the one hand, It seems very easy\u00a0 to say, if person has attention or not.\u00a0 On the other hand,\u00a0 it&#8217;s very difficult to formalize: <strong>What attention is<\/strong>.\u00a0 In some articles, it&#8217;s considered to detect attention based on <em>eyes information<\/em>.\u00a0 But if person wears sunglasses? Another &#8220;criteria&#8221; is to to use <em>nose information<\/em>: Where nose points at! For our business case nose information is not enough either. More over, nose can also be &#8220;hidden&#8221;.<\/p>\n<p>That&#8217;s why our attention is based on <strong>head pose information<\/strong>. We collected face images, which in our opinion, have attention and don&#8217;t have attention.\u00a0 To be honest, most of images with attention were <em>frontal faces<\/em> and vice versa.\u00a0 These two sets resolve task.<\/p>\n\n\t\t<style type=\"text\/css\">\n\t\t\t#gallery-1 {\n\t\t\t\tmargin: auto;\n\t\t\t}\n\t\t\t#gallery-1 .gallery-item {\n\t\t\t\tfloat: left;\n\t\t\t\tmargin-top: 10px;\n\t\t\t\ttext-align: center;\n\t\t\t\twidth: 50%;\n\t\t\t}\n\t\t\t#gallery-1 img {\n\t\t\t\tborder: 2px solid #cfcfcf;\n\t\t\t}\n\t\t\t#gallery-1 .gallery-caption {\n\t\t\t\tmargin-left: 0;\n\t\t\t}\n\t\t\t\/* see gallery_shortcode() in wp-includes\/media.php *\/\n\t\t<\/style>\n\t\t<div id='gallery-1' class='gallery galleryid-100 gallery-columns-2 gallery-size-thumbnail'><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon landscape'>\n\t\t\t\t<a onclick=\"javascript:pageTracker._trackPageview('\/outgoing\/www.computer-vision-software.com\/blog\/2009\/11\/detect-attention-please\/attention-2\/');\"  href='http:\/\/www.computer-vision-software.com\/blog\/2009\/11\/detect-attention-please\/attention-2\/'><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"150\" src=\"http:\/\/www.computer-vision-software.com\/blog\/wp-content\/uploads\/2009\/11\/attention1-150x150.jpg\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" srcset=\"http:\/\/www.computer-vision-software.com\/blog\/wp-content\/uploads\/2009\/11\/attention1-150x150.jpg 150w, http:\/\/www.computer-vision-software.com\/blog\/wp-content\/uploads\/2009\/11\/attention1.JPG 300w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><\/a>\n\t\t\t<\/dt><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon portrait'>\n\t\t\t\t<a onclick=\"javascript:pageTracker._trackPageview('\/outgoing\/www.computer-vision-software.com\/blog\/2009\/11\/detect-attention-please\/nonatt\/');\"  href='http:\/\/www.computer-vision-software.com\/blog\/2009\/11\/detect-attention-please\/nonatt\/'><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"150\" src=\"http:\/\/www.computer-vision-software.com\/blog\/wp-content\/uploads\/2009\/11\/nonatt-150x150.jpg\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" srcset=\"http:\/\/www.computer-vision-software.com\/blog\/wp-content\/uploads\/2009\/11\/nonatt-150x150.jpg 150w, http:\/\/www.computer-vision-software.com\/blog\/wp-content\/uploads\/2009\/11\/nonatt.JPG 299w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><\/a>\n\t\t\t<\/dt><\/dl><br style=\"clear: both\" \/>\n\t\t<\/div>\n\n<p>To teach machine to detect attention , we need a machine learning algorithm. We have Viola Jones one and if it can detect face\/non face, why not use it to detect attention\/non attention? Learning samples we have&#8230; So with Adabost, we chose 100 Haar-like features. With them, each image is converted to 100-dimensional vector.\u00a0 To classify it, we used C4.5.\u00a0 Self-test was very good: 97% accuracy.\u00a0 But when started testing on real video, we had bad result: 60% accuracy. The problems begun, when\u00a0 <span style=\"text-decoration: underline;\">lightning conditions were modified<\/span> or <span style=\"text-decoration: underline;\">face shifted some pixels<\/span>, even despite the fact that, we used normalization like in OpenCV Viola Jones algorithm. The matter is that, face and non-face images are very different, but faces with attention and with non-attention are very similar.<\/p>\n<p>Thus, we needed <strong>lightning-invariant method<\/strong>, which is not so sensitive to XY-shifting.\u00a0 We developed our own template-matching method.\u00a0 First, using PCA, we get templates of face. With these templates, each face is\u00a0 converted to N-dimensional vector, which is classified with SVM. Accuracy of our attention system is about <strong>90%<\/strong>.\u00a0 Its working you can see in our <a href=\"..\/2009\/10\/audience-measurement-face-tracker-gender-recognition-attention-recognition-etc\/\" target=\"_blank\">Audience Measurement system<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Nowadays, different audience measurement systems become more and more popular. They are used in active advertising, for gathering statistics, etc. One of the key features of these smart systems is attention detection.\u00a0 For advertisers, for instance,\u00a0 it seems very\u00a0 important to know, how much attention commercial attracts. In this article, I will describe attention detector [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[84],"tags":[58,57,6,59,30],"class_list":["post-100","post","type-post","status-publish","format-standard","hentry","category-opencv","tag-attention-classifier","tag-machine-learning","tag-opencv","tag-svm","tag-viola-jones"],"_links":{"self":[{"href":"http:\/\/www.computer-vision-software.com\/blog\/wp-json\/wp\/v2\/posts\/100","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.computer-vision-software.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.computer-vision-software.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.computer-vision-software.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.computer-vision-software.com\/blog\/wp-json\/wp\/v2\/comments?post=100"}],"version-history":[{"count":0,"href":"http:\/\/www.computer-vision-software.com\/blog\/wp-json\/wp\/v2\/posts\/100\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.computer-vision-software.com\/blog\/wp-json\/wp\/v2\/media?parent=100"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.computer-vision-software.com\/blog\/wp-json\/wp\/v2\/categories?post=100"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.computer-vision-software.com\/blog\/wp-json\/wp\/v2\/tags?post=100"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}