{"id":4361,"date":"2022-10-24T09:44:33","date_gmt":"2022-10-24T07:44:33","guid":{"rendered":"https:\/\/www.js-soft.com\/diy-with-ai-face-recognition-pytorch\/"},"modified":"2025-11-05T10:44:54","modified_gmt":"2025-11-05T09:44:54","slug":"diy-with-ai-face-recognition-pytorch","status":"publish","type":"post","link":"https:\/\/www.js-soft.com\/en\/diy-with-ai-face-recognition-pytorch\/","title":{"rendered":"DIY with AI: Build a face recognition for yourself with Pytorch"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">So, you&#8217;ve finished MNIST, are ready to conquer the world and you ask yourself &#8220;What&#8217;s next?&#8221;. I say, let&#8217;s build a crappy face recognition app for your very own countenance! This project will give you a sobering perspective, providing instructive insights into the following key aspects of computer vision and deep learning:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong><em>Data labelling<\/em><\/strong>: To kick things off, you will experience the pain and suffering involved in manually preparing data and drawing hundreds of bounding boxes around your own face. You&#8217;re going to use the popular program <a href=\"https:\/\/github.com\/wkentaro\/labelme\">Labelme<\/a> for that.<\/li>\n\n\n\n<li><strong><em>Data augmentation<\/em><\/strong>: Bravo! The dataset you&#8217;ve just carefully created is so pointless that it couldn&#8217;t even be used to learn how to distinguish faces from pieces of toast. To rectify that, we&#8217;re going to use data augmentation with the Python library <a href=\"https:\/\/albumentations.ai\/\">Albumentations<\/a> to increase the volume of data we have available.<\/li>\n\n\n\n<li><strong><em>Transfer learning<\/em><\/strong>: Finally, to demonstrate the simplicity, elegance, and power of deep learning we&#8217;ll fit a simple neural network with sigmoid activation to our training data. Just kidding, lol. We&#8217;re going to use a convoluted contraption with a gazillion layers and an almost infinite amount of hyperparameters, which the learned scholars determined by a sophisticated, very advanced process of trial and error. Of course, that thing has to be pretrained, because deep learning sucks so much that you literally can&#8217;t do anything from scratch. You&#8217;re going to fine-tune a <a href=\"https:\/\/arxiv.org\/abs\/1409.1556\">VGG16<\/a>.<\/li>\n\n\n\n<li><strong><em>Pytorch<\/em><\/strong>: To make things even more opaque, we&#8217;re not just going to do some NumPy linear algebra to implement our deep learning routines. Instead, we&#8217;re going to use <a href=\"https:\/\/pytorch.org\/\">Pytorch<\/a>, the deep learning masochist&#8217;s favorite tensor computation library that abstracts away just the right amount of detail to guarantee that you have no idea to what device which part of your data is going when and what it&#8217;s doing there. It achieves this feat by using interfaces that selectively hide or expose hidden states, apparently at random. Plus, its math interface is congruent with that of NumPy, but with subtle differences sprinkled everywhere to make sure that nothing ever just works as intended first try. You&#8217;re going to love this!<\/li>\n\n\n\n<li><strong><em>Deployment<\/em><\/strong>: Piecing all of this together you&#8217;re going to load your trained model from memory to have it predict bounding boxes for a live camera feed of yourself. You will be disappointed by the mediocrity of the results and that lingering thought in the back of your mind, that this project was an unmitigated waste of your time, will manifest into painful certainty. Congratulations!<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Can&#8217;t wait to start? <a href=\"https:\/\/github.com\/js-soft\/quick-face-reconition\" target=\"_blank\" rel=\"noreferrer noopener\">Jump right into the project<\/a>. We&#8217;ve prepared a Jupyter notebook just for you!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This project hopes to give a practical example of what a simple but non-trivial deep learning computer vision project might look like from start to finish. We chose the topic of real-time face tracking. <\/p>\n","protected":false},"author":7,"featured_media":4343,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[171],"tags":[],"class_list":["post-4361","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-machine-learning-en-3"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>DIY with AI: Build a face recognition for yourself with Pytorch - j&amp;s-soft<\/title>\n<meta name=\"description\" content=\"Hands-on experience with AI: Find out what really goes into building a face recognition application - even a simple one.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.js-soft.com\/en\/diy-with-ai-face-recognition-pytorch\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"DIY with AI: Build a face recognition for yourself with Pytorch - j&amp;s-soft\" \/>\n<meta property=\"og:description\" content=\"Hands-on experience with AI: Find out what really goes into building a face recognition application - even a simple one.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.js-soft.com\/en\/diy-with-ai-face-recognition-pytorch\/\" \/>\n<meta property=\"og:site_name\" content=\"j&amp;s-soft\" \/>\n<meta property=\"article:published_time\" content=\"2022-10-24T07:44:33+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-11-05T09:44:54+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.js-soft.com\/wp-content\/uploads\/2022\/10\/cat-stablediff-bbox.png\" \/>\n\t<meta property=\"og:image:width\" content=\"768\" \/>\n\t<meta property=\"og:image:height\" content=\"768\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Stanislaw H\u00fcll\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Stanislaw H\u00fcll\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"DIY with AI: Build a face recognition for yourself with Pytorch - j&amp;s-soft","description":"Hands-on experience with AI: Find out what really goes into building a face recognition application - even a simple one.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.js-soft.com\/en\/diy-with-ai-face-recognition-pytorch\/","og_locale":"en_US","og_type":"article","og_title":"DIY with AI: Build a face recognition for yourself with Pytorch - j&amp;s-soft","og_description":"Hands-on experience with AI: Find out what really goes into building a face recognition application - even a simple one.","og_url":"https:\/\/www.js-soft.com\/en\/diy-with-ai-face-recognition-pytorch\/","og_site_name":"j&amp;s-soft","article_published_time":"2022-10-24T07:44:33+00:00","article_modified_time":"2025-11-05T09:44:54+00:00","og_image":[{"width":768,"height":768,"url":"https:\/\/www.js-soft.com\/wp-content\/uploads\/2022\/10\/cat-stablediff-bbox.png","type":"image\/png"}],"author":"Stanislaw H\u00fcll","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Stanislaw H\u00fcll","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.js-soft.com\/en\/diy-with-ai-face-recognition-pytorch\/#article","isPartOf":{"@id":"https:\/\/www.js-soft.com\/en\/diy-with-ai-face-recognition-pytorch\/"},"author":{"name":"Stanislaw H\u00fcll","@id":"https:\/\/www.js-soft.com\/en\/#\/schema\/person\/2b7ad4e39739cab4b86c0b5f8e560f52"},"headline":"DIY with AI: Build a face recognition for yourself with Pytorch","datePublished":"2022-10-24T07:44:33+00:00","dateModified":"2025-11-05T09:44:54+00:00","mainEntityOfPage":{"@id":"https:\/\/www.js-soft.com\/en\/diy-with-ai-face-recognition-pytorch\/"},"wordCount":461,"publisher":{"@id":"https:\/\/www.js-soft.com\/en\/#organization"},"image":{"@id":"https:\/\/www.js-soft.com\/en\/diy-with-ai-face-recognition-pytorch\/#primaryimage"},"thumbnailUrl":"https:\/\/www.js-soft.com\/wp-content\/uploads\/2022\/10\/cat-stablediff-bbox.png","articleSection":["Machine Learning \/ AI"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.js-soft.com\/en\/diy-with-ai-face-recognition-pytorch\/","url":"https:\/\/www.js-soft.com\/en\/diy-with-ai-face-recognition-pytorch\/","name":"DIY with AI: Build a face recognition for yourself with Pytorch - j&amp;s-soft","isPartOf":{"@id":"https:\/\/www.js-soft.com\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.js-soft.com\/en\/diy-with-ai-face-recognition-pytorch\/#primaryimage"},"image":{"@id":"https:\/\/www.js-soft.com\/en\/diy-with-ai-face-recognition-pytorch\/#primaryimage"},"thumbnailUrl":"https:\/\/www.js-soft.com\/wp-content\/uploads\/2022\/10\/cat-stablediff-bbox.png","datePublished":"2022-10-24T07:44:33+00:00","dateModified":"2025-11-05T09:44:54+00:00","description":"Hands-on experience with AI: Find out what really goes into building a face recognition application - even a simple one.","breadcrumb":{"@id":"https:\/\/www.js-soft.com\/en\/diy-with-ai-face-recognition-pytorch\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.js-soft.com\/en\/diy-with-ai-face-recognition-pytorch\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.js-soft.com\/en\/diy-with-ai-face-recognition-pytorch\/#primaryimage","url":"https:\/\/www.js-soft.com\/wp-content\/uploads\/2022\/10\/cat-stablediff-bbox.png","contentUrl":"https:\/\/www.js-soft.com\/wp-content\/uploads\/2022\/10\/cat-stablediff-bbox.png","width":768,"height":768,"caption":"Machine Learning"},{"@type":"BreadcrumbList","@id":"https:\/\/www.js-soft.com\/en\/diy-with-ai-face-recognition-pytorch\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Start","item":"https:\/\/www.js-soft.com\/en\/"},{"@type":"ListItem","position":2,"name":"DIY with AI: Build a face recognition for yourself with Pytorch"}]},{"@type":"WebSite","@id":"https:\/\/www.js-soft.com\/en\/#website","url":"https:\/\/www.js-soft.com\/en\/","name":"j&amp;s-soft","description":"IT-Unternehmensberatung f\u00fcr SAP","publisher":{"@id":"https:\/\/www.js-soft.com\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.js-soft.com\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.js-soft.com\/en\/#organization","name":"j&amp;s-soft","url":"https:\/\/www.js-soft.com\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.js-soft.com\/en\/#\/schema\/logo\/image\/","url":"https:\/\/www.js-soft.com\/wp-content\/uploads\/2022\/03\/Logo-js-soft.png","contentUrl":"https:\/\/www.js-soft.com\/wp-content\/uploads\/2022\/03\/Logo-js-soft.png","width":2560,"height":544,"caption":"j&amp;s-soft"},"image":{"@id":"https:\/\/www.js-soft.com\/en\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.js-soft.com\/en\/#\/schema\/person\/2b7ad4e39739cab4b86c0b5f8e560f52","name":"Stanislaw H\u00fcll","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.js-soft.com\/wp-content\/uploads\/2025\/11\/StanislawHuell-96x96.jpg","url":"https:\/\/www.js-soft.com\/wp-content\/uploads\/2025\/11\/StanislawHuell-96x96.jpg","contentUrl":"https:\/\/www.js-soft.com\/wp-content\/uploads\/2025\/11\/StanislawHuell-96x96.jpg","caption":"Stanislaw H\u00fcll"},"description":"As a hands-on autodidact by nature, Stanislaw's favorite activity is dissecting technologies and separating the wheat from the chaff as well as getting things done efficiently. Coming from a bare-metal background in embedded systems he fell in love with this new exciting world where backend development does not require a soldering iron."}]}},"_links":{"self":[{"href":"https:\/\/www.js-soft.com\/en\/wp-json\/wp\/v2\/posts\/4361","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.js-soft.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.js-soft.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.js-soft.com\/en\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.js-soft.com\/en\/wp-json\/wp\/v2\/comments?post=4361"}],"version-history":[{"count":1,"href":"https:\/\/www.js-soft.com\/en\/wp-json\/wp\/v2\/posts\/4361\/revisions"}],"predecessor-version":[{"id":13883,"href":"https:\/\/www.js-soft.com\/en\/wp-json\/wp\/v2\/posts\/4361\/revisions\/13883"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.js-soft.com\/en\/wp-json\/wp\/v2\/media\/4343"}],"wp:attachment":[{"href":"https:\/\/www.js-soft.com\/en\/wp-json\/wp\/v2\/media?parent=4361"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.js-soft.com\/en\/wp-json\/wp\/v2\/categories?post=4361"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.js-soft.com\/en\/wp-json\/wp\/v2\/tags?post=4361"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}