# NCNN vs Coral TPU

**URL:** <https://community.ultralytics.com/t/ncnn-vs-coral-tpu/696>\
**Category:** YOLO\
**Tags:** raspberrypi, yolo\
**Created:** [January 18, 2025, 10:25pm UTC](https://community.ultralytics.com/t/ncnn-vs-coral-tpu/696 "2025-01-18T22:25:39Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Seby\_R](https://sea1.discourse-cdn.com/flex001/user_avatar/community.ultralytics.com/seby_r/32/553_2.png) [@Seby\_R](https://community.ultralytics.com/u/Seby_R)\
**Post date:** [January 18, 2025, 10:25pm UTC](https://community.ultralytics.com/t/ncnn-vs-coral-tpu/696/1 "2025-01-18T22:25:39Z")

</div>

Hello, I am working on deploying a segmentation model on my Raspberry Pi 5, but I’ve encountered a performance issue. Surprisingly, the model performs better when converted to the NCNN format compared to using the Google Coral TPU.

With the NCNN format, the model processes frames in about 30–40 ms, whereas with the TPU, it takes 80–90 ms per frame. This result is unexpected, as I anticipated the TPU to deliver better performance.

I’m unsure if I’ve made a mistake in my setup or configuration. Any advice or insights would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![Skillnoob](https://sea1.discourse-cdn.com/flex001/user_avatar/community.ultralytics.com/skillnoob/32/559_2.png) [@Skillnoob](https://community.ultralytics.com/u/Skillnoob)\
**Post date:** [January 19, 2025, 3:10pm UTC](https://community.ultralytics.com/t/ncnn-vs-coral-tpu/696/2 "2025-01-19T15:10:57Z")

</div>

Can you try exporting with `imgsz=512`. It should be able to give you better performance results as with a higher imgsz some ops don’t get mapped to the `tpu`. You can also look at the benchmarks [here](https://docs.ultralytics.com/guides/coral-edge-tpu-on-raspberry-pi/#benchmarks)

---

<div class="post-metadata">

**Author:** ![Seby\_R](https://sea1.discourse-cdn.com/flex001/user_avatar/community.ultralytics.com/seby_r/32/553_2.png) [@Seby\_R](https://community.ultralytics.com/u/Seby_R)\
**Post date:** [January 19, 2025, 3:40pm UTC](https://community.ultralytics.com/t/ncnn-vs-coral-tpu/696/3 "2025-01-19T15:40:29Z")

</div>

I tried exporting to 320, but the ncnn format is still faster.

---

<div class="post-metadata">

**Author:** ![Skillnoob](https://sea1.discourse-cdn.com/flex001/user_avatar/community.ultralytics.com/skillnoob/32/559_2.png) [@Skillnoob](https://community.ultralytics.com/u/Skillnoob)\
**Post date:** [January 19, 2025, 3:43pm UTC](https://community.ultralytics.com/t/ncnn-vs-coral-tpu/696/4 "2025-01-19T15:43:12Z")

</div>

Are you using yolo11? If so, try yolov8, it might be faster on the tpu.

---

<div class="post-metadata">

**Author:** ![Seby\_R](https://sea1.discourse-cdn.com/flex001/user_avatar/community.ultralytics.com/seby_r/32/553_2.png) [@Seby\_R](https://community.ultralytics.com/u/Seby_R)\
**Post date:** [January 19, 2025, 3:46pm UTC](https://community.ultralytics.com/t/ncnn-vs-coral-tpu/696/5 "2025-01-19T15:46:05Z")

</div>

I already tried, but the performance remained the same. It’s possible that the Raspberry Pi is running in low-power mode, which could explain the poor performance, as it restricts power usage for peripherals.

---

<div class="post-metadata">

**Author:** ![BurhanQ](https://sea1.discourse-cdn.com/flex001/user_avatar/community.ultralytics.com/burhanq/32/7_2.png) [@BurhanQ](https://community.ultralytics.com/u/BurhanQ)\
**Post date:** [January 20, 2025, 1:31pm UTC](https://community.ultralytics.com/t/ncnn-vs-coral-tpu/696/6 "2025-01-20T13:31:54Z")

</div>

See also the [RPi5 benchmarks](https://docs.ultralytics.com/guides/raspberry-pi/#raspberry-pi-5-yolo11-benchmarks) in the docs.

---

<div class="post-metadata">

**Author:** ![Seby\_R](https://sea1.discourse-cdn.com/flex001/user_avatar/community.ultralytics.com/seby_r/32/553_2.png) [@Seby\_R](https://community.ultralytics.com/u/Seby_R)\
**Post date:** [January 22, 2025, 9:31am UTC](https://community.ultralytics.com/t/ncnn-vs-coral-tpu/696/7 "2025-01-22T09:31:29Z")

</div>

I haven’t seen any benchmarks related to the Edge TPU there, but considering that the TF Lite format is used for the TPU, it makes sense for it to be slower than the NCNN format.

---

<div class="post-metadata">

**Author:** ![pderrenger](https://sea1.discourse-cdn.com/flex001/user_avatar/community.ultralytics.com/pderrenger/32/73_2.png) [@pderrenger](https://community.ultralytics.com/u/pderrenger)\
**Post date:** [February 12, 2025, 1:32pm UTC](https://community.ultralytics.com/t/ncnn-vs-coral-tpu/696/8 "2025-02-12T13:32:11Z")

</div>

Hello Seby\_R,

Thanks for reaching out. It’s great to hear you’re exploring different deployment options for your segmentation model on the Raspberry Pi 5.

You mentioned seeing better performance with the NCNN format compared to the Coral Edge TPU, which is unexpected. While you suspect low-power mode might be a factor, I recommend ensuring you’re using the high-frequency mode for the Edge TPU. You can find details on how to select the appropriate version in the [Installation Walkthrough](https://docs.ultralytics.com/guides/coral-edge-tpu-on-raspberry-pi/#installing-the-edge-tpu-runtime) section of our Edge TPU guide. Also ensure you are using a USB 3.0 port.

Regarding your comment about TFLite and Edge TPU benchmarks, the Edge TPU is indeed designed to accelerate TFLite models. The [Raspberry Pi guide](https://docs.ultralytics.com/guides/raspberry-pi/) provides a comparison between formats, including NCNN.
