{"id":16463687,"url":"https://github.com/meqdaddev/teachable-machine-lite","last_synced_at":"2025-03-21T06:31:55.388Z","repository":{"id":57473725,"uuid":"474068966","full_name":"MeqdadDev/teachable-machine-lite","owner":"MeqdadDev","description":"A lightweight Python package optimized for integrating exported models from Google's Teachable Machine Platform into robotics and embedded systems environments. This streamlined version of Teachable Machine Package is specifically designed for resource-constrained devices, making it easier to deploy and use your trained models in embedded apps.","archived":false,"fork":false,"pushed_at":"2024-11-18T09:41:27.000Z","size":2791,"stargazers_count":9,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-17T22:08:19.771Z","etag":null,"topics":["deep-learning","deep-neural-networks","image-classification","machine-learning","opencv","opencv-python","pypi","pypi-package","python","raspberry-pi","teachable-machine","tensorflow","tensorflow2","tensorflowlite","tensorflowlite-for-microcontrollers","tflite"],"latest_commit_sha":null,"homepage":"https://meqdaddev.github.io/teachable-machine-lite/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MeqdadDev.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":"2022-03-25T15:40:36.000Z","updated_at":"2025-03-09T01:34:49.000Z","dependencies_parsed_at":"2024-11-18T01:20:07.506Z","dependency_job_id":null,"html_url":"https://github.com/MeqdadDev/teachable-machine-lite","commit_stats":{"total_commits":6,"total_committers":1,"mean_commits":6.0,"dds":0.0,"last_synced_commit":"0e3359f90bcd5f0e2b9a8b740ffb3b73797974e7"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MeqdadDev%2Fteachable-machine-lite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MeqdadDev%2Fteachable-machine-lite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MeqdadDev%2Fteachable-machine-lite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MeqdadDev%2Fteachable-machine-lite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MeqdadDev","download_url":"https://codeload.github.com/MeqdadDev/teachable-machine-lite/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244751221,"owners_count":20504238,"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":["deep-learning","deep-neural-networks","image-classification","machine-learning","opencv","opencv-python","pypi","pypi-package","python","raspberry-pi","teachable-machine","tensorflow","tensorflow2","tensorflowlite","tensorflowlite-for-microcontrollers","tflite"],"created_at":"2024-10-11T11:15:11.159Z","updated_at":"2025-03-21T06:31:55.382Z","avatar_url":"https://github.com/MeqdadDev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Teachable Machine Lite\n_By: [Meqdad Darwish](https://github.com/MeqdadDev)_\n\n\u003cp align=\"center\"\u003e\n\u003cpicture\u003e\n  \u003cimg alt=\"Teachable Machine Lite Package Logo\" src=\"https://meqdaddev.github.io/teachable-machine-lite/logo.png\" width=\"80%\" height=\"80%\" \u003e\n\u003c/picture\u003e\n\u003c/p\u003e\n\n[![Downloads](https://static.pepy.tech/badge/teachable-machine-lite)](https://pepy.tech/project/teachable-machine-lite)\n[![MIT License](https://img.shields.io/badge/License-MIT-green.svg)](https://choosealicense.com/licenses/mit/)\n[![PyPI](https://img.shields.io/pypi/v/teachable-machine-lite)](https://pypi.org/project/teachable-machine-lite/)\n\n## Description\n\nA lightweight Python package optimized for integrating exported models from Google's [Teachable Machine Platform](https://teachablemachine.withgoogle.com/) into robotics and embedded systems environments. This streamlined version of [Teachable Machine Package](https://github.com/MeqdadDev/teachable-machine) is specifically designed for resource-constrained devices, making it easier to deploy and use your trained models in embedded applications. With a focus on efficiency and minimal dependencies, this tool maintains the core functionality while being more suitable for robotics and IoT projects.\n\nSource Code is published on [GitHub](https://github.com/MeqdadDev/teachable-machine-lite/)\n\nRead more about the project (requirements, installation, examples and more) in the [Documentation Website](https://meqdaddev.github.io/teachable-machine-lite/) \n\n## Supported Classifiers\n\n**Image Classification**: Use exported and quantized TensorFlow Lite model from [Teachable Machine Platform](https://teachablemachine.withgoogle.com/) (a model file with `tflite` extension).\n\n\n## Requirements\n\nFor detailed information about package requirements and dependencies, please visit our [documentation](https://meqdaddev.github.io/teachable-machine-lite/requirements/)\n\n```\nPython \u003e= 3.9\n```\n\n```\nnumpy \u003c 2.0 (v1.26.4 recommended)\n```\n\n## How to install Teachable Machine Lite Package\n\n```bash\npip install teachable-machine-lite\n```\n\n## Dependencies\n\n```bash\nnumpy\ntflite-runtime\nPillow\n```\n\n## Example\n\nAn example for teachable machine lite package with OpenCV:\n\n```python\nfrom teachable_machine_lite import TeachableMachineLite\nimport cv2 as cv\n\ncap = cv.VideoCapture(0)\n\nmodel_path = \"model.tflite\"\nlabels_path = \"labels.txt\"\nimage_file_name = \"screenshot.jpg\"\n\ntm_model = TeachableMachineLite(model_path=model_path, labels_file_path=labels_path)\n\nwhile True:\n    ret, img = cap.read()\n    cv.imwrite(image_file_name, img)\n\n    results, resultImage = tm_model.classify_and_show(image_file_name, convert_to_bgr=True)\n    print(\"results:\", results)\n\n    cv.imshow(\"Camera\", resultImage)\n    k = cv.waitKey(1)\n    if k == 27:  # Press ESC to close the camera view\n        break\n\ncap.release()\ncv.destroyAllWindows()\n```\nValues of `results` are assigned based on the content of `labels.txt` file.\n\nFor more; take a look on [these examples](https://meqdaddev.github.io/teachable-machine-lite/codeExamples/)\n\n## Links:\n\n- [Documentation](https://meqdaddev.github.io/teachable-machine-lite)\n\n- [PyPI](https://pypi.org/project/teachable-machine-lite/)\n\n- [Source Code](https://github.com/MeqdadDev/teachable-machine-lite)\n\n- [Teachable Machine Platform](https://teachablemachine.withgoogle.com/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeqdaddev%2Fteachable-machine-lite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeqdaddev%2Fteachable-machine-lite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeqdaddev%2Fteachable-machine-lite/lists"}