Lesson 2 - Portrait Gallery: Interactive Portrait Guide
Challenge 2-1, 2-2, 2-3
Suggested time: 50 minutes. For younger students or first-time users, this lesson may be extended to 60 minutes.
Students will learn how AI face recognition works and use it and Unihiker K10 to build a museum Portrait Guide.
I can describe how the Portrait Guide recognizes a face.
I can explain why the model needs to learn a portrait.
I can enroll a portrait and use its Face ID to show the correct introduction.
Engage
2 min.
There are many portraits in a museum. Do you know who they are? A smart portrait guide can help visitors learn about each person when it sees a portrait.

How could a smart guide help each portrait introduce itself ? Let’s try it.
Background
3 min.
The K10 has a camera. In this lesson, the camera looks at a portrait card and the AI face detection function finds the face area.
Its AI face recognition model can learn a portrait face. After a face is enrolled and recognized, the model uses a number greater than 0 ( Successfully Matched ) to mark that learned face. This number is the Face ID.

How do we use the Portrait Guide? How does it recognize portraits? Let’s try it and read the program together.
Required items:
| Item | Use in this lesson |
|---|---|
| UNIHIKER K10 | Uses the camera, screen, buttons, and AI functions. |
| USB cable | Connects the K10 to the computer. |
| Computer with Mind+ | Opens, uploads, and edits the program. |
Portrait Recognition card![]() | Provide images for the K10 to learn and recognize. |
| Building instruction and building blocks | Used to build the Interactive Portrait Guide. |
Build and Connect
8 min.
| Build together by the Building instruction. |
| Build the portrait guide by the confirmed Building instruction. Place the K10 on the front stand and the portrait card on the back holder. |
After each group finishes building, ask students to open the starter program in Mind+, connect the K10 to the computer, and upload the program to the K10.
Before testing, have students adjust the distance and move the card left or right. The ready sign is a green box around the face on the K10 screen.

Adjust the distance | Adjust the portrait card position
Then the teacher can ask:
What ID do you see on the screen? What does it mean?
What should we do next to get the expected result?
What information can you get from the code?
Explore Function
15 min.
Challenge 2-1: Observe the Program & Test Newton
| Before testing, ask students to read the program and predict what Button A and Button B do. Fill in the table. |
| Then students test Newton step by step: Button A learns the portrait, Button B recognizes it, and the program shows the introduction after a matched Face ID. |
NOTE:
Prompt students to record the Face ID. If the screen shows ID -1 or No match yet, they should adjust the card and press Button B again.
If Button A is pressed too many times, the learned Face ID may not be 1, so the introduction may not appear. Press the reset button on the back panel and try again.
Expected observations: the green box shows the face area; Button A enrolls the portrait; Button B runs recognition; a positive Face ID means a learned portrait is matched.

After testing, discuss these questions:
How does the Portrait Guide recognize Newton’s portrait?
What technology helps it do this?
Where have you seen face recognition used in real life?
Explore AI Technology
10 min.
Challenge 2-2: Explain How the AI Learns
Guide students to review their testing process.
| Use Challenge 2-2 to help students connect the process steps with key AI ideas: face detection, face recognition, Face ID, and program output. |
| Briefly explain face detection and face recognition, then guide students to discuss: What is face recognition? Why does the Portrait Guide need to learn a portrait first? Where else have you seen face recognition used in real life? Encourage students to share their ideas with examples. |
Introduce the key technology.
- Face recognition is an AI vision technology that helps the Portrait Guide identify a learned portrait and return a Face ID.
- Image input: The K10 camera captures the portrait card.
Face detection: The program finds the face area in the image. The green box shows that the face is ready.
Learning: When Button A is pressed, the K10 learns the portrait.
Recognition: When Button B is pressed, the AI model compares the new camera image with the learned portrait and returns a Face ID.
Definition
Face Detection - AI vision technology that finds a face area in an image. In this lesson, the green box shows the detected face area.
Face Recognition - AI vision technology that compares a new camera image with learned face information and returns a Face ID.
Face ID - a number used by the program to represent a learned face.
Program Challenge
10 min.
Challenge 2-3: Modify the Program & Add a New Portrait
| Students plan a new portrait, learn it, test it, record the Face ID, and modify the output branch. |
| Remind students to change only one thing at a time: ID, introduction, then light color. |
Summary - Key AI Ideas Review
2 min.
Summarize with students:
Face detection helps the K10 find the face area. The green box shows that the face area is ready.
Face recognition learns face image from a portrait card and returns a Face ID during recognition.
Face ID is the key data to keep the result correct.
AI Program Block Review
| Blocks | Description |
|---|---|
| Turns on the camera and prepares Image detection and recognition. |
| Sets the camera to face detection mode and helps find the face area. |
| Enrolls the portrait currently seen by the camera. |
| Runs face recognition on the current camera image. |
| Checks whether the recognition result is ready. |
| Returns the Face ID after recognition. ID -1 means no match. |
| Clears all learned Face IDs and lets students start again. |
Next Class: Lesson 3
Current Tutorial: Click Here






















