Machine Learning

Artificial intelligence covers everything related to making machines smart or intelligent. Whether it’s a robot, a refrigerator, a car, or a software application, if you are making them intelligent, then it’s AI.

Machine Learning is commonly used alongside AI but they are not the same thing.  ML refers to systems that can learn by themselves, that get smarter and smarter over time without human intervention.

ML is a subset of AI.

Using machine learning, one can make classifiers like an animal classifier, which can identify animals by analyzing their image:

Animal Classifier

In this lesson, we will learn how ML works in detail.

Topic Covered in the Lesson

  1. Machine learning
  2. Teachable machines
  3. Training data & ML models
  4. ML in PictoBlox

Key Learning Outcomes

At the end of  the lesson, you will be able to:

  1. Understand how machine learning similar is to human learning.
  2. Understand how does machine learning cycle work.
  3. Make ML models using images in Teachable Machine.
  4. Use ML models in PictoBlox to make ML projects.
  5. Make an ML model that classifies an image as a cat or a dog.
    Cat vs Dog

Let’s begin!

Human Learning Process

Human Learning Cycle

Humans learn through a four-step process:

  1. Sense environment: We first take information about the objects available in our environment through our five senses:
    1. Vision
    2. Touch
    3. Smell
    4. Taste
    5. Sound
  2. Analyze information: The next step is to analyze the information gathered from our senses and using our previous knowledge, identity the objects e.g. a dog, a house, etc.
  3. Decide & act: In this step, using the knowledge and information about the object, we decide what we want to do. E.g., if it is a cat we want to play with it, but if it is a tiger, we run!
  4. Increase knowledge: Humans learn from the output of the last step. E.g., if you decide to play with the cat, but the cat scratched you, then you would register the particular cat as not friendly and increase your knowledge. 

The process is an evergoing process that ultimately results in increased knowledge about the understanding of environment.

Using this process, you learn everything walking, reading, speaking, classifying things, etc. 

How Machines Learn

Machine Learning Process

Let us explore the process of making a machine learning model to identify cat and dog from images:

Step 1: Define Project/Objective
  1. Specify the problem – Classification of image as a dog or a cat.
  2. Define unit of analysis or prediction target.
  3. Define the type of model: Image, sound or pose? In our case it will be image.
Step 2: Explore and Acquire Training Data

The training data is an initial set of data used to help a machine develop algorithm.

To identify cats and dogs we would require lots of images of cats and dogs as the training data.

Cats: 


Dogs:

Step 3: Model Training

This stage is concerned with creating a model from the data given to it. At this stage, a part of the training data is used to find model algorithm which helps to minimise the error for the given data. The remaining data are then used to test the model.

These two steps are generally repeated a number of times in order to improve the performance of the model.

In our case we make the model to identify image in two category:

  1. Cats
  2. Dogs
Step 4: Deploy the Model

Now you are ready to use the model to identify a new image as cat and dog.

Cat vs Dog: Training Data for ML

Cat vs Dog: Training the Model

Cat vs Dog: Image Classifier in PictoBlox

Application of Machine Learning

Machine Learning is used in many fields. Here are a few applications made in PictoBlox using Image Machine Learning models:

  1. Object/Animal Classifier: In the lesson on computer vision, you learned about how to identify different objects from images. Well somewhere in the process, machine learning is used to classify the objects into different categories. E.g., We made an animal classifier that identifies the animal as one of the 10 animals. This is an extension of our Dog vs Cat Classifier.
    Animal Classifier
  2. Identifying Shapes: Machines can be trained to identify the different shapes like square, circle, and triangle.
    Shape Recognition
  3. Surveillance: Machine learning can be used in surveillance as well e.g. to identify whether someone has worn a mask or not.
    ML Mask Girl
  4. Healthcare: Machine learning can also be used in healthcare e.g. identifying whether a patient has pneumonia or not using X-Ray. 
  5. Games: Machine learning can also be used in games to train the computer to identify user input through images as in this Rock, Paper, and Scissor game:
    Rock Paper Scissor

Next Session

Session 7

Ethics in AI

Download PictoBlox – Coding and AI Project Making App

Incase of any difficulty with PictoBlox, please feel free to write us at support@thestempedia.com

Copyright 2021 – Delhi Government All rights reserved | Managed by Valeur Fabtex Private Limited | Technology Partner – STEMpedia