{"id":14959057,"url":"https://github.com/qengineering/tensorflow_lite_classification_rpi_zero","last_synced_at":"2025-10-24T16:30:49.865Z","repository":{"id":112948135,"uuid":"381997256","full_name":"Qengineering/TensorFlow_Lite_Classification_RPi_zero","owner":"Qengineering","description":"TensorFlow Lite on a bare Raspberry Pi Zero","archived":false,"fork":false,"pushed_at":"2022-11-07T14:16:18.000Z","size":856,"stargazers_count":14,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-31T03:01:35.473Z","etag":null,"topics":["armv6","cpp","deep-learning","mobilenet","raspberry-pi-zero","raspberry-pi-zero-w","tensoflow-lite","tensorflow-examples"],"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":"2021-07-01T10:35:47.000Z","updated_at":"2025-01-28T08:27:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"e39609e8-b22f-4e31-80b4-86311ead5fa5","html_url":"https://github.com/Qengineering/TensorFlow_Lite_Classification_RPi_zero","commit_stats":{"total_commits":8,"total_committers":1,"mean_commits":8.0,"dds":0.0,"last_synced_commit":"cc31514de7fcbf8714cc35bb64b24eeb1b36561d"},"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_zero","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qengineering%2FTensorFlow_Lite_Classification_RPi_zero/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qengineering%2FTensorFlow_Lite_Classification_RPi_zero/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qengineering%2FTensorFlow_Lite_Classification_RPi_zero/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Qengineering","download_url":"https://codeload.github.com/Qengineering/TensorFlow_Lite_Classification_RPi_zero/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237999539,"owners_count":19399903,"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":["armv6","cpp","deep-learning","mobilenet","raspberry-pi-zero","raspberry-pi-zero-w","tensoflow-lite","tensorflow-examples"],"created_at":"2024-09-24T13:18:46.699Z","updated_at":"2025-10-24T16:30:44.201Z","avatar_url":"https://github.com/Qengineering.png","language":"C++","readme":"# TensorFlow_Lite_Classification_RPi_zero\n![output image]( https://qengineering.eu/images/Schoolbus2.png )\n## TensorFlow Lite classification running on a bare Raspberry Pi Zero\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 zero.\u003cbr\u003e\nBe noted that we use the zero version here, not the new Raspberry Pi zero 2.\u003cbr/\u003e\nInference time: 11 sec\u003cbr/\u003e\nSpecial made for a Jetson Nano 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\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#Zero) \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_zero/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_zero","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqengineering%2Ftensorflow_lite_classification_rpi_zero","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqengineering%2Ftensorflow_lite_classification_rpi_zero/lists"}