Name | teachable-machine-lite JSON |
Version |
1.2.0.1
JSON |
| download |
home_page | https://github.com/MeqdadDev/teachable-machine-lite/ |
Summary | 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 applications. With a focus on efficiency and minimal dependencies, this tool maintains the core functionality while being more suitable for robotics and IoT projects. |
upload_time | 2024-11-18 07:04:15 |
maintainer | None |
docs_url | None |
author | Meqdad Dev |
requires_python | >=3.7 |
license | None |
keywords |
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Teachable Machine Lite
_By: [Meqdad Darwish](https://github.com/MeqdadDev)_
<p align="center">
<picture>
<img alt="Teachable Machine Lite Package Logo" src="https://meqdaddev.github.io/teachable-machine-lite/logo.png" width="80%" height="80%" >
</picture>
</p>
[](https://pepy.tech/project/teachable-machine-lite)
[](https://choosealicense.com/licenses/mit/)
[](https://pypi.org/project/teachable-machine-lite/)
## Description
A 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.
Source Code is published on [GitHub](https://github.com/MeqdadDev/teachable-machine-lite/)
Read more about the project (requirements, installation, examples and more) in the [Documentation Website](https://meqdaddev.github.io/teachable-machine-lite/)
## Supported Classifiers
**Image Classification**: Use exported and quantized TensorFlow Lite model from [Teachable Machine Platform](https://teachablemachine.withgoogle.com/) (a model file with `tflite` extension).
## Requirements
```
Python >= 3.7
```
## How to install Teachable Machine Lite Package
```bash
pip install teachable-machine-lite
```
## Dependencies
```bash
numpy
tflite-runtime
Pillow
```
## Example
An example for teachable machine lite package with OpenCV:
```python
from teachable_machine_lite import TeachableMachineLite
import cv2 as cv
cap = cv.VideoCapture(0)
model_path = "model.tflite"
labels_path = "labels.txt"
image_file_name = "screenshot.jpg"
tm_model = TeachableMachineLite(model_path=model_path, labels_file_path=labels_path)
while True:
ret, img = cap.read()
cv.imwrite(image_file_name, img)
results, resultImage = tm_model.classify_and_show(image_file_name, convert_to_bgr=True)
print("results:", results)
cv.imshow("Camera", resultImage)
k = cv.waitKey(1)
if k == 27: # Press ESC to close the camera view
break
cap.release()
cv.destroyAllWindows()
```
Values of `results` are assigned based on the content of `labels.txt` file.
For more; take a look on [these examples](https://meqdaddev.github.io/teachable-machine-lite/codeExamples/)
## Links:
### Links:
- [Documentation](https://meqdaddev.github.io/teachable-machine-lite)
- [PyPI](https://pypi.org/project/teachable-machine-lite/)
- [Source Code](https://github.com/MeqdadDev/teachable-machine-lite)
- [Teachable Machine Platform](https://teachablemachine.withgoogle.com/)
Raw data
{
"_id": null,
"home_page": "https://github.com/MeqdadDev/teachable-machine-lite/",
"name": "teachable-machine-lite",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": null,
"author": "Meqdad Dev",
"author_email": "meqdad.darweesh@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/70/f5/46b5a3258dbf9ff6246b8adee74374d7912f911cbc448ea2edf6569eed69/teachable_machine_lite-1.2.0.1.tar.gz",
"platform": null,
"description": "# Teachable Machine Lite\n_By: [Meqdad Darwish](https://github.com/MeqdadDev)_\n\n<p align=\"center\">\n<picture>\n <img alt=\"Teachable Machine Lite Package Logo\" src=\"https://meqdaddev.github.io/teachable-machine-lite/logo.png\" width=\"80%\" height=\"80%\" >\n</picture>\n</p>\n\n[](https://pepy.tech/project/teachable-machine-lite)\n[](https://choosealicense.com/licenses/mit/)\n[](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\n```\nPython >= 3.7\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### 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/)\n",
"bugtrack_url": null,
"license": null,
"summary": "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 applications. With a focus on efficiency and minimal dependencies, this tool maintains the core functionality while being more suitable for robotics and IoT projects.",
"version": "1.2.0.1",
"project_urls": {
"Homepage": "https://github.com/MeqdadDev/teachable-machine-lite/"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b55dcb59b0668671f7f574bddbfa48cb292e84c97071198ca23b43e1c24f4be8",
"md5": "0aafadf760a21f6206485cf6e1c9f7ef",
"sha256": "35901f6ae9460e097c11a46ce68fb30c47879141db735048043b29b0be5d792b"
},
"downloads": -1,
"filename": "teachable_machine_lite-1.2.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0aafadf760a21f6206485cf6e1c9f7ef",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 7232,
"upload_time": "2024-11-18T07:04:14",
"upload_time_iso_8601": "2024-11-18T07:04:14.049287Z",
"url": "https://files.pythonhosted.org/packages/b5/5d/cb59b0668671f7f574bddbfa48cb292e84c97071198ca23b43e1c24f4be8/teachable_machine_lite-1.2.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "70f546b5a3258dbf9ff6246b8adee74374d7912f911cbc448ea2edf6569eed69",
"md5": "48fa678434b0792a3a55b9a6e6a81286",
"sha256": "1b4f7d806f7da9f7dae8129e4225f6644e9a190cdc0ca17c3b0c4737ca4964d5"
},
"downloads": -1,
"filename": "teachable_machine_lite-1.2.0.1.tar.gz",
"has_sig": false,
"md5_digest": "48fa678434b0792a3a55b9a6e6a81286",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 6927,
"upload_time": "2024-11-18T07:04:15",
"upload_time_iso_8601": "2024-11-18T07:04:15.423247Z",
"url": "https://files.pythonhosted.org/packages/70/f5/46b5a3258dbf9ff6246b8adee74374d7912f911cbc448ea2edf6569eed69/teachable_machine_lite-1.2.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-18 07:04:15",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "MeqdadDev",
"github_project": "teachable-machine-lite",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "teachable-machine-lite"
}