Skip to main content
Skip to main content

Can AI guess
your emotion?

Integrating Digital

Years F-2; 3-4

DT+ Health and Physical Education

Discuss emotions as a class, and introduce the idea of artificial intelligence (AI). This lesson can also be used to introduce image classification – a key application of AI.

Developed in collaboration with Digital Technologies Institute.

Tool used in the plugged part of the activity: Teachable machine

Decorative image

Image credit: teguhjati pras/ pixabay

Preliminary notes

Tool used in the plugged part of the activity: Teachable machine. Please note: Teachable machine requires Google Chrome on Windows or Macintosh (tablets are not supported) and a webcam.

Image 1: Application screenshot

The image above shows the view in the Teachable machine AI application. On the left, a person expresses an emotion. On the right, the emotion is shown in the form of emojis. The middle shows how the AI is trying to recognise the person’s emotion. The colour representation is as follows in this example:

  • green = happy
  • purple = sad
  • red = angry

Privacy and personal information: Students capture images of themselves in this task. To ensure these student images are not stored on external servers just close the program when completed and do not save the project. If you close your tab, nothing is saved in your browser or on any servers.

An updated Teachable machine is now available.

This version works in a similar way to the original version with some interface changes, but also enables the user to upload an existing project and incorporate models in other projects. Access the FAQs to ensure student personal information is protected. View the Saving & Exporting section of the application and read them carefully.

For this project: Select 'Get started' then 'Image project'. If students are uploading images of themselves it is advisable not to save the project; in that way no images are stored on a server or in the browser.

Suggested steps

Unplugged activity

  1. Use a suitable hook to discuss emotions. Why is it important that we recognise someone’s emotions?

    Write or draw some emotions on cards, one emotion per card. Give a student a card to act out. Then ask the class to guess the emotion. Alternatively, show character images from a picture book, and have students guess the emotions.

    Ask the class: What tells us that a person is happy, sad, angry or surprised? What is a neutral expression?

  2. As a class, create a table of information to look for patterns in the data.

    Example table (yours may be different)

  3. Compare your descriptions of features to emojis or emoticons. How do your descriptions compare? What features are used to convey each emotion?

    This activity can be done as a teacher-led activity, or adapted as a hands-on activity to suit a range of skills. Students can begin at Level 1 and demonstrate understanding at each level or you (or they) may choose which level to start from. Further, you can make accommodations at each level (some examples provided below).

    The level of difficulty could be increased as follows and presented using a gaming analogy. When explaining the task use a combination of verbal and visuals.

    The activity has been levelled to enable differentiation.

  4. Ask each student to either take a selfie of themselves OR have an adult can take a picture of the student(s) showing a particular emotion (e.g. a sad face, or a scene of playing fun a game).

    Either print the photos or show them up on a screen. As a whole group, sort and classify the photos. Ask the class how sure they are about the emotion depicted in each photo. They might use a scale such as unsure, quite sure and very sure, or similar terminology (The student whose picture it is can confirm if the guess is correct).

    You can also link this activity to the previous activity by comparing the real-life emotion to a similar emoji—students could vote on which emoji best fits the picture.

    Finally, you can create a class display, with the photos grouped by emotion.

Plugged activity

The activity has been levelled to enable differentiation.

  1. Explain that computers can be programmed to be intelligent, or at least smart. Ask the class if they think a computer could guess their emotions? Could the computer work out if they are happy, sad or angry?
  2. Use the tool Teachable machine. This tool lets you train up an AI application – without having to code – to recognise three inputs and match them each to a particular output.

    You will need to change the GIF to an emotion by editing the image and searching the available GIFs using the terms ‘happy face’, ‘sad face’ and ‘angry face’. Explain to students that their project will not be saved to ensure their images are not stored where someone else might use the image.

    The activity has been levelled to enable differentiation.

  3. Ask the class to share what they have learned about AI and how smart a computer can be.
    • What worked?
    • What didn’t work?
    • Can you describe cases where the AI was unable to come to a correct result?
  4. Students may come up with their own training data and project to test the AI further. Here are some prompts:
    • Can the AI guess your pet type?
    • Can you control the AI to make music?
    • Can the AI work out what word you have written?


  1. Talk about the bar on the interface, which displays the AI’s confidence level.

    For younger students, discuss the scale. If the bar is fully coloured, the AI is very sure. If the bar is only partly coloured, the AI is not quite sure.

    • When was the AI very sure of its guess?
    • When was it not so sure?
    Screenshot of a bar graph showing the AI’s confidence level. The screenshot shows a confidence level of 35% for an unknown value that has been colour-coded as purple.

    Image 2: confidence level

  2. How well did the AI recognise emotions? Could the AI recognise other people’s emotions using your set-up? Why or why not?
  3. Sometimes we hide our emotions. What others see on our outside is not always how we are feeling on the inside. Would the AI be able to recognise our emotions if we were hiding them?

Why is this relevant

AI is the ability of machines to mimic human capabilities in a way that we would consider 'smart'.

Machine learning is an application of AI. With machine learning, we give the machine lots of examples of data, demonstrating what we would like it to do so that it can figure out how to achieve a goal on its own. The machine learns and adapts its strategy to achieve the goal.

In our example, we are feeding the machine images of our facial expressions via the inbuilt camera. The more varied the data we provide, the more likely the AI will correctly classify the input as the appropriate emotion. In machine learning, the system will give a confidence value; in this case, a percentage and the bar filled or partially filled, represented by colour. The confidence value provides us with an indication of how sure the AI is of its classification.

This lesson focuses on the concept of classification. Classification is a learning technique used to group data based on attributes or features.