GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Qengineering/TensorFlow_Lite_Classification_RPi_zero: TensorFlow Lite on a bare Raspberry Pi Zero

BranchesTags
Open more actions menu

Latest commit

 

History

8 Commits
8 Commits

Folders and files

NameName
Last commit message
Last commit date
LICENSE
LICENSE
 
 
README.md
README.md
 
 
TensorFlow_Lite_Class.cpp
TensorFlow_Lite_Class.cpp
 
 
TestTensorFlow_Lite_Mobile.cbp
TestTensorFlow_Lite_Mobile.cbp
 
 
grace_hopper.bmp
grace_hopper.bmp
 
 
labels.txt
labels.txt
 
 
schoolbus.jpg
schoolbus.jpg
 
 
tabby.jpeg
tabby.jpeg
 
 

Repository files navigation

TensorFlow_Lite_Classification_RPi_zero

output image

TensorFlow Lite classification running on a bare Raspberry Pi Zero

License

A 'fast' C++ implementation of TensorFlow Lite classification on a bare Raspberry Pi zero.
Be noted that we use the zero version here, not the new Raspberry Pi zero 2.
Inference time: 11 sec
Special made for a Jetson Nano see Q-engineering deep learning examples


Papers: https://arxiv.org/pdf/1712.05877.pdf
Training set: COCO with 1000 objects
Size: 224x224


Dependencies.

To run the application, you have to:

  • TensorFlow Lite framework installed. Install TensorFlow Lite
  • OpenCV 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/TensorFlow_Lite_Classification_RPi_zero/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:
tabby.jpeg
schoolbus.jpg
grace_hopper.bmp
Labels.txt
TensorFlow_Lite_Mobile.cpb
TensorFlow_Lite_Class.cpp

Next, choose your model from TensorFlow: https://www.tensorflow.org/lite/guide/hosted_models
Download a quantized model, extract the .tflite from the tarball and place it in your MyDir.

Now your MyDir folder may contain: mobilenet_v1_1.0_224_quant.tflite.
Or: inception_v4_299_quant.tflite. Or both of course.

Enter the .tflite file of your choice on line 54 in TensorFlow_Lite_Class.cpp
The image to be tested is given a line 84, also in TensorFlow_Lite_Class.cpp


Running the app.

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.


paypal

About

TensorFlow Lite on a bare Raspberry Pi Zero

qengineering.eu/install-tensorflow-2-lite-on-raspberry-pi-4.html

Topics

armv6cppdeep-learningmobilenetraspberry-pi-zeroraspberry-pi-zero-wtensoflow-litetensorflow-examples

Resources

Readme
BSD-3-Clause license
Activity

Stars

19 stars

Watchers

1 watching

Forks

2 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.