AI on a Pi? Believe it!

85,390
0
Published 2024-01-20
AI is escalating rapidly...




Full tutorial blog post 👉👉 www.patreon.com/DataSlayer374/shop/110430

----------------------------------

Product Links (some are affiliate links)
- Raspberry Pi 5 👉 amzn.to/3SrbY77
- Coral AI PCIe TPU 👉 amzn.to/3U4uROE

Pineberry AI Hat
pineberrypi.com/products/hat-ai-for-raspberry-pi-5

Jeff Geerling
www.jeffgeerling.com/blog/2023/testing-coral-tpu-a…

Raspberry Pi 5
www.raspberrypi.com/products/raspberry-pi-5/

Coral Edge TPU
coral.ai/products/m2-accelerator-ae

Frigate NVR
frigate.video/

Discover the Latest Breakthrough in AI Technology with the Pineberry AI Hat for Raspberry Pi 5

In the world of AI and machine learning, the Pineberry AI hat stands as a groundbreaking innovation. This cutting-edge device seamlessly integrates with the Raspberry Pi 5, harnessing the power of the advanced PCI Express bus. This innovative setup notably includes an M2 slot, meticulously designed to accommodate the Coral AI Edge TPU, a compact yet powerful tool in AI technology.

The Pineberry AI hat, coupled with the Coral AI Edge TPU, brings unmatched efficiency to the Raspberry Pi platform. Astonishingly, a modestly priced $25 Coral device can outpace a $2,000 CPU in performance. This affordability and power are further enhanced by the capability of the interface to operate at gen 3 speeds, a feature that propels AI capabilities on the Raspberry Pi to unprecedented levels.

Our demonstration reveals the remarkable 7ms inference time, showcasing the speed and efficiency of this setup.

In our detailed exploration, we utilize the open-source Frigate NVR home surveillance system, accelerated by TPU-enhanced machine learning. Despite Frigate's previous removal of the Raspberry Pi from their recommended hardware list, our configuration achieved faster inference speeds than many other setups.

The hardware assembly is straightforward yet sophisticated. It involves mounting the TPU onto the AI hat, securing it with spacers and screws, attaching a 16p FPC ribbon, and finally connecting the AI Hat to an 8GB Raspberry Pi 5.

The overall cost for this high-performance setup includes $18.61 for the AI Hat and $24.99 for the Coral AI Chip, totaling an affordable $43.60. Additionally, a USB version is available for $59.99, offering an alternative connection via USB 3.0.

The PCIe version of the device boasts advanced thermal management, reducing power draw and inference speed when necessary, ideal for continuous, long-term operation. In contrast, some users find the USB accelerator slightly underpowered, prompting creative solutions within the hobbyist community.

The throughput comparison between PCIe gen 3 and USB 3 reveals that while PCIe may offer slightly lower latency, data transfer does not significantly bottleneck these setups. The Raspberry Pi 5's PCIe lane, initially PCIe 2.0 and unofficially upgradable to PCIe 3.0, provides improved performance.

For camera integration, we focus on IP cameras and bypass the complexities of RTSP configuration. However, the potential of the Camera Module 3 with its 12 MGP sensor, suitable for HD IoT camera applications, is worth noting.

Those with a keen interest in AI will appreciate the ease of installing Google's pycoral library, allowing for the creation and fine-tuning of custom TF lite models. The possibility of utilizing a Dual Edge TPU, doubling resources with minimal additional cost and space, is an exciting prospect.

While there are rumors of an official Raspberry Pi M2 hat, currently, the focus seems to be more on NVMe storage solutions. However, the potential of running multiple Edge TPUs on a single installation is a tantalizing thought, especially considering a single TPU can support around ten cameras.

In conclusion, while the USB accelerator offers an affordable and efficient alternative, leaving the PCIe slot open for fast storage could significantly enhance the overall performance of the Raspberry Pi sys

