https://github.com/qengineering/nanodet-tracking-ncnn-rpi_64-bit
NanoDet with tracking for a bare Raspberry Pi 4 using ncnn.
https://github.com/qengineering/nanodet-tracking-ncnn-rpi_64-bit
byte-tracking deep-learning nanodet ncnn ncnn-model raspberry-pi-4 raspberry-pi-64-os tracking
Last synced: 3 months ago
JSON representation
NanoDet with tracking for a bare Raspberry Pi 4 using ncnn.
- Host: GitHub
- URL: https://github.com/qengineering/nanodet-tracking-ncnn-rpi_64-bit
- Owner: Qengineering
- License: bsd-3-clause
- Created: 2022-07-04T13:37:02.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-11-06T10:29:02.000Z (over 1 year ago)
- Last Synced: 2025-03-27T09:23:22.839Z (3 months ago)
- Topics: byte-tracking, deep-learning, nanodet, ncnn, ncnn-model, raspberry-pi-4, raspberry-pi-64-os, tracking
- Language: C++
- Homepage: https://qengineering.eu/deep-learning-examples-on-raspberry-32-64-os.html
- Size: 14.7 MB
- Stars: 8
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NanoDet with Tracking
https://user-images.githubusercontent.com/44409029/177167373-69b4ba96-aa0b-4b97-a2db-b8ab497406be.mp4
## NanoDet with Byte Tracking for the ncnn framework.
The model tries to keep track of the individual objects found in the scenes. The example video follows the walkers as they stroll along. Obvious, not a simple task. Not only does the detection needs to be at a robust level. You also have to solve occlusion as the walkers pass each other.
[](https://opensource.org/licenses/BSD-3-Clause)
Paper: https://arxiv.org/pdf/2110.06864v2.pdf
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 |
| ------------- | :-----: | :-----: | :-----: | :-------------: |
| [Tensorflow lite](https://github.com/Qengineering/TensorFlow_Lite-Tracking-RPi_64-bit) | 300x300 | 80 | 21.0 | 24.6 FPS |
| [NanoDet](https://github.com/Qengineering/NanoDet-Tracking-ncnn-RPi_64-bit) | 320x320 | 80 | 20.6 | **11.8 FPS** |
| [YoloX](https://github.com/Qengineering/YoloX-Tracking-ncnn-RPi_64-bit) | 416x416 | 80 | 25.8 | 7.2 FPS |------------
## 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)
- 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/NanoDet-Tracking-ncnn-RPi_64-bit/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:
```
├── include
│ ├── BYTETracker.h
│ ├── dataType.h
│ ├── kalmanFilter.h
│ ├── lapjv.h
│ └── STrack.h
├── NanoDet_Byte_Track.cbp
├── nanodet_m.bin
├── nanodet_m.param
├── palace.mp4
├── src
│ ├── BYTETracker.cpp
│ ├── kalmanFilter.cpp
│ ├── lapjv.cpp
│ ├── nanodet.cpp
│ ├── STrack.cpp
│ └── utils.cpp
├── tree.txt
└── Walkers.mp4
```------------
## Install Eigen.
Install eigen-3.3.9 [google](https://drive.google.com/file/d/1rqO74CYCNrmRAg8Rra0JP3yZtJ-rfket/view?usp=sharing) or [baidu(code:ueq4)](https://pan.baidu.com/s/15kEfCxpy-T7tz60msxxExg) (if not done earlier by Tensorflow Lite).
```
unzip eigen-3.3.9.zip
cd eigen-3.3.9
mkdir build
cd build
cmake ..
sudo make install
```------------
## Running the app.
To run the application load the project file NanoDet_Byte_Track.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 [nihui](https://github.com/nihui/) and [ifzhang](https://github.com/ifzhang)------------
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=CPZTM5BB3FCYL)