{"id":13643552,"url":"https://github.com/Qengineering/YoloV6-ncnn-Raspberry-Pi-4","last_synced_at":"2025-04-21T02:30:41.585Z","repository":{"id":51446869,"uuid":"520440054","full_name":"Qengineering/YoloV6-ncnn-Raspberry-Pi-4","owner":"Qengineering","description":"YoloV6 for a bare Raspberry Pi using ncnn.","archived":false,"fork":false,"pushed_at":"2024-06-12T08:25:26.000Z","size":8777,"stargazers_count":11,"open_issues_count":1,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-13T18:55:09.967Z","etag":null,"topics":["deep-learning","ncnn","ncnn-framework","ncnn-model","orange-pi-5","raspberry-pi-4","raspberry-pi-64-os","rock-5","rock-pi-5","yolov6","yolov6-nano"],"latest_commit_sha":null,"homepage":"https://qengineering.eu/deep-learning-examples-on-raspberry-32-64-os.html","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Qengineering.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-02T09:50:39.000Z","updated_at":"2024-06-12T08:25:30.000Z","dependencies_parsed_at":"2024-01-14T12:18:02.928Z","dependency_job_id":"a0df75b6-60c2-4fb5-aa9c-f559a94a79c3","html_url":"https://github.com/Qengineering/YoloV6-ncnn-Raspberry-Pi-4","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qengineering%2FYoloV6-ncnn-Raspberry-Pi-4","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qengineering%2FYoloV6-ncnn-Raspberry-Pi-4/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qengineering%2FYoloV6-ncnn-Raspberry-Pi-4/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qengineering%2FYoloV6-ncnn-Raspberry-Pi-4/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Qengineering","download_url":"https://codeload.github.com/Qengineering/YoloV6-ncnn-Raspberry-Pi-4/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249986022,"owners_count":21356310,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deep-learning","ncnn","ncnn-framework","ncnn-model","orange-pi-5","raspberry-pi-4","raspberry-pi-64-os","rock-5","rock-pi-5","yolov6","yolov6-nano"],"created_at":"2024-08-02T01:01:49.129Z","updated_at":"2025-04-21T02:30:36.577Z","avatar_url":"https://github.com/Qengineering.png","language":"C++","readme":"# YoloV6 Raspberry Pi 4\n![output image]( https://qengineering.eu/images/Parking_YoloV6.jpg )\n## YoloV6 with the ncnn framework. \u003cbr/\u003e\n[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)\u003cbr/\u003e\u003cbr/\u003e\nPaper: https://tech.meituan.com/2022/06/23/yolov6-a-fast-and-accurate-target-detection-framework-is-opening-source.html\u003cbr/\u003e\u003cbr/\u003e\nSpecial 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)\n\n------------\n\n## Benchmark.\nNumbers in **FPS** and reflect only the inference timing. Grabbing frames, post-processing and drawing are not taken into account.\n\n| Model  | size | mAP | Jetson Nano | RPi 4 1950 | RPi 5 2900 | Rock 5 | RK3588\u003csup\u003e1\u003c/sup\u003e\u003cbr\u003eNPU | RK3566/68\u003csup\u003e2\u003c/sup\u003e\u003cbr\u003eNPU | Nano\u003cbr\u003eTensorRT | Orin\u003cbr\u003eTensorRT |\n| ------------- | :-----:  | :-----:  | :-------------:  | :-------------: | :-----: | :-----: | :-------------:  | :-------------: | :-----: | :-----: |\n| [NanoDet](https://github.com/Qengineering/NanoDet-ncnn-Raspberry-Pi-4) | 320x320 | 20.6  |  26.2 | 13.0 | 43.2  |36.0  |||||\n| [NanoDet Plus](https://github.com/Qengineering/NanoDetPlus-ncnn-Raspberry-Pi-4) | 416x416 | 30.4  |  18.5  | 5.0  | 30.0  | 24.9  |||||\n| [PP-PicoDet](https://github.com/Qengineering/PP-PicoDet-ncnn-Raspberry-Pi-4) | 320x320 | 27.0  |  24.0 | 7.5 | 53.7 | 46.7 |||||\n| [YoloFastestV2](https://github.com/Qengineering/YoloFastestV2-ncnn-Raspberry-Pi-4) | 352x352 | 24.1 |  38.4 | 18.8 | 78.5 | 65.4 | ||||\n| [YoloV2](https://github.com/Qengineering/YoloV2-ncnn-Raspberry-Pi-4) \u003csup\u003e20\u003c/sup\u003e| 416x416 | 19.2 |  10.1 | 3.0 | 24.0 | 20.0 | ||||\n| [YoloV3](https://github.com/Qengineering/YoloV3-ncnn-Raspberry-Pi-4) \u003csup\u003e20\u003c/sup\u003e| 352x352 tiny | 16.6 | 17.7 | 4.4 | 18.1 | 15.0 | ||||\n| [YoloV4](https://github.com/Qengineering/YoloV4-ncnn-Raspberry-Pi-4) | 416x416 tiny | 21.7 | 16.1 | 3.4 | 17.5 | 22.4 | ||||\n| [YoloV4](https://github.com/Qengineering/YoloV4-ncnn-Raspberry-Pi-4) | 608x608 full | 45.3 | 1.3 | 0.2 | 1.82 | 1.5 | ||||\n| [YoloV5](https://github.com/Qengineering/YoloV5-ncnn-Raspberry-Pi-4) | 640x640 nano | 22.5 | 5.0 | 1.6 | 13.6 | 12.5 | 58.8 | 14.8 | 19.0 | 100 |\n| [YoloV5](https://github.com/Qengineering/YoloV5-ncnn-Raspberry-Pi-4) | 640x640 small | 22.5 | 5.0 | 1.6 | 6.3 | 12.5 | 37.7 | 11.7 | 9.25 | 100 |\n| [YoloV6](https://github.com/Qengineering/YoloV6-ncnn-Raspberry-Pi-4) | 640x640 nano | 35.0 | 10.5 | 2.7 | 15.8 | 20.8 | 63.0 | 18.0 |||\n| [YoloV7](https://github.com/Qengineering/YoloV5-ncnn-Raspberry-Pi-4) | 640x640 tiny | 38.7 | 8.5 | 2.1 | 14.4 | 17.9 |  53.4 | 16.1 | 15.0 ||\n| [YoloV8](https://github.com/Qengineering/YoloV8-ncnn-Raspberry-Pi-4) | 640x640 nano | 37.3 | 14.5 | 3.1 | 20.0 | 16.3 | 53.1 | 18.2 |||\n| [YoloV8](https://github.com/Qengineering/YoloV8-ncnn-Raspberry-Pi-4) | 640x640 small | 44.9 | 4.5 | 1.47 | 11.0 | 9.2 | 28.5 | 8.9 |||\n| [YoloV9](https://github.com/Qengineering/YoloV9-ncnn-Raspberry-Pi-4) | 640x640 comp | 53.0 | 1.2 | 0.28 | 1.5 | 1.2 | |||| \n| [YoloX](https://github.com/Qengineering/YoloX-ncnn-Raspberry-Pi-4) | 416x416 nano | 25.8 | 22.6 | 7.0 | 38.6 | 28.5 | ||||\n| [YoloX](https://github.com/Qengineering/YoloX-ncnn-Raspberry-Pi-4) | 416x416 tiny | 32.8 | 11.35 | 2.8 | 17.2 | 18.1 | ||||\n| [YoloX](https://github.com/Qengineering/YoloX-ncnn-Raspberry-Pi-4) | 640x640 small | 40.5 | 3.65 | 0.9 | 4.5 | 7.5 | 30.0 | 10.0 |||\n\n\u003cb\u003e\u003csup\u003e1\u003c/sup\u003e\u003c/b\u003e The Rock 5 and Orange Pi5 have the RK3588 on board.\u003cbr\u003e\n\u003cb\u003e\u003csup\u003e2\u003c/sup\u003e\u003c/b\u003e The Rock 3, Radxa Zero 3 and Orange Pi3B have the RK3566 on board.\u003cbr\u003e\n\u003cb\u003e\u003csup\u003e20\u003c/sup\u003e\u003c/b\u003e Recognize 20 objects (VOC) instead of 80 (COCO)\n\n------------\n\n## Dependencies.\nTo run the application, you have to:\n- 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) \u003cbr/\u003e\n- The Tencent ncnn framework installed. [Install ncnn](https://qengineering.eu/install-ncnn-on-raspberry-pi-4.html) \u003cbr/\u003e\n- OpenCV 64-bit installed. [Install OpenCV 4.5](https://qengineering.eu/install-opencv-4.5-on-raspberry-64-os.html) \u003cbr/\u003e\n- Code::Blocks installed. (```$ sudo apt-get install codeblocks```)\n\n------------\n\n## Installing the app.\nTo extract and run the network in Code::Blocks \u003cbr/\u003e\n$ mkdir *MyDir* \u003cbr/\u003e\n$ cd *MyDir* \u003cbr/\u003e\n$ wget https://github.com/Qengineering/YoloV6-ncnn-Raspberry-Pi-4/archive/refs/heads/main.zip \u003cbr/\u003e\n$ unzip -j master.zip \u003cbr/\u003e\nRemove master.zip, LICENSE and README.md as they are no longer needed. \u003cbr/\u003e \n$ rm master.zip \u003cbr/\u003e\n$ rm LICENSE \u003cbr/\u003e\n$ rm README.md \u003cbr/\u003e \u003cbr/\u003e\nYour *MyDir* folder must now look like this: \u003cbr/\u003e \nparking.jpg \u003cbr/\u003e\nbusstop.jpg \u003cbr/\u003e\nYoloV6.cpb \u003cbr/\u003e\nyolo.cpp \u003cbr/\u003e\nyolo.h \u003cbr/\u003e\nyoloV6main.cpp \u003cbr/\u003e\nyolov6n.bin \u003cbr/\u003e\nyolov6n.param \u003cbr/\u003e\n\n------------\n\n## Running the app.\nTo run the application load the project file YoloV7.cbp in Code::Blocks. More info or\u003cbr/\u003e \nif 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).\u003cbr/\u003e\u003cbr/\u003e\n\n------------\n\n## CMake.\nInstead of Code::Blocks, you can now use CMake to build the application.\u003cbr/\u003e\nPlease follow the instructions at [#12](https://github.com/Qengineering/Face-Recognition-Raspberry-Pi-64-bits/issues/12). Although it is used to build another application, the instructions and steps are identical.\n\n------------\n\n### Dynamic sizes.\nYoloV6 can handle different input resolutions without changing the deep learning model.\u003cbr/\u003e\nOn line 28 of `yolov6main.cpp` you can change the `target_size` (default 640).\u003cbr/\u003e\nDecreasing 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.\u003cbr/\u003e\u003cbr/\u003e\n\nMany thanks to [nihui](https://github.com/nihui/) and [FeiGeChuanShu](https://github.com/FeiGeChuanShu)\u003cbr/\u003e\u003cbr/\u003e\n![output image]( https://qengineering.eu/images/Busstop_YoloV6.jpg )\n\n------------\n\n[![paypal](https://qengineering.eu/images/TipJarSmall4.png)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=CPZTM5BB3FCYL) \n\n\n","funding_links":["https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=CPZTM5BB3FCYL"],"categories":["Lighter and Deployment Frameworks"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FQengineering%2FYoloV6-ncnn-Raspberry-Pi-4","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FQengineering%2FYoloV6-ncnn-Raspberry-Pi-4","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FQengineering%2FYoloV6-ncnn-Raspberry-Pi-4/lists"}