An open API service indexing awesome lists of open source software.

https://github.com/qengineering/tensorflow_lite_segmentation_rpi_64-bit

TensorFlow Lite segmentation on Raspberry Pi 4 aka Unet at 7.2 FPS with 64-bit OS
https://github.com/qengineering/tensorflow_lite_segmentation_rpi_64-bit

armv7 armv8 cpp deep-learning raspberry-pi-4 segmentation semantic-segmentation tensorflow-examples tensorflow-lite ubuntu1804 unet unet-image-segmentation unet-segmentation unet-tensorflow

Last synced: 2 months ago
JSON representation

TensorFlow Lite segmentation on Raspberry Pi 4 aka Unet at 7.2 FPS with 64-bit OS

Awesome Lists containing this project

README

          

![output image](https://qengineering.eu/images/SDcard16GB_tiny.jpg) Find this example on our [SD-image](https://github.com/Qengineering/RPi-image)
# TensorFlow_Lite_Segmentation_RPi_64-bit
![output image]( https://qengineering.eu/images/Unet_64.jpg )

## TensorFlow Lite Segmentation running on bare Raspberry Pi 4 with 64-bit OS
[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)


A fast C++ implementation of TensorFlow Lite Unet on a bare Raspberry Pi 4.
Once overclocked to 1850 MHz, the app runs at 7.2 FPS!
Special made for a bare Raspberry Pi 4 see [Q-engineering deep learning examples](https://qengineering.eu/deep-learning-examples-on-raspberry-32-64-os.html)

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

Papers: https://arxiv.org/abs/1606.00915

Training set: VOC2017

Size: 257x257

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

## Benchmark.
Frame rate Unet Lite : 4.0 FPS (RPi 4 @ 1900 MHz - 32 bits OS)

Frame rate Unet Lite : 7.2 FPS (RPi 4 @ 1875 MHz - 64 bits OS)

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

## Dependencies.

To run the application, you have to:
- A raspberry Pi 4 with a 64-bit operating system. It can be the Raspberry 64-bit OS, or Ubuntu 18.04 / 20.04. [Install 64-bit OS](https://qengineering.eu/install-raspberry-64-os.html)

- TensorFlow Lite framework installed. [Install TensorFlow Lite](https://qengineering.eu/install-tensorflow-2-lite-on-raspberry-64-os.html)

- OpenCV 64 bit installed. [Install OpenCV 4.5](https://qengineering.eu/install-opencv-4.5-on-raspberry-64-os.html)

- Code::Blocks installed. (```$ sudo apt-get install codeblocks```)

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

## Installing the app.
To extract and run the network in Code::Blocks

$ mkdir *MyDir*

$ cd *MyDir*

$ wget https://github.com/Qengineering/TensorFlow_Lite_Segmentation_RPi_64-bit/archive/refs/heads/master.zip

$ unzip -j master.zip

Remove master.zip and README.md as they are no longer needed.

$ rm master.zip

$ rm README.md


Your *MyDir* folder must now look like this:

cat.jpg.mp4

deeplabv3_257_mv_gpu.tflite

TestUnet.cpb

Unet.cpp

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

## Running the app.
Run TestUnet.cpb withCode::Blocks. More info or

if you want to connect a camera to the app, follow the instructions at [Hands-On](https://qengineering.eu/deep-learning-examples-on-raspberry-32-64-os.html#HandsOn).

I fact you can run this example on any aarch64 Linux system.

See the movie at: https://www.youtube.com/watch?v=Kh9DLMgCIIE

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

[![paypal](https://qengineering.eu/images/TipJarSmall4.png)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=CPZTM5BB3FCYL)