H5P + Gemini = Micro Expression Test: Making Classrooms Fun with AI
H5P + Gemini = Micro Expression Test: Making Classrooms Fun with AI
Let’s be honest — when students walk into class with their laptops and smartphones, traditional lectures can feel pretty stale. I’ve watched too many students zone out, scrolling through their phones, orå even playing
League of Legends in my class, instead of engaging with the lesson. That’s when I realized we need to meet them where they are and use technology to make learning actually fun.
The recent release of Google’s Nano Banana model has been a game-changer for creating perfect human faces with incredible character consistency. This breakthrough made me realize that designing a game that contains real knowledge, but not an academic test looks like a game, is the ultimate solution for the young generation. They want interactive experiences, not traditional assessments.
I need to teach a class about Emotions. I remembered (love) the TV show “Lie to Me,” where experts use micro expressions to detect lies and deception. In the show, people with natural talents are trained using exactly these kinds of tools to become human lie detectors. I realized I could create something similar — an interactive test that lets students discover if they have a natural ability to read micro expressions. Of course, it is done by Dr. Paul Ekman (https://www.paulekman.com/resources/micro-expressions/).
The beauty is that this becomes an interest test rather than an academic assessment. I can ask students to give it a try in class, and since the score doesn’t really matter for grades, the score itself becomes like a game token for themselves — “Hey, I scored 8 out of 10 on micro expression detection!” It’s that personal achievement feeling that makes it engaging.
The best part about using H5P is its portability — the content can be imported into many different platforms (Moodle, Blackboard etc.) and you can take it with you wherever you go. Plus, it integrates seamlessly with Moodle to count toward class participation, giving students credit just for engaging with the material.
Creating Emotion Images with Paul Ekman’s Research
The foundation of this project started with Paul Ekman’s groundbreaking research on facial expressions and emotions. Instead of using copyrighted materials from textbooks or online sources, I decided to generate my own images using Gemini’s image generation capabilities.
For each basic emotion that Ekman identified, I created two distinct images. Just give the prompts:
- A neutral baseline face
- The same face displaying the target emotion
The key was being very specific in my prompts to Gemini. I made sure to include Ekman’s detailed facial characteristic descriptions for each emotion. For example, when generating anger, I specified furrowed brows, tightened eyelids, and pressed lips. For surprise, I emphasized raised eyebrows, widened eyes, and slightly opened mouth.
What impressed me most was Gemini’s consistency in maintaining the same facial features across different emotion pairs.
Neutral Face
Turning Static Images into Micro Expression GIFs
Once I had my image pairs, the real magic happened when I converted them into animated GIFs that simulate actual micro expressions. I used ImageMagick through the command line because it gives me precise control over timing.
Here’s the animation sequence I created:
- Neutral face displays for 2 seconds (baseline, when start the test)
- Emotion face flashes for just 0.1 seconds (the micro expression)
- Returns to neutral face for 5 seconds (transition to next test)
- Make the above process a loop so students can take a second look
The command looks like this, I found it easy to use:
magick convert -delay 200 img01.png -delay 10 img02.png -delay 800 img01.png -loop 0 output.gifThis timing mimics real micro expressions proposed by Paul Ekman, which typically last between 1/25th to 1/5th of a second. The quick flash creates that “did I just see something?” moment that makes the exercise both challenging and engaging.
You could also use open-source tools like Krita or GIMP if you prefer a graphical interface, but I found the command line approach faster once I got the hang of it, especially when making multiple gifs.
Bringing It All Together with H5P
The final step was packaging everything into an interactive learning experience using Lumi, which is a great tool for creating H5P content. I selected the “Quiz” content type and uploaded each micro expression GIF as a question.
Students see the AI made face and have to identify which emotion briefly appeared.
Uploading to Moodle was seamless, and now I have a reusable resource that I can bring to future class sessions.
The combination of AI-generated content, open-source tools, and interactive platforms proves that we don’t need expensive software or licensing deals to create engaging educational experiences. Sometimes the best innovations come from creatively combining free tools in new ways.





Comments
Post a Comment