{"id":21802508,"url":"https://github.com/qengineering/tensorflow_lite_classification_rpi_32-bits","last_synced_at":"2025-03-21T07:14:49.351Z","repository":{"id":112948124,"uuid":"260658370","full_name":"Qengineering/TensorFlow_Lite_Classification_RPi_32-bits","owner":"Qengineering","description":"TensorFlow Lite classification on a bare Raspberry Pi 4 at 33 FPS","archived":false,"fork":false,"pushed_at":"2021-12-27T11:59:17.000Z","size":891,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-26T03:45:46.199Z","etag":null,"topics":["armv7","bare-raspberry-pi","cpp","deep-learning","frame-rate","high-fps","inception","inceptionv2","inceptionv4","lite","mobilenet","raspberry-pi-4","tensorflow-examples","tensorflow-lite","testtensorflow-lite"],"latest_commit_sha":null,"homepage":"https://qengineering.eu/install-tensorflow-2-lite-on-raspberry-pi-4.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":"2020-05-02T09:57:07.000Z","updated_at":"2022-11-03T06:53:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"bf912dcc-1aa1-4d8a-8579-799f86f7a814","html_url":"https://github.com/Qengineering/TensorFlow_Lite_Classification_RPi_32-bits","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%2FTensorFlow_Lite_Classification_RPi_32-bits","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qengineering%2FTensorFlow_Lite_Classification_RPi_32-bits/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qengineering%2FTensorFlow_Lite_Classification_RPi_32-bits/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qengineering%2FTensorFlow_Lite_Classification_RPi_32-bits/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Qengineering","download_url":"https://codeload.github.com/Qengineering/TensorFlow_Lite_Classification_RPi_32-bits/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244752360,"owners_count":20504256,"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":["armv7","bare-raspberry-pi","cpp","deep-learning","frame-rate","high-fps","inception","inceptionv2","inceptionv4","lite","mobilenet","raspberry-pi-4","tensorflow-examples","tensorflow-lite","testtensorflow-lite"],"created_at":"2024-11-27T11:29:09.744Z","updated_at":"2025-03-21T07:14:49.328Z","avatar_url":"https://github.com/Qengineering.png","language":"C++","readme":"# TensorFlow_Lite_Classification_RPi_32-bits\n![output image]( https://qengineering.eu/images/Schoolbus2.png )\n## TensorFlow Lite classification running on a bare Raspberry Pi 32-bit OS\n[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)\u003cbr/\u003e\u003cbr/\u003e\nA fast C++ implementation of TensorFlow Lite classification  on a bare Raspberry Pi 4.\u003cbr/\u003e\nOnce overclocked to 1950 MHz, your app runs an amazing 33 FPS without any hardware accelerator.\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) \u003cbr/\u003e\n\n------------\n\nPapers: https://arxiv.org/pdf/1712.05877.pdf \u003cbr/\u003e\nTraining set: COCO with 1000 objects\u003cbr/\u003e\nSize: 224x224 \u003cbr/\u003e\n\n------------\n\n## Benchmark.\nFrame rate Mobile_V1 Lite : 33 FPS (RPi 4 @ 1950 MHz - 32 bits OS) \u003cbr/\u003e\nFrame rate Mobile_V2 Lite : 36.2 FPS (RPi 4 @ 1950 MHz - 32 bits OS) \u003cbr/\u003e\nFrame rate Inception_V2 Lite : 8.9 FPS (RPi 4 @ 1950 MHz - 32 bits OS) \u003cbr/\u003e\nFrame rate Inception_V4Lite : 1.6 FPS (RPi 4 @ 1950 MHz - 32 bits OS) \u003cbr/\u003e\nWith a 64 bits OS you get higher frame rates see: https://github.com/Qengineering/TensorFlow_Lite_Classification_RPi_64-bits \u003cbr/\u003e\n\n------------\n\n## Dependencies.\u003cbr/\u003e\nTo run the application, you have to:\n- TensorFlow Lite framework installed. [Install TensorFlow Lite](https://qengineering.eu/install-tensorflow-2-lite-on-raspberry-pi-4.html) \u003cbr/\u003e\n- OpenCV installed. [Install OpenCV 4.5](https://qengineering.eu/install-opencv-4.5-on-raspberry-pi-4.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/TensorFlow_Lite_Classification_RPi_32-bits/archive/refs/heads/master.zip \u003cbr/\u003e\n$ unzip -j master.zip \u003cbr/\u003e\nRemove master.zip and README.md as they are no longer needed. \u003cbr/\u003e \n$ rm master.zip \u003cbr/\u003e\n$ rm README.md \u003cbr/\u003e \u003cbr/\u003e\nYour *MyDir* folder must now look like this: \u003cbr/\u003e \ntabby.jpeg \u003cbr/\u003e\nschoolbus.jpg \u003cbr/\u003e\ngrace_hopper.bmp \u003cbr/\u003e\nLabels.txt \u003cbr/\u003e\nTensorFlow_Lite_Mobile.cpb \u003cbr/\u003e\nTensorFlow_Lite_Class.cpp\u003cbr/\u003e\n \u003cbr/\u003e\nNext, choose your model from TensorFlow: https://www.tensorflow.org/lite/guide/hosted_models \u003cbr/\u003e \nDownload a quantized model, extract the .tflite from the tarball and place it in your *MyDir*. \u003cbr/\u003e \u003cbr/\u003e\nNow your *MyDir* folder may contain: mobilenet_v1_1.0_224_quant.tflite. \u003cbr/\u003e\nOr: inception_v4_299_quant.tflite. Or both of course. \u003cbr/\u003e \u003cbr/\u003e\nEnter the .tflite file of your choice on line 54 in TensorFlow_Lite_Class.cpp \u003cbr/\u003e\nThe image to be tested is given a line 84, also in TensorFlow_Lite_Class.cpp \u003cbr/\u003e \u003cbr/\u003e\n\n------------\n\n## Running the app.\nRun TestTensorFlow_Lite.cpb with 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[![paypal](https://qengineering.eu/images/TipJarSmall4.png)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=CPZTM5BB3FCYL) \n","funding_links":["https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=CPZTM5BB3FCYL"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqengineering%2Ftensorflow_lite_classification_rpi_32-bits","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqengineering%2Ftensorflow_lite_classification_rpi_32-bits","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqengineering%2Ftensorflow_lite_classification_rpi_32-bits/lists"}