{"id":21802512,"url":"https://github.com/qengineering/tensorflow_lite_classification_rpi_64-bits","last_synced_at":"2025-04-13T18:42:14.708Z","repository":{"id":65382646,"uuid":"260717301","full_name":"Qengineering/TensorFlow_Lite_Classification_RPi_64-bits","owner":"Qengineering","description":"TensorFlow Lite classification on a bare Raspberry Pi 4 with 64-bit OS at 23 FPS","archived":false,"fork":false,"pushed_at":"2021-12-27T11:44:26.000Z","size":880,"stargazers_count":12,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T09:23:23.516Z","etag":null,"topics":["aarch64","armv7","armv8","bare-raspberry-pi","cpp","deep-learning","high-fps","inception","inceptionv2","inceptionv4","lite","mobilenet","raspberry-pi-4","tensorflow-examples","tensorflow-lite","testtensorflow-lite","ubuntu1804"],"latest_commit_sha":null,"homepage":"https://qengineering.eu/install-ubuntu-18.04-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}},"created_at":"2020-05-02T15:32:26.000Z","updated_at":"2024-08-02T18:42:33.000Z","dependencies_parsed_at":"2023-01-20T14:25:11.735Z","dependency_job_id":null,"html_url":"https://github.com/Qengineering/TensorFlow_Lite_Classification_RPi_64-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_64-bits","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qengineering%2FTensorFlow_Lite_Classification_RPi_64-bits/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qengineering%2FTensorFlow_Lite_Classification_RPi_64-bits/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qengineering%2FTensorFlow_Lite_Classification_RPi_64-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_64-bits/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248764624,"owners_count":21158128,"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":["aarch64","armv7","armv8","bare-raspberry-pi","cpp","deep-learning","high-fps","inception","inceptionv2","inceptionv4","lite","mobilenet","raspberry-pi-4","tensorflow-examples","tensorflow-lite","testtensorflow-lite","ubuntu1804"],"created_at":"2024-11-27T11:29:13.939Z","updated_at":"2025-04-13T18:42:14.684Z","avatar_url":"https://github.com/Qengineering.png","language":"C++","readme":"![output image](https://qengineering.eu/images/SDcard16GB_tiny.jpg) Find this example on our [SD-image](https://github.com/Qengineering/RPi-image)\n# TensorFlow_Lite_Classification_RPi_64-bits\n![output image]( https://qengineering.eu/images/SchoolbusUb.png )\u003cbr/\u003e\n## TensorFlow Lite classification running on a bare Raspberry Pi 4\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. The Raspberry Pi 64 bits version of Ubuntu is used as operating system. Once overclocked to 1925 MHz, your app runs at 23 FPS without any hardware accelerator.\nSpecial made for a bare Raspberry Pi see: https://qengineering.eu/install-ubuntu-18.04-on-raspberry-pi-4.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.\n| Model | RPI 4 @1950 MHz - 64 OS |\n|  :------------: | :-------------: |\n|  Mobile_V1 Lite |  38.5 FPS |\n|  Mobile_V2 Lite |  45.5 FPS |\n|  Inception_V2 Lite |  10.0 FPS |\n|  Inception_V4 Lite |  2.0 FPS |\n\nWith a regular 32 bits Raspbian OS you get lower frame rates see: https://github.com/Qengineering/TensorFlow_Lite_Classification_RPi_32-bits \u003cbr/\u003e\n\n------------\n\n## Dependencies.\u003cbr/\u003e\nTo run the application, you have to:\n- 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) \u003cbr/\u003e\n- TensorFlow Lite framework installed. [Install TensorFlow Lite](https://qengineering.eu/install-tensorflow-2-lite-on-raspberry-64-os.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/TensorFlow_Lite_Classification_RPi_64-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\n\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_64-bits","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqengineering%2Ftensorflow_lite_classification_rpi_64-bits","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqengineering%2Ftensorflow_lite_classification_rpi_64-bits/lists"}