{"id":15015477,"url":"https://github.com/teticio/kivy-tensorflow-helloworld","last_synced_at":"2025-10-04T08:56:05.999Z","repository":{"id":110666321,"uuid":"354806998","full_name":"teticio/kivy-tensorflow-helloworld","owner":"teticio","description":"Run inference with Tensorflow Lite on iOS, Android, MacOS, Windows and Linux using Python.","archived":false,"fork":false,"pushed_at":"2023-03-17T13:03:15.000Z","size":71,"stargazers_count":49,"open_issues_count":0,"forks_count":13,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-12T09:15:17.816Z","etag":null,"topics":["android","ios","kivy","tensorflow-lite"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/teticio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-04-05T11:09:01.000Z","updated_at":"2025-01-20T07:38:25.000Z","dependencies_parsed_at":"2023-05-03T09:31:52.443Z","dependency_job_id":null,"html_url":"https://github.com/teticio/kivy-tensorflow-helloworld","commit_stats":{"total_commits":18,"total_committers":3,"mean_commits":6.0,"dds":"0.33333333333333337","last_synced_commit":"d4946b9f90a13a25b6856a23da0815509ec95bf8"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teticio%2Fkivy-tensorflow-helloworld","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teticio%2Fkivy-tensorflow-helloworld/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teticio%2Fkivy-tensorflow-helloworld/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teticio%2Fkivy-tensorflow-helloworld/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/teticio","download_url":"https://codeload.github.com/teticio/kivy-tensorflow-helloworld/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248543838,"owners_count":21121838,"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":["android","ios","kivy","tensorflow-lite"],"created_at":"2024-09-24T19:47:31.399Z","updated_at":"2025-10-04T08:56:00.944Z","avatar_url":"https://github.com/teticio.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kivy Tensorflow Hello World\n\nThis is a \"Hello World\" for running Tensorflow Lite on iOS, Android, MacOS, Windows and Linux using Python and Kivy.\n\n## Create a Tensorflow Lite model\n\nYou can use the Jupyter notebook in notebooks to create a Tensorflow Lite model file. A dummy example is provided for testing purposes.\n\n## Install buildozer\n\nInstall basic Python requirements (all platforms)\n\n```bash\npip install buildozer cython\n```\n\nFollow the instructions for your platform [here](https://pypi.org/project/buildozer/).\n\n## MacOS, Windows and Linux\n\n```bash\npip install tensorflow numpy kivy\npython3 main.py\n```\n\n## Android\n\nCurrently you can only build for Android using `buildozer` on Linux.\n\nUse the included `buildozer.spec` file or make the following changes to one created by `buildozer init`\n\n```\nsource.include_exts = py,png,jpg,kv,atlas,tflite\nrequirements = python3,kivy,numpy\nandroid.api = 30\nandroid.minapi = 24\nandroid.gradle_dependencies = org.tensorflow:tensorflow-lite:+,org.tensorflow:tensorflow-lite-support:+\n```\n\nNote that if your `tflite` model file is too big to be packaged with your APK, you will have to find some other way of getting it on to the device. If this is the case then change this line to ensure it is not included in the package.\n\n```\nsource.include_exts = py,png,jpg,kv,atlas\n```\n\nChange the architecture you are building for to match that of your device or emulator\n\n```\nandroid.arch = x86\n```\n\nBuild the APK\n\n```bash\nbuildozer android debug\n```\n\nand install it with\n\n```bash\nadb install bin/myapp-0.1-x86-debug.apk\n```\n\n## iOS\n\nRemember that you will need an Apple developer account to be able to install your app on a real iPhone.\n\nInstall prerequisite system packages\n\n```bash\nbrew install cocoapods pkg-config autoconf automake\n```\n\nInstall additional Python requirements\n\n```bash\npip install pbxproj cookiecutter\n```\n\nBuild your app and install the Tensorflow Lite pod\n\n```bash\nbuildozer ios debug\ncd .buildozer/ios/platform/kivy-ios/myapp-ios/\ncp YourApp/Podfile .\npod install\nopen -a Xcode myapp.xcworkspace\n```\n\nAs indicated in the warning messages, you will need to make some changes to the project configuration. You can either do this by editing `myapp-ios\\myapp.xcodeproj` or by editing the Build Settings for `myapp` in Xcode. Search for `GCC_PREPROCESSOR_DEFINITIONS` and add `$(inherited)` to the Debug target. Then repeat the process for `HEADER_SEARCH_PATHS`, `OTHER_LDFLAGS` and (possibly) `EXCLUDED_ARCHS[sdk=iphonesimulator*]` for all targets. Now you should be able to build and run your app. All being well you should see the following output (give or take rounding errors)\n\n```python\n[[ 0.01647118,  1.0278152 , -0.7065112 , -1.0278157 ,  0.12216613, 0.37980393,  0.5839217 , -0.04283606, -0.04240461, -0.58534086 ]]\n```\n\nEvery time you build you will need to run `buildozer ios debug` and then build and deploy from Xcode.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteticio%2Fkivy-tensorflow-helloworld","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteticio%2Fkivy-tensorflow-helloworld","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteticio%2Fkivy-tensorflow-helloworld/lists"}