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

https://github.com/qengineering/yolov5-segmentation-ncnn-rpi4

YoloV5 segmentation for a bare Raspberry Pi 4
https://github.com/qengineering/yolov5-segmentation-ncnn-rpi4

aarch64 cpp deep-learning ncnn ncnn-framework ncnn-model raspberry-pi-4 raspberry-pi-64-os segmentation yolov5 yolov5-seg

Last synced: 5 months ago
JSON representation

YoloV5 segmentation for a bare Raspberry Pi 4

Awesome Lists containing this project

README

        

# YoloV5 segmentation Raspberry Pi 4
![output image]( https://qengineering.eu/github/Parking_seg_n.webp )
## YoloV5 segmentation with the ncnn framework.

[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)


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)

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

## Benchmark.
| Model | size | objects | mAP | RPi 4 64-OS 1950 MHz |
| ------------- | :-----: | :-----: | :-------------: | :-------------: |
| YoloV5n | 640x640 nano| 80 | 28.0 | 1.4 - 2.0 FPS |
| YoloV5s | 640x640 small| 80 | 37.4 | 1.0 FPS |
| YoloV5l | 640x640 large| 80 | 49.0 | 0.25 FPS |
| YoloV5x | 640x640 x-large| 80 | 50.7 | 0.15 FPS |
| [Yoact](https://github.com/Qengineering/Yolact-ncnn-Raspberry-Pi-4) | 550x550 | 80 | 28.2 | 0.28 FPS |

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

## Dependencies.
To run the application, you have to:
- A raspberry Pi 4 with a 32 or 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)

- The Tencent ncnn framework installed. [Install ncnn](https://qengineering.eu/install-ncnn-on-raspberry-pi-4.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/YoloV5-segmentation-ncnn-RPi4/archive/refs/heads/main.zip

$ unzip -j master.zip

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

$ rm master.zip

$ rm LICENSE

$ rm README.md


Your *MyDir* folder must now look like this:

parking.jpg

busstop.jpg

YoloV5-seg.cpb

main.cpp

yolov5n-seg.bin

yolov5n-seg.param

yolov5s-seg.bin

yolov5s-seg.param

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

## Running the app.
To run the application load the project file YoloV5-seg.cbp in Code::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).


Many thanks to [FeiGeChuanShu](https://github.com/FeiGeChuanShu)!


![output image]( https://qengineering.eu/github/Busstop_seg_n.webp )

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

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