Git Product home page Git Product logo

qengineering / tensorflow_lite_ssd_rpi_64-bits Goto Github PK

View Code? Open in Web Editor NEW
39.0 3.0 6.0 21.58 MB

TensorFlow Lite SSD on bare Raspberry Pi 4 with 64-bit OS at 24 FPS

Home Page: https://qengineering.eu/install-ubuntu-18.04-on-raspberry-pi-4.html

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

C++ 100.00%
tensorflow-lite tensorflow-examples raspberry-pi-4 ubuntu1804 deep-learning cpp high-fps aarch64 armv7 armv8

tensorflow_lite_ssd_rpi_64-bits's Introduction

output image Find this example on our SD-image

TensorFlow_Lite_SSD_RPi_64-bits

output image

TensorFlow Lite SSD running at 24 FPS on a bare Raspberry Pi 4 64-OS

License

A fast C++ implementation of TensorFlow Lite on a bare Raspberry Pi 4 64-bit OS. Once overclocked to 1925 MHz, the app runs a whopping 24 FPS! Without any hardware accelerator, just you and your Pi.

https://arxiv.org/abs/1611.10012
Training set: COCO
Size: 300x300
Frame rate V1 Lite : 28 FPS (RPi 4 @ 1925 MHz - 64 bits Bullseye OS)
Frame rate V1 Lite : 17 FPS (RPi 4 @ 2000 MHz - 32 bits OS) see 32-OS

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

To extract and run the network in Code::Blocks
$ mkdir MyDir
$ cd MyDir
$ wget https://github.com/Qengineering/TensorFlow_Lite_SSD_RPi_64-bits/archive/refs/heads/master.zip
$ unzip -j master.zip
Remove master.zip and README.md as they are no longer needed.
$ rm master.zip
$ rm README.md

Your MyDir folder must now look like this:
James.mp4
COCO_labels.txt
detect.tflite
TestTensorFlow_Lite.cpb
MobileNetV1.cpp

Run TestTensorFlow_Lite.cpb with Code::Blocks. More info or
if you want to connect a camera to the app, follow the instructions at Hands-On.
I fact you can run this example on any aarch64 Linux system.

See the movie at: https://vimeo.com/393889226


paypal

tensorflow_lite_ssd_rpi_64-bits'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  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

tensorflow_lite_ssd_rpi_64-bits's Issues

Only getting 9-10 FPS rate

Hi, First of all thank you so much for this tutorial. I followed all your steps but I am getting framerate of only 10 FPS. Can you please specify any reasons if possible. I am using RPI4B with 4GB ram.

Newcomer's Basic Questions

*. Code : MobileNetV1.cpp
....
cout << "tensors size: " << interpreter->tensors_size() << "\n";
cout << "nodes size: " << interpreter->nodes_size() << "\n";
cout << "inputs: " << interpreter->inputs().size() << "\n";
cout << "input(0) name: " << interpreter->GetInputName(0) << "\n";
cout << "outputs: " << interpreter->outputs().size() << "\n";
....

*. The output is something like this.
use : detect.tflite
tensors size: 184
nodes size: 64
inputs: 1
input(0) name: normalized_input_image_tensor
outputs: 4
Fps : 28.5714

*. How I can change tensors_size, nodes size, outputs?
use : mobilenet_v1_1.0_224_quant.tflite
tensors size: 90
nodes size: 31
inputs: 1
input(0) name: input
outputs: 1
Fps : 41.4583

use : mobilenet_v2_1.0_224_quant.tflite
tensors size: 174
nodes size: 65
inputs: 1
input(0) name: input
outputs: 1
Fps : 50

*. I want to increase my FPS in Mobilenet V1, V2

Customization of the Modell

Hi

I am in desperate need of a fast Hand-Detection model.
Although I wasn't able to reach the 24 fps (I am stuck at around 10 with overclocking, 7 without - loading the model-file in python), this is still the fastest detection I got to run on my Pi 4.

But its for the "wrong" objects - I need only the detection of hands.

While comparing your model with a pretrained PyTorch implementation of the ssd mobile net v3 I noticed that even the official models are too slow. Even on an 2023 MacBook I reached only 5 fps.

Could you point me in the somewhat right direction for how to customize the model for my own use case?

I was thinking of using the EgoHands dataset

Ff my request is considered inappropriate here, feel free to delete it without comment.

Best regards,
Jan

Link Error dlsym@@GLIBC_2.17

Get this error using Ubuntu 20 or RaspiOS 64

/usr/bin/ld: /root/tensorflow/tensorflow/lite/tools/make/gen/linux_aarch64/lib/libtensorflow-lite.a(interpreter_builder.o)||undefined reference to symbol 'dlsym@@GLIBC_2.17'|

Best model/approach for detect hands in RPi-4

Hi,

We have a application to protect my friends hands . running on normal PC 25fps

what would be the best model and AI platform to detect hand like below to prevent accidents in RPi ? should be fast as possible as

Camera fixed up and see directly
thx

Screen Shot 2022-07-25 at 17 27 57

Screen Shot 2022-07-25 at 17 28 27

Ignore unnecessary objects

i want to ignore some objects like refrigator. How can i edit COCO_labels.txt file? I try to change label name with none, null, unlabeled, but when i run code, just refrigator name changed with none, null or unlabeled

Opening the full angle of camera pi v2.

I'm running this example, but it has a problem. When capturing camera V2, the input frames are CROPPED automatically into 640x480. This is really terrible, I want the full angle of the camrera, and rescale to 300x300 before put into the SSDv1 model.
I read the videoio.hpp but had no idea.
Please, help me to figure out directions to resolve it.
Thank you so much.

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.