All Comments (21)
  • Only recently discovered your channel, and it is SOOO unique! Looking forward to more embedded+AI videos, keep it up!
  • @MyPhone-qg2eh
    I'm doing the same thing on a rpi4 with no tpu using opencv and facial detection, and I can't tell the difference. I wish these videos would be more measured with clear demonstrations. Looks choppy.
  • @aarong800
    As far as I've researched you can't get the dual core TPU working, since the Pi 5 PCIe socket is single lane 2.0. Only one of the cores will show up. You can though mess with config files to get 3.0 speeds. If anyone figures the single lane limitation to be false let me know ..because that's exactly what I had bought and hoped for.
  • @ArbaazKhan-xc3hg
    can you run ollama and run a llama2-uncensored model on it. please?
  • @jeffg4686
    Nice! At that price, what about an array of accelerators hooked up to the Pi. Maybe work with some company to put together a kit (for home security). Person can program to their liking, but you give them a nice standard implementation. Multiple cameras recording to multiple Pi's (with storage attached) would be good security. They'd have to find all the Pi's. Camera's need to be wireless (separated from the pi) so you can hide the Pi's away real well.
  • @denniskliewer4
    On CES 2024 there were new NPU on Edge devices introduced.They use PCIe Gen 3 with m.2. The first one is MemryX MX3 Edge AI Accelerator and the other is Kinara Ara-2
  • @favio9454
    You aré using a wrong preset. Raspberry pi 5 can only decode HEVC ( h265 ) , so if you add More cameras It Is probable your container Will crash even with the TPU.
  • @SamGarfield1
    Awesome setup! I wonder how it does with llm inference. Could.you try running ollama and see if the accelerator makes any difference? Idk if the coral has the matrix multiplication abilities.
  • @NiallBeag
    It looks like you're using a card with a single edge. There's nothing on the Pineberry site that specifically says whether it works with the dual Edge model... do you know whether it does? I'm thinking the fact that it's E-keyed suggests it would...
  • @Juan-ws9sy
    anyone else unable to set up the driver? ls: cannot access '/dev/apex_0': No such file or directory
  • @与ai同行
    Thank you for the great video! Is there a way to adapt both nvme and coral tpu m2 by using two HATs?
  • can TPU assist with video editing? e.g. record multiple takes and have it cut into 1 best version; suggest images to include; find stock footage; create transitions, effects, text, etc.
  • @HaydonRyan
    Listen closely developers to the problems running python. . This is 1000% the second reason why you shouldn’t write tools system tools in python. It displaces the need to resolve dependencies to the end user. The first reason is efficiency esp for the pi.
  • @5i1v3rStorm
    I wish the coral TPU could accalerate home-assistant‘s voice assistant. I‘m really not interested in frigate but there does not seembto be much more I could use the TPU for in my cloudless smart home, or do you have any more ideas?
  • @drewski6843
    Noway! Just discovered your channel. Gained a new subscriber. I was wondering, can you install your setup in a rc car. Having the gpt autonomously control it? Thanks again for your vids 🤙
  • @WRDO
    how can i use it to tracking an object and output to tow servo motors to act like pan tilt , how many fps i can get , thanks
  • @deangpan4711
    Hi. Thanks for the video. But I have a question, before I kill another running system on my pi-5. Could you please tell me if the "sudo tee -a /boot/config.txt" works on a ubuntu server 24.04 ?? Because there is no config.txt in boot, instead it is in /boot/firmware/cofig.txt.... Also, as I have tried this change before in the /boot/firmware/config.txt it just killed my system by passing "kernel=kernel8.img". I don't know why, but after reboot the LED indicated kernel not found.....
  • @glabifrons
    Where can you actually buy one of these for $25? I can find no-one who has them in stock selling them at list price.
  • @InsanityisSanity
    Ive got a Jetson Nano and just got a RPi5, are these two and to be combined to work together?