{"id":11510,"date":"2020-06-27T11:48:08","date_gmt":"2020-06-27T09:48:08","guid":{"rendered":"http:\/\/flaven.fr\/?p=11510"},"modified":"2021-01-24T06:27:21","modified_gmt":"2021-01-24T05:27:21","slug":"improve-a-cms-photos-library-qualification-with-ai-facial-recognition-in-python-to-provide-better-images-search-results-to-users","status":"publish","type":"post","link":"https:\/\/flaven.fr\/2020\/06\/improve-a-cms-photos-library-qualification-with-ai-facial-recognition-in-python-to-provide-better-images-search-results-to-users\/","title":{"rendered":"Improve a CMS&#8217;s photos library qualification with AI, facial recognition in python, to provide better images search results to users"},"content":{"rendered":"<p>My last post was a modest attempt in discovering Python potential with the help of Anaconda. Meanwhile, Artificial Intelligence (AI) was bewitched me \ud83d\ude42 So, I gained confidence using Python in order to explore AI librairies such as NTLK, OpenCV or face_recognition from ageitgey (Adam Geitgey).<\/p>\n<p><a href=\"https:\/\/github.com\/bflaven\/BlogArticlesExamples\/tree\/master\/python_playing_with_facial_recognition\" target=\"_blank\" rel=\"noopener noreferrer\">You can find the files in my github account More on https:\/\/github.com\/bflaven\/BlogArticlesExamples\/ in python_playing_with_facial_recognition<\/a><\/p>\n<p><b>This post is about a real issue that can be solved by IA. I believe that for any technical topic, rather than exploring AI documentation which in itself could be quite wastful. I always strive to tackle a real use case and apply as much as possible what I want to discover.<\/b><\/p>\n<p>So, applying this principle, I have spotted facial recognition for pictures. Like many, I am iOS mobile Phone user and I saw facial recognition at work. I start to wonder: &#8220;How can apply those facial recognition principles in a backoffice?&#8221;. As I am currently a PO for a Backoffice, I am supposed to have a clear &#8220;vision&#8221; of my product but more than that I know perfectly its weaknesses, especially dealing with pictures.<\/p>\n<p>The benefit of this simple question allows me not to stress about the details right away and instead quickly jot something down as a placeholder for a conversation between me, myself and I, a soliloquy. The intent was to not forget to ask all the right questions either upfront or somewhere down the road but do not prevent from starting a P.O.C.<\/p>\n<p>Here is my shortlist that highlights some of the functional and nonfunctional concerns or requirements that I wanted to address. This list has driven all my decisions to obtain a pragmatic result without missing the goal.<\/p>\n<p><b>Goal:<\/b> How can apply those facial recognition principles in a Backoffice  in order to improve image search results at the end?<\/p>\n<p><b>Short actions todolist:<\/b><\/p>\n<ol>\n<li>Browse unknown people images directory with Facial Recognition Script<\/li>\n<li>Detect known people faces among these images set them aside<\/li>\n<li>Insert these known people images in a MySQL database<\/li>\n<\/ol>\n<p><b>Requirement:<\/b> This Spike will be all made in Python but I do not want to end up with an overzealous shopping list of requirements.<\/p>\n<p>Let me explain the situation. In the Backoffice, which I am dealing with, is hosting thousand of &#8220;unqualified&#8221; images that contains faces of:  Donald Trump, Xi Jinping, Angela Merkel, Boris Johnson, Emmanuel Macron, Vladimir Poutine, Recep Tayyip Erdo\u011fan or less kwnown poeple in an european centric point of view: Macky Sall, Rodrigo Duterte, Ramzan Kadyrov, Hun Sen, Narendra Modi, Hassan Rohani, Stevo Pendarovski, Nicol\u00e1s Maduro, Edgar Lungu&#8230;<\/p>\n<p><b>Remember that we still need a human intelligence to say who is who? For your information, Stevo Pendarovski, \u0421\u0442\u0435\u0432\u043e \u041f\u0435\u043d\u0434\u0430\u0440\u043e\u0432\u0441\u043a\u0438, is president of North Macedonia, holding the office since 12 May 2019 and he looks a bit like me \ud83d\ude42 or that is just the glasses.<\/b><\/p>\n<p><b>The face of Stevo Pendarovski, \u0421\u0442\u0435\u0432\u043e \u041f\u0435\u043d\u0434\u0430\u0440\u043e\u0432\u0441\u043a\u0438, president of North Macedonia<\/b><br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/flaven.fr\/wp-content\/uploads\/2020\/06\/facial_recognition_stevo_pendarovski.jpeg\" alt=\"Improve a CMS's photos library qualification with AI, facial recognition in python, to provide better images search results to users\" width=\"585\" height=\"330\" \/><\/p>\n<p><b>The idea is to increase the relevance of research and reduce the sample of images that will be retrieved with a traditionnal textual search based on their name. It will save time, money and resources but also improve user experience. So, user do not get no results at all or improper results in his\/her image search.<\/b><\/p>\n<p>The fact, no one wants to qualify each image by opening them one after the other, adding correct caption to improve indexation and by consequence future&#8217;s search results. We are talking about more than 1 500 000 pictures. Indeed, the wise choice is to leave it to a computer. <\/p>\n<p>This is where the &#8220;US cavalry&#8221; comes to the rescue in the person of facial recognition library. This library will give you an easy way to detect known faces e.g. list of current state leaders, across all these images.<\/p>\n<p>The machine learning is here for that and there are tons of pre-trained models and ready to go libraries that you can use. With this magic wand, you properly scale up your skills and impress your friends or your mother. &#8220;Look mummy, I am a data scientist!&#8221;.<\/p>\n<p>As the facial recognition library will truly analyzed the images, it will prevent you to mix up images search with common namesake or word-sense disambiguation. For instance, you can make a difference between Michelle and Barack Obama or if you type Bush and you are looking for the 2 former US presidents, you won&#8217;t get australian bush&#8217;s pictures.<\/p>\n<p>At the end, as a collateral &#8220;damage&#8221;, when the requalification will be impleteted in the media database, you&#8217;ll be able to improve the UX by adding a filter named such as &#8220;Portrait&#8221; in source selection dropdown menu. Menu that already contains filters like Editorial, Broadcast, Press agency and let the user select source for his\/her images search.<\/p>\n<p><b>One last thing, on an historical point of view, what conclusion can we draw from this allegedly harmless experience?<\/b><\/p>\n<p>In the last century, robotization has replaced blue-collar workers in an automobile assembly line for instance. Let&#8217;s say ending mass employment in the  first industrial revolution industries. What about our nowadays industries? I guess that IA will certainly replace human intelligence e.g. white-collar workers for tedious and repetitive administrative works such as writing meeting minutes, sorting pictures, sorting documents, answering to questions&#8230;. and maybe even more creative works! <\/p>\n<p>As I speak to you, it is no more a dystopia! IA is creeping everywhere. Exception made in some companies where people are still working like in caveman age. In this case, the purpose here is to &#8220;buy social peace&#8221; by keeping obsolete jobs alive! Well, sooner or later, there will be an arbitration between some of your job&#8217;s tasks and their possible carry out by Artificial Intelligence (AI). Is there a name for this phenomenon? Anyway, you&#8217;ll be facing soon this &#8220;intelligentization&#8221; or &#8220;artificialization&#8221; of your job so you&#8217;d better be ready! I do not even mention the IA\u2019s usage especially facial recognition in surveillance and security that is already a standard!<\/p>\n<p><b>Never forget that modern capitalism loves creative destruction and see AI as a disrupting factor in many industries. This is such a growing question that there&#8217;s even a website called, &#8220;Will Robots Take My Job?&#8221;. The website&#8217;s name speaks for itself. You can look up a job title and see the its likelihood of AI-driven doom. <a href=\"https:\/\/willrobotstakemyjob.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/willrobotstakemyjob.com\/<\/a><\/b><\/p>\n<p>But, let&#8217;s come back to our user story, playing with facial recognition in a very inoffensive way !<\/p>\n<p>First, I need to have Anaconda install, see previous post for the installation instructions: <a href=\"https:\/\/flaven.fr\/2020\/05\/python-anaconda-worpress-json-json-schema-messy-post-with-few-practices-and-feedback-from-my-p-o-experience\/\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/flaven.fr\/2020\/05\/python-anaconda-worpress-json-json-schema-messy-post-with-few-practices-and-feedback-from-my-p-o-experience\/<\/a><\/p>\n<p><b>Here is a quick overview on the environment that I am using.<\/b><\/p>\n<p><b>if you do not want to read anymore, I made 2 videos to illustrate this post.<\/b><\/p>\n<ul>\n<li>Video #7 Part 1 &#8211; Mysql, Python, Facial Recognition, make a better images search results in a CMS: <a href=\"https:\/\/youtu.be\/fBrV-p93GB8\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/youtu.be\/fBrV-p93GB8<\/a><\/li>\n<li>Video #8 Part 2 &#8211; Mysql, Python, Facial Recognition, make a better images search results in a CMS: <a href=\"https:\/\/youtu.be\/g1B8kxQrhh0\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/youtu.be\/g1B8kxQrhh0<\/a><\/li>\n<\/ul>\n<h2>Installation and configuration for MySQL Community Server and Sequel Pro<\/h2>\n<p>Furthermore, for this use case, I will install and configure MySQL and Sequel Pro. I leveraging on a MySQL server installed on my mac.<\/p>\n<ul>\n<li>MySQL Community Server 8.0.20<br \/><a href=\"https:\/\/dev.mysql.com\/downloads\/mysql\/\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/dev.mysql.com\/downloads\/mysql\/<\/a><\/li>\n<li>Sequel Pro<br \/><a href=\"https:\/\/sequelpro.com\/download\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/sequelpro.com\/download<\/a><\/li>\n<\/ul>\n<p><b>Here are few useful instructions to handle MySQL in the console.<\/b><\/p>\n<p><b>1. Add MySQL to $PATH<\/b><\/p>\n<pre lang=\"bash\">\r\nsudo -s \r\nvi \/etc\/paths\r\nvi $HOME\/.bash_profile\r\nexport PATH=$PATH:\/usr\/local\/mysql\/bin\r\nsource $HOME\/.bash_profile\r\n<\/pre>\n<p><b>2. Using the MySQL shortcut in the console to connect to MySQL<\/b><\/p>\n<pre lang=\"bash\">\r\nmysql -u root -p\r\n# equivalent to \/usr\/local\/mysql\/bin\/mysql -u root -p \r\n<\/pre>\n<p><b>3. Instructions to connect MySQL to Sequel Pro<\/b><br \/>\nIt is to prevent a possible error with Sequel Pro and MySQL 8.0 on Mac.<\/p>\n<p>1. Open MySQL from System Preferences > Initialize Database ><br \/>\n2. Type your new password.<br \/>\n3. Choose &#8216;Use legacy password&#8217;<br \/>\n4. Start the Server again.<br \/>\n5. Now connect Sequel Pro<\/p>\n<p><b>For the step 5, you must have the credentials for Sequel Pro: root password for MySQL and the ip address of the MySQL server <i>127.0.0.1<\/i>.<\/b><\/p>\n<p><b>Source for common errors in installing MySQL 8.0 on a Mac<\/b> <\/p>\n<ul>\n<li>Error to load data from mysql check Need MySQL 8.0 support.<br \/><a href=\"https:\/\/github.com\/sequelpro\/sequelpro\/issues\/2699\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/github.com\/sequelpro\/sequelpro\/issues\/2699<\/a><\/li>\n<li>Check the BUILD HISTORY https:\/\/sequelpro.com\/test-builds.<br \/><a href=\"https:\/\/github.com\/sequelpro\/sequelpro\/issues\/2699#issuecomment-421767625\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/github.com\/sequelpro\/sequelpro\/issues\/2699#issuecomment-421767625<\/a><\/li>\n<\/ul>\n<p><b>Commands for MySQL console<\/b><br \/>\nHere are some commands for MySQL if you are in the console. I gave example with fictional database and tables. You can also use Sequel Pro if you want too.<\/p>\n<pre lang=\"sql\">\r\n--- # Show all databases\r\nSHOW DATABASES;\r\n\r\n--- # Create a database named test_db_1\r\nCREATE DATABASE test_db_1;\r\n\r\n--- # Delete a database named test_db_1\r\nDROP DATABASE test_db_1;\r\n\r\n--- # Create few databases\r\nCREATE DATABASE node_countries;   \r\nCREATE DATABASE node_countries_all;   \r\nCREATE DATABASE facial_recognition;   \r\n\r\n--- # Use databases\r\nUSE node_countries;\r\nUSE node_countries_all;\r\nUSE facial_recognition;\r\n\r\n\r\n--- # Insert DUMP in the databases\r\nSOURCE \/Users\/brunoflaven\/Documents\/02_copy\/_000_IA_bruno_light\/facial_recognition\/node_countries_dump_1.sql;\r\nSOURCE \/Users\/brunoflaven\/Documents\/02_copy\/_000_IA_bruno_light\/facial_recognition\/node_countries_dump_2.sql;\r\nSOURCE \/Users\/brunoflaven\/Documents\/02_copy\/_000_IA_bruno_light\/facial_recognition\/photos_known_person_dump_1.sql;\r\n\r\n\r\n\r\n\r\n\r\n\r\n--- #INSERT command for databases\r\nINSERT INTO node_countries VALUES (NULL, 'Belgium', '.be', 'BE', 'Brussels', '32');\r\nINSERT INTO node_countries VALUES (NULL, 'Czechia', '.cz', 'CZ', 'Pragues', '420');\r\nINSERT INTO node_countries VALUES (NULL, 'Virgin Islands (British)', '.vg', 'VG', 'Road Town', '1-284');\r\nINSERT INTO node_countries VALUES (NULL, 'Virgin Islands (USA)', '.vi', 'VI', 'Charlotte Amalie', '1-340');\r\nINSERT INTO node_countries VALUES (NULL, 'Wallis and Futuna Islands', '.wf', 'WF', 'Mata-Utu', '681');\r\nINSERT INTO node_countries VALUES (NULL, 'Western Sahara', '.eh', 'EH', 'El Aaiun', '');\r\nINSERT INTO node_countries VALUES (NULL, 'Yemen', '.ye', 'YE', 'San'a', '967');\r\nINSERT INTO node_countries VALUES (NULL, 'Zambia', '.zm', 'ZM', 'Lusaka', '260');\r\nINSERT INTO node_countries VALUES (NULL, 'Zimbabwe', '.zw', 'ZW', 'Harare', '263');\r\n\r\nINSERT INTO node_countries VALUES (NULL, 'Tunisia', '.tn', 'TN', 'Tunis', '216');\r\n\r\n--- Source for Countries : https:\/\/www.science.co.il\/international\/Country-codes.php\r\n\r\n--- #SELECT records\r\nSELECT COUNT(*) FROM node_countries;\r\nSELECT * FROM node_countries WHERE name LIKE '%Ger%';\r\nSELECT * FROM node_countries;\r\nSELECT COUNT(*) FROM node_countries;\r\n\r\n--- # EMPTY\r\nTRUNCATE node_countries;\r\n\r\n--- # UPDATE\r\nUPDATE node_countries SET capital = 'Prague' WHERE id = 13;\r\n<\/pre>\n<h2>Installation and configuration for MySQL Python<\/h2>\n<p>There are different ways to install MySQL-python. One is using Pip, the other is using Anaconda.<\/p>\n<p><b>1. To check your anancoda version in the console.<\/b><\/p>\n<pre lang=\"bash\">\r\n$ conda --version\r\n<\/pre>\n<p><b>2. If needed upgrade pip<\/b><\/p>\n<pre lang=\"bash\">\r\n$ pip install --upgrade pip\r\n<\/pre>\n<p><b>3. To install the mysql-connector-python package, type the following command.<\/b><\/p>\n<pre lang=\"bash\">\r\n$ pip install mysql-connector-python # way_1\r\n$ conda install mysql-connector-python # way_2\r\n<\/pre>\n<p><b>4. To install the pymysql package, type the following command.<\/b><\/p>\n<pre lang=\"bash\">\r\n$ pip install pymysql # way_1\r\n$ conda install pymysql # way_2\r\n<\/pre>\n<p><b>5. Let&#8217;s install facial recognition in order to sort pictures. I tried with Homebrew but it did not work for me so I decided to go with Pip. Here is the other way to install face_recognition with PIP.<\/b><\/p>\n<pre lang=\"bash\">\r\nsudo -s\r\n$ pip install --upgrade pip\r\n$ pip install cmake\r\n$ pip install dlib\r\n$ pip install face_recognition\r\n$ pip install opencv-python\r\n<\/pre>\n<p><b>6. It is good to verify the installation of face_recognition with PIP and some other stuff by doing so.<\/b><\/p>\n<pre lang=\"bash\">\r\n# Verify face_recognition install\r\n# go into the console and call python\r\n$ python\r\n\r\n# The output shoud be the following\r\n# Python 2.7.14 |Anaconda, Inc.| (default, Oct  5 2017, 02:28:52) [GCC 4.2.1 Compatible Clang 4.0.1 (tags\/RELEASE_401\/final)] on darwin Type \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n<\/pre>\n<p><b>7. You can call the librariries and if get no errors, you are good to go.<\/b><\/p>\n<pre lang=\"python\">\r\n>>> import dlib\r\n>>> import face_recognition\r\n>>> import cv2\r\n>>> exit ()\r\n<\/pre>\n<h2>Let&#8217;s face the problem&#8230;<\/h2>\n<p><b>I will probably do a video to see how to manipulate the files. Like always, the most difficult part of the facial recognition is to have installed the correct environment. The rest is easy as 1,2,3. The idea to inject in a MySQL database is to easily retrieve the results and also if you needed to extend the database to insert a set of credits, legends, captions&#8230; and so on. Then, you can just identify differences and produce some helpful statistics and so finally update the real media databases with correct elements to improve textual search.<\/b><\/p>\n<p>You can browse files from my GitHub account, the scripts and filenames are self-explanatory.<\/p>\n<pre lang=\"bash\">\r\n# get to the dir where you will execute the script\r\n\r\ncd \/path-to-your-dir\/python_face_recognition_mysql\/\r\n\r\n<\/pre>\n<pre lang=\"bash\">\r\n\u251c\u2500\u2500 001_find_faces_in_picture.py\r\n\u251c\u2500\u2500 002_find_faces_in_picture.py\r\n\u251c\u2500\u2500 003_find_extract_faces_in_picture.py\r\n\u251c\u2500\u2500 004_find_faces_in_batches_video.py\r\n\u251c\u2500\u2500 005_match_face_in_picture.py\r\n\u251c\u2500\u2500 006_match_face_in_picture.py\r\n\u251c\u2500\u2500 007_match_face_in_picture.py\r\n\u251c\u2500\u2500 008_match_face_in_picture.py\r\n\u251c\u2500\u2500 009_match_face_in_picture.py\r\n\u251c\u2500\u2500 010_match_face_in_picture_pull_faces.py\r\n\u251c\u2500\u2500 011_identify_multiple_faces_in_pictire.py\r\n\u251c\u2500\u2500 012_browse_dir_recognize_faces_insert_mysql.py\r\n\u251c\u2500\u2500 README.md\r\n\u2514\u2500\u2500 images\r\n    \u251c\u2500\u2500 known\r\n    \u2502   \u251c\u2500\u2500 macron_cocorico_gettyimages_1048128128.jpg\r\n    \u2502   \u251c\u2500\u2500 ...\r\n    \u2514\u2500\u2500 unknown\r\n        \u251c\u2500\u2500 group_one_17_persons_16_faces.jpg\r\n        \u251c\u2500\u2500 ....\r\n<\/pre>\n<h2>Read more<\/h2>\n<ul>\n<h3>Facial Recognition in Python<\/h3>\n<li>Face Recognition by ageitgey, The world&#8217;s simplest facial recognition api for Python and the command line<br \/><a href=\"https:\/\/github.com\/ageitgey\/face_recognition\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/github.com\/ageitgey\/face_recognition<\/a><\/li>\n<li>Python | Multiple Face Recognition using dlib<br \/><a href=\"https:\/\/www.geeksforgeeks.org\/python-multiple-face-recognition-using-dlib\/\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/www.geeksforgeeks.org\/python-multiple-face-recognition-using-dlib\/<\/a><\/li>\n<li>Python Face Recognition Tutorial<br \/><a href=\"https:\/\/www.youtube.com\/watch?v=QSTnwsZj2yc\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/www.youtube.com\/watch?v=QSTnwsZj2yc<\/a><\/li>\n<li>Brad Traversy Github<br \/><a href=\"https:\/\/github.com\/bradtraversy\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/github.com\/bradtraversy<\/a><\/li>\n<li>WEB DEVELOPMENT TUTORIALS &#038; COURSES from traversymedia.com<br \/><a href=\"https:\/\/www.traversymedia.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/www.traversymedia.com\/<\/a><\/li>\n<li>LEARN OPENCV in 3 HOURS with Python | Including 3x Example Projects (2020)<br \/><a href=\"https:\/\/www.youtube.com\/watch?v=WQeoO7MI0Bs\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/www.youtube.com\/watch?v=WQeoO7MI0Bs<\/a><\/li>\n<li>Getting Started with Face Recognition in Python<br \/><a href=\"https:\/\/www.youtube.com\/watch?v=IWoigw6-crg\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/www.youtube.com\/watch?v=IWoigw6-crg<\/a><\/li>\n<li>faceoff: Quick and dirty image sorter by faces.<br \/><a href=\"https:\/\/github.com\/greatwhitehat\/faceoff\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/github.com\/greatwhitehat\/faceoff<\/a><\/li>\n<li>A Simple Introduction to Facial Recognition (with Python codes)<br \/><a href=\"https:\/\/www.analyticsvidhya.com\/blog\/2018\/08\/a-simple-introduction-to-facial-recognition-with-python-codes\/\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/www.analyticsvidhya.com\/blog\/2018\/08\/a-simple-introduction-to-facial-recognition-with-python-codes\/<\/a><\/li>\n<li>Enable Face Detection Using Python and the Anaconda Platform<br \/><a href=\"https:\/\/maker.pro\/custom\/projects\/enable-face-detection-using-python-and-the-anaconda-platform\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/maker.pro\/custom\/projects\/enable-face-detection-using-python-and-the-anaconda-platform<\/a><\/li>\n<li>How to install and use the python face recognition and detection library in Ubuntu 16.04<br \/><a href=\"https:\/\/ourcodeworld.com\/articles\/read\/841\/how-to-install-and-use-the-python-face-recognition-and-detection-library-in-ubuntu-16-04\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/ourcodeworld.com\/articles\/read\/841\/how-to-install-and-use-the-python-face-recognition-and-detection-library-in-ubuntu-16-04<\/a><\/li>\n<li>A Beginners guide to Building your own Face Recognition System to creep out your Friends<br \/><a href=\"https:\/\/towardsdatascience.com\/a-beginners-guide-to-building-your-own-face-recognition-system-to-creep-out-your-friends-df3f4c471d55\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/towardsdatascience.com\/a-beginners-guide-to-building-your-own-face-recognition-system-to-creep-out-your-friends-df3f4c471d55<\/a><\/li>\n<li>Building Fast Facial Recognition for Videos and Images<br \/><a href=\"https:\/\/towardsdatascience.com\/building-fast-facial-recognition-for-videos-and-images-7b9f3e7c240c\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/towardsdatascience.com\/building-fast-facial-recognition-for-videos-and-images-7b9f3e7c240c<\/a><\/li>\n<li>Step by Step Facial Recognition in Python<br \/><a href=\"https:\/\/medium.com\/better-programming\/step-by-step-face-recognition-in-images-ad0ad302058a\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/medium.com\/better-programming\/step-by-step-face-recognition-in-images-ad0ad302058a<\/a><\/li>\n<li>Going through 10,000 pictures in 30 seconds. I love the Konstantinos Mavrodis aproach.<br \/><a href=\"https:\/\/dev.to\/kmavrodis\/going-through-10000-pictures-in-30-seconds-ad8\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/dev.to\/kmavrodis\/going-through-10000-pictures-in-30-seconds-ad8<\/a><\/li>\n<li>Install dlib (the easy, complete guide)<br \/><a href=\"https:\/\/www.pyimagesearch.com\/2018\/01\/22\/install-dlib-easy-complete-guide\/\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/www.pyimagesearch.com\/2018\/01\/22\/install-dlib-easy-complete-guide\/<\/a><\/li>\n<li>stackoverflow, unable to install face_recognition library for python<br \/><a href=\"https:\/\/stackoverflow.com\/questions\/48156814\/unable-to-install-face-recognition-library-for-python\/48198948\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/stackoverflow.com\/questions\/48156814\/unable-to-install-face-recognition-library-for-python\/48198948<\/a><\/li>\n<li>readthedocs.io, Welcome to Face Recognition\u2019s documentation!<br \/><a href=\"https:\/\/face-recognition.readthedocs.io\/en\/latest\/usage.html\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/face-recognition.readthedocs.io\/en\/latest\/usage.html<\/a><\/li>\n<li>Face recognition with OpenCV, Python, and deep learning<br \/><a href=\"https:\/\/www.pyimagesearch.com\/2018\/06\/18\/face-recognition-with-opencv-python-and-deep-learning\/\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/www.pyimagesearch.com\/2018\/06\/18\/face-recognition-with-opencv-python-and-deep-learning\/<\/a><\/li>\n<p><\/p>\n<h3>Browse directory files in Python<\/h3>\n<li>stackoverflow, Importing images from a directory (Python)<br \/><a href=\"https:\/\/stackoverflow.com\/questions\/26392336\/importing-images-from-a-directory-python\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/stackoverflow.com\/questions\/26392336\/importing-images-from-a-directory-python<\/a><\/li>\n<li>Read Multiple images from a folder using python cv2<br \/><a href=\"https:\/\/ersanpreet.wordpress.com\/2018\/08\/15\/read-multiple-images-from-a-folder-using-python-cv2\/\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/ersanpreet.wordpress.com\/2018\/08\/15\/read-multiple-images-from-a-folder-using-python-cv2\/<\/a><\/li>\n<li>Basic Operations: Read and Display Images in Python<br \/><a href=\"https:\/\/www.hdm-stuttgart.de\/~maucher\/Python\/ComputerVision\/html\/basicOperations.html\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/www.hdm-stuttgart.de\/~maucher\/Python\/ComputerVision\/html\/basicOperations.html<\/a><\/li>\n<li>Python List Files in a Directory: Step-By-Step Guide<br \/><a href=\"https:\/\/careerkarma.com\/blog\/python-list-files-in-directory\/\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/careerkarma.com\/blog\/python-list-files-in-directory\/<\/a><\/li>\n<p><\/p>\n<h3>MySQL and Python<\/h3>\n<li>Getting Started with MySQL in Python<br \/><a href=\"https:\/\/www.datacamp.com\/community\/tutorials\/mysql-python#IMySQL\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/www.datacamp.com\/community\/tutorials\/mysql-python#IMySQL<\/a><\/li>\n<li>w3schools, Python MySQL Insert Into Table<br \/><a href=\"https:\/\/www.w3schools.com\/python\/python_mysql_insert.asp\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/www.w3schools.com\/python\/python_mysql_insert.asp<\/a><\/li>\n<p><\/p>\n<h3>Other<\/h3>\n<li>List of current heads of state and government<br \/><a href=\"https:\/\/en.wikipedia.org\/wiki\/List_of_current_heads_of_state_and_government\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/en.wikipedia.org\/wiki\/List_of_current_heads_of_state_and_government<\/a><\/li>\n<li>Mac OS X: Set \/ Change $PATH Variable<br \/><a href=\"https:\/\/www.cyberciti.biz\/faq\/appleosx-bash-unix-change-set-path-environment-variable\/\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/www.cyberciti.biz\/faq\/appleosx-bash-unix-change-set-path-environment-variable\/<\/a><\/li>\n<li>The Matter Of AI Takeover: Will Artificial Intelligence Replace Human Beings?<br \/><a href=\"https:\/\/towardsdatascience.com\/the-matter-of-ai-takeover-will-artificial-intelligence-replace-human-beings-79d2c788f358\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/towardsdatascience.com\/the-matter-of-ai-takeover-will-artificial-intelligence-replace-human-beings-79d2c788f358<\/a><\/li>\n<li>AI takeover<br \/><a href=\"https:\/\/en.wikipedia.org\/wiki\/AI_takeover\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/en.wikipedia.org\/wiki\/AI_takeover<\/a><\/li>\n<li>10 Jobs Artificial Intelligence Will Replace (and 10 That Are Safe)<br \/><a href=\"https:\/\/blog.hubspot.com\/marketing\/jobs-artificial-intelligence-will-replace\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/blog.hubspot.com\/marketing\/jobs-artificial-intelligence-will-replace<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>My last post was a modest attempt in discovering Python potential with the help of Anaconda. Meanwhile, Artificial Intelligence (AI) was bewitched me \ud83d\ude42 So,&hellip; <\/p>\n<p class=\"text-center\"><a href=\"https:\/\/flaven.fr\/2020\/06\/improve-a-cms-photos-library-qualification-with-ai-facial-recognition-in-python-to-provide-better-images-search-results-to-users\/\" class=\"more-link\">Continue reading &rarr; <span class=\"screen-reader-text\">Improve a CMS&#8217;s photos library qualification with AI, facial recognition in python, to provide better images search results to users<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":11512,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"bf_ai_meta_description":"Improve CMS photo library with AI facial recognition in Python. Enhance image search results for users using tools like NTLK, OpenCV.","bf_ai_og_title":"AI Facial Recognition in Python","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[3438,3437,3444,3447,3449],"tags":[2547,2549,2532,2221,2535,2542,2546,2551,2550,2540,2544,2539,2536,2531,154,2467,803,2548,2316,2538,2537,2545,2223],"class_list":["post-11510","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai-machine-learning","category-business-case-studies","category-programming-databases","category-technology-trends","category-tutorials-how-to","tag-ai","tag-ai-takeover","tag-anaconda","tag-cms","tag-computer-vision","tag-deep-learning","tag-facial-recognition","tag-government","tag-heads-of-state","tag-ia","tag-image-classification","tag-ntlk","tag-object-detection","tag-p-o","tag-photos","tag-pictures","tag-portraits","tag-president","tag-python","tag-tensorflow-keras","tag-theano","tag-video-classification","tag-wordpress"],"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p3Vuhl-2ZE","jetpack_featured_media_url":"https:\/\/flaven.fr\/wp-content\/uploads\/2020\/06\/playing_facial_recognition_b.jpg","_links":{"self":[{"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/posts\/11510","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/comments?post=11510"}],"version-history":[{"count":23,"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/posts\/11510\/revisions"}],"predecessor-version":[{"id":11650,"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/posts\/11510\/revisions\/11650"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/media\/11512"}],"wp:attachment":[{"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/media?parent=11510"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/categories?post=11510"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/tags?post=11510"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}