Coral USB Accelerator with Google's Edge TPU

4 days ago (coral.ai)

These were nice early in the TensorFlow evolution, for things like Frigate...

But even CPU inference is both faster and more energy efficient with a modern Arm SBC chip, and things like the Hailo chip are way faster for similar price, if you have an M.2 slot.

I haven't seen a good USB port alternative for edge devices though.

The big problem is Google seems to have let the whole thing stagnate since like 2019. They could have some near little 5/10/20 TOPS NPUs for cheap if they had continued developing this hardware ecosystem :(

  • >The big problem is Google seems to have let the whole thing stagnate since like 2019.

    Google's flightiness strikes again. How they expect developers (and to some degree consumers) to invest in their churning product lines is beyond me. What's the point in buying a Google product when there's a good chance Google will drop software support and any further development in 5 years or less?

  • Even OpenVINO on an Intel iGPU is as fast with (I've heard) more accurate detection, and can be done on under 5W with a i3 mobile CPU or similar.

  •   But even CPU inference is both faster and more energy efficient with a modern Arm SBC chip
    

    Where I live, electricity costs 45 cents per kWh. What would be a good Arm SBC to run Frigate, assuming I have 4 cameras?

    • Just get OAK cameras from luxonis.

      If you want home surveillance, you can just tie a bunch to ethernet and they'll do on-device AI.

    • Frigate is surprisingly not that cpu intensive with if you have Coral.

      I got repurposed HP G2 SFF desktop with old i5-6500 cpu running proxmox with bunch of VMs and LXC containers including frigate.

      I am passing both coral USB through to frigate container for object detection and passing intel's gpu through for video decoding.

      With 10 cameras continuously recording, corals inference cpu usage is about 12%, frigate CPU usage is about 5%, although a service called go2rtc which is used by frigate to read the cameras streams and restream them to frigate takes up about 15% of the cpu.

      Overall my cpu usage fluctuates below 30% on that entire machine devoted to more than proxmox.

      I did run the watt calculation on that machine and it was something reasonable, dont recall it right now

    • I'm running frigate on an SFF computer I got off eBay for $100 with an i7-8700. It averages around 14 watts. OpenVino for object detection and intel-qsv hardware acceleration preset.

      2 replies →

Not sure if there is something new here but it looks like the same product that has been around for a few years now (wasn't Coral released in 2019-ish?)

  • Agreed. Hasn't this been out for years?

    • Yeah, I don't see anything new here, I am guessing that OP just chanced across it.

      This is not something that is very useful or relevant these days - it's basically abandoned at this point and only works with older versions of Python etc.

      Searching around, it appears that the Coral USB Accelerator does about 4 TOPS.

      The Raspberry Pi 5 AI Kit which costs a few bucks more (and came out last year instead of in 2020) does 13 TOPS.

      The Jetson Orin Nano Super, which costs $250, does 67 TOPS, and was just updated last month (although it's a refresh of the original product).

      I own all three of these products and they are all very frustrating to work with, so you need to have a very specific use-case to make them worthwhile - if you don't, just stick with your machine's GPU.

      4 replies →

  • Yea it has been out for years. I bought one and during the Covid supply chain crisis I sold it for $450 ish.

I have a couple of these, unfortunately I've been waiting for the ecosystem to get better and run newer/improve models to no avail. I attempted some YOLO ports (since Coral uses a specific architecture) and not sure if I'm just bad at this or it's actually hard, but beyond the basic examples with Google's own ecosystem I wasn't able to run anything else on these. I was hoping an upgrade from seeing this on HN, but it seems to be the same old one.

  • Well, a small shoutout for my project to facilitate YOLO on the EdgeTPU without any dependencies on Ultralytics. Some contributors helped a bit with more recent versions, but it seems like all you need is to twiddle a few of the input shapes. I say facilitate rather than port because someone else did the hard work actually implementing the converter to tflite.

    https://github.com/jveitchmichaelis/edgetpu-yolo

    You really do need the model to be defined in Tensorflow though. Channel ordering screws things up in PyTorch and it's not trivial to get round it, otherwise the compiler does all sorts of weird gymnastics to permute for you.

    • See, this looks great, so now I have to give this a try! Just a quick Q to avoid the pain of trying if it's known not to work, is there a major reason this might not work on a raspberry pi? Thanks for sharing

      1 reply →

  • The only repeating use I've found for these so far is object detection in Frigate (NVR software).

  • Same. I have a few Corals I was trying to build some prototypes with. Gave up and found Hailo. Much more powerful. Compatible with far more models. The documentation isn’t great, but its far better than Coral.

I put 8 of these on a mini-ITX computer on a fake moon in my backyard, AMA.

FWIW, The M.2 and mini PCIe form factors are more cost effective. I added one to the WiFi+Bluetooth slot on a refurbished Dell desktop to perform object detection in my CCTV NVR.

https://frigate.video/

  • For anyone else looking at these devices to use with frigate, I found that using the openvino mode on a <$200 intel mini pc was more than adequate for 5 cameras, and probably could have handled more. Glad I tried it out first before buying an accelerator.

I have one of these. The USB model sucks. It overheats unless you put them in high efficiency (low performance) mode which defeats the purpose.

The mini-PCIe variant is much more reliable, but I ended up ditching the Coral entirely and replacing it with a GTX 1060.

Maybe I’m Stupid but I couldn’t figure out how to set the pull up or pull down resistors on these boards. Maybe with LLMs I can figure this out now…. Something to do with device tree confits?

What about the Coral? I been running frigate with mine for 2 years.

  • What's the deal with memory? Does it use the system RAM? I've been considering a cluster for local inference.

    • The data has to go across PCI / USB to get to the internal (tiny) SRAM. It's not a good choice for clustering, you should just use a GPU for that.

    • Dont know, sorry. But the performance is not that awesome, but works well enough for my setup doing realtime object detection with a few cameras.

      My main reason for getting one was power efficency compared to a traditional GPU for this task.

      3 replies →

How does a Coral unit compare to a current gen AMD or Intel CPU in terms of throughput for ML tasks?

  • It does not at all compare. The whole Coral/edge TPU project was the idea of a guy at Google (https://www.linkedin.com/in/billy-rutledge-1b750a4/) who never did anything interesting with it except a series of press releases and various hardware drops and demos). It has nothing to do with google's real TPUs. I still don't understand why this project has been allowed to live while talented engineers and projects were cancelled.

    • I don't get the impression Google has invested much more into Coral beyond the initial set of products.

      In terms of longevity - it's kinda table stakes in the electronics industry. Nobody's going to integrate your edge AI chip into their smart CCTV camera or whatever if you can't promise 5+ years of availability. There are chipmakers still selling parts they launched in the 1980s.

a couple questions for people who have been using it. Where does this fit between a typical budget arm cortex and a gpu? and what are the practical sized models you could run on one of these?

This is way too outdated to be relevant in any way. Back in the day they had a board with a TPU on it, before everyone else did. That board ran object detection at a pretty good resolution at like 80fps in 2.5W power budget. I still have that board in my drawer - I never did find any use for it at its price point. Plus, because it's Google, I expected that they'd abandon the board within 2 years tops, which is exactly what happened. The board was like $100 IIRC which was a good chunk of cash when RaspberryPi was like $25. Nowadays there are _dozens_ of Chinese boards available with on-chip TPUs. Tooling still sucks mightily, but that's expected when dealing with embedded systems. Unlike with the Google board, you can usually build your own Linux for these using Yocto or Buildroot with minimal tweaks.

  • Is there a more cost effective solution for frigate nvr?

    • A mini-PC like a Lenovo m720q or m920q can be had for about $120 on secondary markets. It works great for me as a frigate server. I'm using it with 6 cameras and plan to add couple of more. If you look around on ebay, you might able to find one with 16gb ram and even a m.2 or SSD drive included. Then get the m.2 (A+E) version of the Coral TPU board ($30-35). That can be inserted into the wifi board slot. The m720q has a i5-8400T. While it's a 8th gen intel CPU , its more than capable of handling Frigate , as well several other applications if you run it in Proxmox or even barebones install. It has one m.2 for storage slot. But can also hold one 2.5 inch SSD. So you can drop in a cheap nvme drive for boot & OS. Use a much cheaper larger SSD for video storage. (what i've done)