Giter VIP home page Giter VIP logo

qengineering / yolofastestv2-ncnn-raspberry-pi-4 Goto Github PK

View Code? Open in Web Editor NEW
33.0 2.0 6.0 19.82 MB

YoloFastestV2 for a bare Raspberry Pi 4

Home Page: https://qengineering.eu/deep-learning-examples-on-raspberry-32-64-os.html

License: BSD 3-Clause "New" or "Revised" License

C++ 94.21% CMake 5.79%
ncnn ncnn-model yolofastest yolofastest-v2 deep-learning aarch64 raspberry raspberry-pi-4 raspberry-pi-64-os cpp

yolofastestv2-ncnn-raspberry-pi-4's Introduction

YoloFastestV2 Raspberry Pi 4

output image

YoloFastest V2 with the ncnn framework.

License

A truly impressive YOLO family member. As long as the images are not too large and/or the objects are too small, very high frame rates are achieved with more than acceptable accuracy. Thanks dog-qiuqiu for all the hard work.

Special adapt for a bare Raspberry Pi 4, see Q-engineering deep learning examples


Benchmark.

Numbers in FPS and reflect only the inference timing. Grabbing frames, post-processing and drawing are not taken into account.

Model size mAP Jetson Nano RPi 4 1950 RPi 5 2900 Rock 5 RK35881
NPU
RK3566/682
NPU
Nano
TensorRT
Orin
TensorRT
NanoDet 320x320 20.6 26.2 13.0 43.2 36.0
NanoDet Plus 416x416 30.4 18.5 5.0 30.0 24.9
PP-PicoDet 320x320 27.0 24.0 7.5 53.7 46.7
YoloFastestV2 352x352 24.1 38.4 18.8 78.5 65.4
YoloV2 20 416x416 19.2 10.1 3.0 24.0 20.0
YoloV3 20 352x352 tiny 16.6 17.7 4.4 18.1 15.0
YoloV4 416x416 tiny 21.7 16.1 3.4 17.5 22.4
YoloV4 608x608 full 45.3 1.3 0.2 1.82 1.5
YoloV5 640x640 nano 22.5 5.0 1.6 13.6 12.5 58.8 14.8 19.0 100
YoloV5 640x640 small 22.5 5.0 1.6 6.3 12.5 37.7 11.7 9.25 100
YoloV6 640x640 nano 35.0 10.5 2.7 15.8 20.8 63.0 18.0
YoloV7 640x640 tiny 38.7 8.5 2.1 14.4 17.9 53.4 16.1 15.0
YoloV8 640x640 nano 37.3 14.5 3.1 20.0 16.3 53.1 18.2
YoloV8 640x640 small 44.9 4.5 1.47 11.0 9.2 28.5 8.9
YoloV9 640x640 comp 53.0 1.2 0.28 1.5 1.2
YoloX 416x416 nano 25.8 22.6 7.0 38.6 28.5
YoloX 416x416 tiny 32.8 11.35 2.8 17.2 18.1
YoloX 640x640 small 40.5 3.65 0.9 4.5 7.5 30.0 10.0

1 The Rock 5 and Orange Pi5 have the RK3588 on board.
2 The Rock 3, Radxa Zero 3 and Orange Pi3B have the RK3566 on board.
20 Recognize 20 objects (VOC) instead of 80 (COCO)


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
  • The Tencent ncnn framework installed. Install ncnn
  • OpenCV 64-bit installed. Install OpenCV 4.5
  • Code::Blocks installed (Optional). ($ 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/YoloFastestV2-ncnn-Raspberry-Pi-4/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:
James.mp4
parking.jpg
parking_tiny.jpg
YoloFastestV2.cpb
mainFV2.cpp
yolo-fastestv2.cpp
yolo-fastestv2.h
yolo-fastestv2-opt.bin
yolo-fastestv2-opt.param


Running the app.

To run the application load the project file YoloFastestV2.cbp in Code::Blocks.

Or use Cmake.

$ cd *MyDir*
$ mkdir build
$ cd build
$ cmake ..
$ make -j4

More info or if you want to connect a camera to the app, follow the instructions at Hands-On.

Many thanks to dog-qiuqiu

output image
output image
output image
output image


paypal

yolofastestv2-ncnn-raspberry-pi-4's People

Contributors

qengineering avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

yolofastestv2-ncnn-raspberry-pi-4's Issues

Segmentation fault

Hi @Qengineering ,

Thank you for the fantastic codes. I am a fresh programmer learning the AI things on Raspberry Pi 4B.
My system is 'Linux raspberrypi 5.15.32-v8+ aarch64 GNU/Linux'

When I try to run the project file YoloFastestV2.cbp in Code::Blocks followed by your tutorial, I get the result 'Segmentation fault'. Could you please help to fix the problem? It might be a silly question, and I am sorry to request as I failed many times.
Segmentation fault
I am looking forward to your reply. Cheers.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.