'Believe it' You can use a Raspberry Pi to detect Naruto hand seals with the power of AI

Raspberry Pi
(Image credit: Lucas Fernando)

If you're a fan of the classic ninja adventure series Naruto, then you've definitely seen the hand seals that appear throughout the story. These are distinct hand positions that, in the Naruto universe, help the person using them perform powerful fighting techniques. In real life, they're what maker and developer Lucas Fernando are using to train his custom AI model. The project is demonstrated on a Linux machine but he suggests it could be replicated on a Raspberry Pi including the latest flagship, the Raspberry Pi 5

I made a Naruto hand sign detection system - YouTube I made a Naruto hand sign detection system - YouTube
Watch On

To pull this off, Fernando has created a custom Python script to train the AI model to recognize all twelve hand seals from the series. After training it with enough images (around 1200), the system can now monitor a live webcam feed and report back which hand seal is being displayed.

The project is fun enough on its own but Fernando took things a step further and decided to make the project open source. All sorts of information about the project is available in greater detail over at GitHub. Fernando also shared a video to YouTube breaking down its construction even further. This is particularly useful if you're new to using image recognition and AI in general but also interesting for newcomers.

Naruto hand signals detected by AI

(Image credit: Lucas Fernando)

If you want to recreate this project, it doesn't take much hardware. The latest Raspberry Pi 5 would be plenty powerful but you could get away with using a Raspberry Pi 4, as well. The Pi needs a way to capture images so you'll need a camera of sorts. You can use one of the official Raspberry Pi camera modules, the Camera Module 3 would be ideal, or a compatible USB webcam. Adding the new Raspberry Pi AI HAT+ would add significantly more AI processing power to a Raspberry Pi 5 based build.

Training the AI model required a considerable amount of work which was made easier thanks to a tool called CVAT. There are twelve different hand seals so Fernando needed enough data to help the model accurately read each one. In the end, he trained each hand seal with 100 images each for a grand total of 1200 images in the database. You can explore the software side of the project over at GitHub.

If you'd like to get a closer look at this project in action, head over to Fernando's official YouTube channel where you can see both how it was created and how well it performs.

Ash Hill
Contributing Writer

Ash Hill is a contributing writer for Tom's Hardware with a wealth of experience in the hobby electronics, 3D printing and PCs. She manages the Pi projects of the month and much of our daily Raspberry Pi reporting while also finding the best coupons and deals on all tech.