GithubHelp home page GithubHelp logo

zhutony / yolov7-ncnn-raspberry-pi-4 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from qengineering/yolov7-ncnn-raspberry-pi-4

0.0 1.0 0.0 11.94 MB

YoloV7 for a bare Raspberry Pi using ncnn.

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

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

C++ 100.00%

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

YoloV7 Raspberry Pi 4

output image

YoloV7 with the ncnn framework.

License

Paper: https://arxiv.org/pdf/2207.02696.pdf

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


Benchmark.

Model size objects mAP Jetson Nano 1479 MHz RPi 4 64-OS 1950 MHz
NanoDet 320x320 80 20.6 26.2 FPS 13.0 FPS
NanoDet Plus 416x416 80 30.4 18.5 FPS 5.0 FPS
YoloFastestV2 352x352 80 24.1 38.4 FPS 18.8 FPS
YoloV2 416x416 20 19.2 10.1 FPS 3.0 FPS
YoloV3 352x352 tiny 20 16.6 17.7 FPS 4.4 FPS
YoloV4 416x416 tiny 80 21.7 16.1 FPS 3.4 FPS
YoloV4 608x608 full 80 45.3 1.3 FPS 0.2 FPS
YoloV5 640x640 small 80 22.5 5.0 FPS 1.6 FPS
YoloV6 640x640 nano 80 35.0 10.5 FPS 2.7 FPS
YoloV7 412x412 tiny 80 38.7 18.0 FPS 4.43 FPS
YoloV7 640x640 tiny 80 38.7 8.5 FPS 2.1 FPS
YoloV8 640x640 nano 80 37.3 14.5 FPS 3.1 FPS
YoloV8 640x640 small 80 44.9 4.5 FPS 1.47 FPS
YoloX 416x416 nano 80 25.8 22.6 FPS 7.0 FPS
YoloX 416x416 tiny 80 32.8 11.35 FPS 2.8 FPS
YoloX 640x640 small 80 40.5 3.65 FPS 0.9 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
  • The Tencent ncnn framework installed. Install ncnn
  • OpenCV 64 bit installed. Install OpenCV 4.5
  • 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/YoloV7-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:
parking.jpg
busstop.jpg
YoloV7.cpb
yolo.cpp
yolo.h
yoloV7main.cpp
yolov7-tiny.bin
yolov7-tiny.param


Running the app.

To run the application load the project file YoloV7.cbp in Code::Blocks. More info or
if you want to connect a camera to the app, follow the instructions at Hands-On.


Dynamic sizes.

YoloV7 can handle different input resolutions without changing the deep learning model.
On line 28 of yolov7main.cpp you can change the target_size (default 640).
Decreasing the size to say 412 will speed up the inference time. On the other hand, the resizing makes the image less detailed; the model will no longer detect all objects.

Many thanks to nihui and Xiang Shin Wuu

output image


paypal

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

Contributors

qengineering avatar

Watchers

 avatar

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.