Welcome to the Norwegian Blue Parrot project. It is a series of websites for demystifying AI and Deep-Learning through jovial, in-depth descriptions, fun interactive, and a touch of geekiness.
Welcome to the first "Norwegian Blue Parrot" project website. For each AI project, I write the code and show you how it works. You can test it using a mobile phone, tablet, and laptop. Furthermore, you can see for yourself the effectiveness and the shortcoming of each AI model.
I have developed dozens of AI projects, and with each AI model, I learn a bit more insights into the world of Artificial Intelligence.
The audience or point of view (POV) for demystifying AI is primary for AI enthusiasts and friends with a curious mind. However, I am a full-stack programmer, a solution architect, and an AI scientist, and therefore, I will not shy away from the math and the coding, but I will remain steadfast to the primary POV.
Before digging into the technicalities, we will have fun test-driving the AI model. After we have a firm grasp on "what" we are trying to demystify, we will travel a full journey from coding to gathering the data. We will take a break to understand the particular data biases , both the conscious biases and the unforeseen consequences. We will reach the journey conclusion at the use-cases, i.e., what is the purpose of this AI project, and what other possibilities could this AI model can be used either ethically or feloniously.
So if you are ready, let's take a collective calming breath … … and begin.
-- LaVar Burton Reads (paraphrase)
The "k2fa" AI project is for kids to learn about farm animals. Think of "k2fa" as kids wandering through a farm and naming the animal that they see.
More concisely, "k2fa" is Deep Learning Convolutional Neural Network (CNN) image classification model.
Before charging ahead with an in-depth explanation, let's test the "k2fa" kids. Show the "k2fa" kids a picture, and they will identify it. Scroll down to the "Prediction section" and have fun.
Hello, from "k2fa" kids. Since "k2fa" kids are not robots, you are selected to be the avatar , i.e., the hands and feet of the "k2fa" kids.
Imagine yourself as a "k2fa" kid, walking around the farm, taking photos , or uploading them using iPhone, Android phone, tablet, or laptop. This website is mobile-friendly.
Take a picture or upload an image of a dog, a chicken, a cow, a wolf, your face, your friend, or even an armadillo. The "k2fa" kids will immediately identify which of the thirteen farm animals is the closest match to the image, including the confidence level. Furthermore, the "k2fa" kids will show the top three inferences.
One should run the test many times. It will give a clear understanding of what is possible and what is not.
There are copious statistics that accompany each inference. The in-depth explanation for the statistics, data, insights, biases, and limitations will be in the next section, but for now, enjoy being a "k2fa" avatar.
*Please note that when the Google App Python engine is in "Idle" mode, it will take an extra 25 seconds to load up. It will display "Active" when ready, and it happens only once. The engine will go back to "idle" mode if no API request for in the last 15 minutes. It is a scaling feature to save money when no one is accessing the API server.
Cat 80.2%
Other 19.8%
Cat 80% Cat 80% Cat 80%
Other 19.8%
Legends:
The "Model version" shows that the AI model dependents and its software version. The "Model" section will give a full explanation.
The "Trained" describes the "k2fa" training statistics. The "Model" and the "Data" section will explain it further.
The "Raw inferences" is raw data response from the API. It contains the thirteen possible farm animals and the associate level of confidence.
The Deep Learning convolutional neural network (CNN) model is like the donut of the AI discipline. It's easy. It's sweet, and it is the go-to solution for image classifier problems.
The following is not a step by step instruction, but it covers the essential notes for an AI scientist to replicate the model independently.
Occasionally, the AI discipline uses specialized terminologies that impede the understanding of simple concepts. It is a bad practice because it encourages the memorization of vocabulary rather than original thinking. In other words,
A rose by any other name would smell as sweet
-- William Shakespeare
"AI" and "Deep Learning" are the two terminologies that worth more in-depth explanations.
Artificial Intelligence (AI) has no formal, concise, or verifiable universal accepted definition. The popular interpretation is "a machine or a program that mimics cognitive functions and algorithms."
From Ada Lovelace's programs for Charles Babbage's Analytical Engine in the 19th century to the 1949 IBM-701 Checker program by Arthur Samuel to Apple's Siri, they can all be classified as AI.
The fuzziness is the level of complexity in the algorithms, i.e., how complex does the algorithm has to be for it to be considering as an intelligent machine? Is human the only intelligent creature on earth? Does everyone on the planet have the same innate intelligence?
Furthermore, in movies, books, and social media, there is an overlap between "consciousness" and "intelligence." Being conscious does not imply being intelligent, and having intelligence does not mean having consciousness.
For example, a dog has awareness but can't do the math , and the Apple' Siri program can do trillions of calculation per second but can't feel happiness .
To demystify AI, from this point onward, any machine algorithm that has more than one trillion calculations will be anointed as "Artificial Intelligent."
"K2fa" model has an estimate of 2.7e-14 calculations per fit-cycle, and therefore, "k2fa" is an AI.
"Deep Learning" is a sub-field of the AI discipline. It's loosely model after the inner working of the brain neurons, and hence the innovative name "convolutional neural network" (CNN). It based on the "universal approximation" theorem (UAT).
The awe-inspiring truth is that this one theorem can tell the difference between a cat and a dog, skin cancer cells from healthy cells, classifying dozens of objects in a picture, identify tweets sentiment, recommend movies, predict sales, and thousands other related tasks in four classifications. They are image classifier, image segmentation, natural language processing (NLP), and prediction using tabular data.
The "awe" in the awe-inspiring is that the UAT does not need to understand the causality. In other words, the UAT does not use rules-based logic, such as a cat does not have feathers or a cow has four legs.
"K2fa" model is built on the fantastic "fast.ai" library by Jeremy Howard, Rachel Thomas, and Sylvain Gugger. The goal is for an AI scientist to have essential information to replicate the "k2fa" model independently. The salient point is that it is just math and coding, no magic. The recipe of the "k2fa" Deep Learning convolutional neural network image classifier is as follows.
1. Collect data
Collect
2. Clean data
Clean
3. Calculate the Data-Bunch mini-batch size
Mini-batch & SGD
4. Create the Data-Bunch
Data-bunch
5. Find the fit-rate
Fit Rate
6. Use the default hyper-parameters
Hyper-P.
7. Select the base architecture
Reset-34
8. Train for six epoch
95.5556%
9. Unfreeze the model
Unfreeze
10. Find the new fit-rate
Fit Rate
11. Train for six more epoch
96.7949%
12. Verify the loss and confuse matrix
Loss & Confuse
Loss & Confuse
Loss & Confuse
13. Deployment
Deployment
For a deep learning project, the accuracy and the perceived usefulness of the AI model is due in large part from the size of data, the accuracy of labeling, and the biases both intentionally and adventitiously.
"K2fa" uses the following checklist . The steps for training "k2fa" is comparable to other image classifier models, and therefore, the list is suitable for most AI projects, such as:
Common Sense
Time
Experts
94% Accu. & 0.5 sec.
Valid
Valid
Valid
Invalid
Valid & Train
Test
False Positive
Generalization
Generalization
Generalization
Revisit
Biases exist in all data, even data from Kaggle's competitions. The reason is that people are different from nationality, religion, economic level to education. One group will say the data is fair, while other groups say the data is bias.
The goal is not to achieve data without biases, but data with the intentional biases listed in a "readme" document accompany the data.
"K2fa" is an anodyne subject. The resulting AI model and the app will not provoke a strong adverse reaction, but the data contain intentional biases. The domain experts and the business analysts are the best people in the project to list the intentional biases.
Even data is given in a competition. It is always a fun mental exercise to spot the biases in the data.
If this journey is about "identify between Sunni and Shiite Muslims" AI project, then understand biases are vital to the success of the project. However, the process of understanding the biases is the same. The "k2fa" intentional biases are as follow.
Intentional Biases
Intentional Biases
Intentional Biases
After user-testing, the adventitious biases emerge with fascinating discoveries. As before, if this journey is about "identify potential criminals in a shopping mall, i.e., before committing the criminal act," then the unforeseen consequences in the biases would be catastrophic. Never the less, the process is the same. The "k2fa" adventitious biases are as follows.
False Positive
False Positive
False Positive
Uncertain (Negative)
Uncertain (Negative)
"Use case" is a consulting terminology for "what are the steps leading to the desired outcome from the user's point of view." For "k2fa," the first "happy path," use-case is as follows.
Scavenger Hunt
The second "k2fa" use-case is as follows.
Picture Charades
The use-case's error condition and recovery are for analysts and the QA team to ponder, such as false-positive or cheating, by taking pictures of the online image. As said before, "K2fa" is an anodyne subject, and therefore, there is no known unintentional consequence.
If "k2fa" is in a science fiction story, then "k2fa" could be an army of robots roaming the farm protecting livestock and killing foxes, bears, and coyotes but not tigers. It is because tigers are identifying as "false-positive horses."
The End
The "k2fa" project is a fun journey. I choose it as the first in the series because I have full control, and I can expose each step in the process. It is the same procedure for a momentous AI project, such as "identify people that likely to vote Republicans or Democrats."
More often than not, I have less control over the data, the biases, and the objectives, such as in AI competitions or work projects.
In the second project, we will walk through the same procedure, and I will point out where I have no control. If I could use one of the work projects, you would laugh-out-loud on the preposterous requirements.
The most common one is, "I know that you don't have access to the data or even a data sample, but I want 100% accuracy." My second least favorite is "you must adhere to the team agile methodology in building the AI model and showing it having increase accuracy every two weeks."
On the other side of absurdity, I have been on projects where we discuss AI as a mythical unicorn. The PowerPoint shows in-depth complexity and magical consciousness. If I could do massive matrix multiplication on PowerPoint, then the project is halfway done.
As evidence in the "k2fa" journey, AI is not magically or challenging to build. You do need deep computer science and math knowledge, and it is not from two months of programming boot-camp. Still, it is also true that the data, the biases, the objectives, and the use-cases shape the perceived usefulness of the AI model.
Similar to the social media platforms and mobile app revolutions, we can choose to create AI ethnically or feloniously. However, unlike social transformations, where one can opt-out, AI is shaping the world economy and effecting individual daily life.
For example, "Mr. Jones' insurance will not pay for his recent car accidence." In the USA, it is most likely that an AI renders the decision. Mr. Jones can't opt-out, or he doesn't even know because the human insurance agent did not tell him.
AI systems are powering the world economy, and some are visible like Apple's Siri, but most are not. The salient point is that AI is here, and you can't opt-out.
Duc Haba
Thank you for visiting my project, the "Norwegian Blue Parrot -- K2fa AI model." We are taking the first few steps into the brave new world of AI. The machine consciousness is in the far future and may never come to pass, but AI is transforming our lives in a meaningful way.
From high-tech to manual labor, AI is steadfastly enhancing human intelligence and replacing human workaday tasks and jobs.
I hope you are enjoying the "k2fa" journey, learning something new, and expanding your imaginations. I am looking forward to our next adventure in the "Norwegian Blue Parrot" web series.
You can contact me on my LinkedIn profile.