Face Emotion Recognition-Based Museum Artifact Emotion Mirror

1.1 Project Introduction

During museum visits, there are always moments of monotony and distance: facing quietly displayed cultural relics, you want more interesting interactions yet can only passively read the descriptions, lacking engagement. This project will create a "Museum Artifact Emotion Mirror" that makes cultural relics act like a mirror reflecting your emotions. It will explain and respond based on your emotions, helping you bridge this gap. For example, if you smile happily, the emotion mirror will immediately send an interesting response from an Egyptian statue, sharing its production story and the daily life of ancient people. With no complex operations needed, you can easily "empathize" with cultural relics.

From facial image collection, emotion recognition, and LLM (Large Language Model) query and response to result output, this complete process clearly showcases the practical application of AI technology in cultural scenarios. It makes emotion recognition technology perceivable and interactive, adding more warmth and fun to museum visits!


1.2 Demo Video

2. Project Implementation Principle

When a visitor is visiting a museum, they stand in front of the Emotion Mirror. HUSKYLENS 2 captures the visitor's facial expression through the camera and performs emotion model inference, while the UNIHIKER K10 captures images of the cultural relics in front via its onboard camera. Subsequently, HUSKYLENS 2 transmits the emotion recognition result to the UNIHIKER K10, which integrates the "emotion result + cultural relic photo" and combines it with a preset prompt to send a question to the Large Language Model (LLM). For example, if the Egyptian Pharaoh Statue is recognized and the visitor's expression is "happy", the prompt is: "I’m showing a happiness expression towards this exhibit. Please interact with me based on this mood." After the LLM returns the result, the UNIHIKER K10 displays it on the screen.


3. Hardware and Software Preparation

3.1Equipment List

Note: HUSKYLENS requires Version HUSKYLENS 2.

HARDWARE LIST
1 UNIHIKER K10
1 HUSKYLENS 2
2 USB Cable
1 PH2.0 4Pin Connector Wire

3.2 Hardware Connection

Make connections by referring to the diagram below.

3.3 Software Preparation

Download and install the Mind+ installation package(Version 2 or above) from the official website. Double-click to open it after installation.


4. Project Making

4.1 HUSKYLENS 2

First, select the protocol type for HUSKYLENS 2.
Tap System Settings → Protocol Type → select I2C communication mode, then return to the main menu interface.

Second, swipe the screen to find the "Face Emotion Recognition" function.

Point HUSKYLENS 2 at an image containing faces. When a face is detected, the screen will display colored bounding boxes around all detected faces, with each face labeled above it with its emotion, ID, and confidence level, such as "Happiness: ID4 98%". This means that in the Face Emotion Recognition function, the model determines there is a 98% probability that this expression corresponds to the pre-learned "Happiness" emotion with ID4.

For more detailed usage of HUSKYLENS 2, please refer to the following URL:
https://wiki.dfrobot.com/_SKU_SEN0638_Gravity_HUSKYLENS_2_AI_Camera_Vision_Sensor

4.2 Setup Large Language Model

Log in to the Volcano Ark Management
https://console.volcengine.com/ark/region:ark+cn-beijing/overview?briefPage=0&briefType=introduce&type=new

Freely select the model to activate based on price, free quota, and features until "De-activate" is displayed.


Navigate to API Keys → select Create API Key → Create to complete the creation.


Obtain your "API Key" here; it should be inserted into the corresponding position in the code during implementation.

Create an access point.
Enter the required information and select an already activated model.
Confirm the access point.


Obtain your "Access Point ID" here; it should be inserted into the corresponding position in the code during implementation.


Note: Please keep your API key and access point ID properly; do not disclose or publicly spread them to others to prevent security risks caused by the leakage of critical information.

4.3 Programming

Open the programming software Mind+, choose "Coding" mode, then click "Upload Mode" to create a new project.


Next, add the required extensions in Mind+, including UNIHIKER K10 and HUSKYLENS 2.
Enter the "Extensions" page, switch to "Board" tab, search for "K10", click "UNIHIKER K10".


Load the "HUSKYLENS 2 AI Camera" library by the same way from "Module" page.

Click the "Back" button to return to the programming interface.


Click the "Connect Device", choose your device and "Connect".


After the device is successfully connected, write the program as follows:


The analysis of the core code is as follows:

There is a complete program file for this project in the attachment.
Open Project→Open Local File to load project.

Select the project in the attachment and click "Open".

Click "Upload" to run the program.

The effect is as follows:

5. Attachment

icon Attachment.zip 1.5MB Download(0)
License
All Rights
Reserved
licensBg
0