XaLogic’s XAPIZ3500 HAT Brings Deep Learning to the Raspberry Pi Zero

The Raspberry Pi zero family consists of two boards — Raspberry Pi Zero and Raspberry Pi Zero W, both of these boards have a Single core 1…

Manu
5 years ago

The Raspberry Pi Zero family consists of two boards — the Pi Zero and Pi Zero W — both of which have a single-core 1GHz Arm processor, 512 MB RAM and various connectors like HDMI, USB, CSI, etc. The Pi Zero W also packs WiFi and Bluetooth capabilities. The lineup, though, is quite under-powered compared to the Pi 3 or new Pi 4, and with just a single-core processor, it’s difficult to use for machine learning. The addition of an AI accelerator, however, can make the Pi Zero a very attractive option for low-cost applications — which is where the XAPIZ3500 AI Hat from XALogic shines.

XaLogic XAPIZ3500

The XAPIZ3500 HAT connects to Pi Zero, and is compatible with all other Raspberry Pi boards with the 40-pin header as well.

Based on the XAM3500 module from XaLogic, the XAPIZ3500 is a board that makes it easier to use the XAM3500 with the Pi Zero. The XAM3500 module is even smaller, and after initial development with the Raspberry Pi, can be integrated with a custom solution for large-scale manufacturing.

The XAM3500 module is equipped with a KendryteK210 processor, 128 MB QSPI Flash and a Microchip ATECC608A cryptograpic co-processor that provides trusted authentication for developing secure cloud IoT applications and communicating with AWS IoT or Google Cloud IoT Core. The Kendryte K210 processor consists of a dual core 64-bit RISC-V CPU with FPU (floating point unit), a Neural Network processor (KPU) or convolutional neural network (CNN) accelerator, an audio accelerator (APU), and various other blocks (AES FFT etc). You can find more details in its datasheet here. The Kendryte 210 consumes less than 1W for typical applications.

Getting Started

As described in the XAM3500 product brief, the module can be employed for computer vision applications, like people counting and automated parking system, to name just a few.

Typically, you have to use Noobs to install Raspbian on Raspberry Pi SD card and then install other needed libraries; however, to make expedite the process, XaLogic has provided an image for Raspberry Pi boards and instruction for setup here. They have a demo script in the image showing Yolo-like object detection, which can run at 2 FPS on the Pi Zero — meaning, it can’t be used for real-time applications yet still good for other use cases. The code for the demo is available on XaLogic GitHub repo. XaLogic also provides pre-trained models for face detection, age and gender estimation, simple voice commands, vibration abnormally detection, and they can even support custom model development for special cases.

Currently, there is no documentation from XaLogic on how to create your own models; although, it utilizes K210 processors, and Kendryte provided a standalone SDK and FreeRTOSSDK. There are programming guides available from Kendryte for both SDKs as well, while some models and examples can be found here.

Build a Solution

Let’s say we want to build a low-cost product that detects if a person is present in a room. To accomplish this, we’ll need:

Total cost: ~$52.29 + tax (not including things like power supply, case, etc.)

A BoM of ~$52 might seem high — most of it coming from the AI hat and camera — but if one buys in high volume, the total cost will come down (especially if we directly use the XAM3500 module). Everything can then be housed inside a nice case.

The above enclosure simply a proof of concept, but after adding the XAPIZ3500 HAT on top of the Pi Zero W, most cases available will probably not fit due to increased height, so a custom unit will be needed.

Other AI HATs

The Raspberry Pi ecosystem is huge and there are various other HATs available. These include the Grove AI HAT, which contains a module from Sipeed — the Sipeed MAix M1 and uses a Kendryte K210 processor for accelerating inference. The Sipeed module doesn’t have a dedicated cryptographic processor for authentication, but it does have a separate camera connector. Sipeed also offers various other dev boards.

As both the Grove AI and XAPIZ3500 HATs boast the same processor (Kendryte K210), their inference performance should be similar.

To learn more about AI at the edge, be sure to check out the links below.

Google Coral Edge TPU Board Vs NVIDIA Jetson Nano Dev board — Hardware Comparison - Both NVidia and Google recently released dev board targeted towards EdgeAI and also at a cost point to attract…

Getting Started with Edge AI Using the GAP8 Processor - Many people predict that the future of AI lies in edge applications and most of the growth in future will come from…

Edge AI hardware you can buy today - Several companies like Graphcore, Cerebras, Mythic etc (long list of such companies here) are working on deep learning…

Manu
Machine learning Engineer. Write about Edge AI - https://medium.com/@suryavanshi.manu
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles