Name | teachable-machine JSON |
Version |
1.2.1
JSON |
| download |
home_page | https://github.com/MeqdadDev/teachable-machine |
Summary | A Python package designed to simplify the integration of exported models from Google's Teachable Machine platform into various environments. This tool was specifically crafted to work seamlessly with Teachable Machine, making it easier to implement and use your trained models. |
upload_time | 2024-08-18 12:05:59 |
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
_By: [Meqdad Darwish](https://github.com/MeqdadDev)_
<p align="center">
<picture>
<img alt="Teachable Machine Package Logo" src="https://meqdaddev.github.io/teachable-machine/logo.png" width="80%" height="80%" >
</picture>
</p>
[](https://pepy.tech/project/teachable-machine)
[](https://choosealicense.com/licenses/mit/)
[](https://pypi.org/project/teachable-machine/)
A Python package designed to simplify the integration of exported models from Google's [Teachable Machine](https://teachablemachine.withgoogle.com/) platform into various environments.
This tool was specifically crafted to work seamlessly with Teachable Machine, making it easier to implement and use your trained models.
Source Code is published on [GitHub](https://github.com/MeqdadDev/teachable-machine)
Read more about the project (requirements, installation, examples and more) in the [Documentation Website](https://meqdaddev.github.io/teachable-machine/)
## Supported Classifiers
**Image Classification**: use exported keras model from Teachable Machine platform.
## Requirements
``` Python >= 3.7 ```
## How to install package
```bash
pip install teachable-machine
```
## Example
An example for teachable machine package with OpenCV:
```python
from teachable_machine import TeachableMachine
import cv2 as cv
cap = cv.VideoCapture(0)
model = TeachableMachine(model_path="keras_model.h5",
labels_file_path="labels.txt")
image_path = "screenshot.jpg"
while True:
_, img = cap.read()
cv.imwrite(image_path, img)
result, resultImage = model.classify_and_show(image_path)
print("class_index", result["class_index"])
print("class_name:::", result["class_name"])
print("class_confidence:", result["class_confidence"])
print("predictions:", result["predictions"])
cv.imshow("Video Stream", resultImage)
k = cv.waitKey(1)
if k == 27: # Press ESC to close the camera view
break
cap.release()
cv.destroyAllWindows()
```
Values of `result` are assigned based on the content of `labels.txt` file.
For more; take a look on [these examples](https://meqdaddev.github.io/teachable-machine/codeExamples/)
### Links:
- [Documentation](https://meqdaddev.github.io/teachable-machine)
- [PyPI](https://pypi.org/project/teachable-machine/)
- [Source Code](https://github.com/MeqdadDev/teachable-machine)
- [Teachable Machine Platform](https://teachablemachine.withgoogle.com/)
Raw data
{
"_id": null,
"home_page": "https://github.com/MeqdadDev/teachable-machine",
"name": "teachable-machine",
"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/0c/db/94c7545f0ef8f8a3d10781df06a653fabb2cb8e9b7c19af77cc64d78bb2e/teachable_machine-1.2.1.tar.gz",
"platform": null,
"description": "# Teachable Machine\n_By: [Meqdad Darwish](https://github.com/MeqdadDev)_\n\n\n<p align=\"center\">\n<picture>\n <img alt=\"Teachable Machine Package Logo\" src=\"https://meqdaddev.github.io/teachable-machine/logo.png\" width=\"80%\" height=\"80%\" >\n</picture>\n</p>\n\n[](https://pepy.tech/project/teachable-machine)\n[](https://choosealicense.com/licenses/mit/)\n[](https://pypi.org/project/teachable-machine/)\n\nA Python package designed to simplify the integration of exported models from Google's [Teachable Machine](https://teachablemachine.withgoogle.com/) platform into various environments.\nThis tool was specifically crafted to work seamlessly with Teachable Machine, making it easier to implement and use your trained models.\n\nSource Code is published on [GitHub](https://github.com/MeqdadDev/teachable-machine)\n\nRead more about the project (requirements, installation, examples and more) in the [Documentation Website](https://meqdaddev.github.io/teachable-machine/) \n\n## Supported Classifiers\n\n**Image Classification**: use exported keras model from Teachable Machine platform.\n\n## Requirements\n\n``` Python >= 3.7 ```\n\n## How to install package\n\n```bash\npip install teachable-machine\n```\n\n## Example\n\nAn example for teachable machine package with OpenCV:\n\n```python\nfrom teachable_machine import TeachableMachine\nimport cv2 as cv\n\ncap = cv.VideoCapture(0)\nmodel = TeachableMachine(model_path=\"keras_model.h5\",\n labels_file_path=\"labels.txt\")\n\nimage_path = \"screenshot.jpg\"\n\nwhile True:\n _, img = cap.read()\n cv.imwrite(image_path, img)\n\n result, resultImage = model.classify_and_show(image_path)\n\n print(\"class_index\", result[\"class_index\"])\n\n print(\"class_name:::\", result[\"class_name\"])\n\n print(\"class_confidence:\", result[\"class_confidence\"])\n\n print(\"predictions:\", result[\"predictions\"])\n\n cv.imshow(\"Video Stream\", resultImage)\n\n k = cv.waitKey(1)\n if k == 27: # Press ESC to close the camera view\n break\n \ncap.release()\ncv.destroyAllWindows()\n```\n\nValues of `result` 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/codeExamples/)\n\n### Links:\n\n- [Documentation](https://meqdaddev.github.io/teachable-machine)\n\n- [PyPI](https://pypi.org/project/teachable-machine/)\n\n- [Source Code](https://github.com/MeqdadDev/teachable-machine)\n\n- [Teachable Machine Platform](https://teachablemachine.withgoogle.com/)\n\n\n",
"bugtrack_url": null,
"license": null,
"summary": "A Python package designed to simplify the integration of exported models from Google's Teachable Machine platform into various environments. This tool was specifically crafted to work seamlessly with Teachable Machine, making it easier to implement and use your trained models.",
"version": "1.2.1",
"project_urls": {
"Homepage": "https://github.com/MeqdadDev/teachable-machine"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "8ea3d6a4ba57b80596fb950b20ee7549979128ceb2411cd94674a1332a18ac88",
"md5": "145e5059c56c9d439e56fceee5234a83",
"sha256": "039d9978f5df7078180d7ab6c56c2659a6037251ad16b9f003ce72914bec70cf"
},
"downloads": -1,
"filename": "teachable_machine-1.2.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "145e5059c56c9d439e56fceee5234a83",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 5350,
"upload_time": "2024-08-18T12:05:57",
"upload_time_iso_8601": "2024-08-18T12:05:57.640503Z",
"url": "https://files.pythonhosted.org/packages/8e/a3/d6a4ba57b80596fb950b20ee7549979128ceb2411cd94674a1332a18ac88/teachable_machine-1.2.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0cdb94c7545f0ef8f8a3d10781df06a653fabb2cb8e9b7c19af77cc64d78bb2e",
"md5": "462fcf4f14b237445ee08ab9faa443de",
"sha256": "d6f7b6cdfe3a65320195b21408352f265d7ea282b7d6824c5030d8d63e89fae0"
},
"downloads": -1,
"filename": "teachable_machine-1.2.1.tar.gz",
"has_sig": false,
"md5_digest": "462fcf4f14b237445ee08ab9faa443de",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 5112,
"upload_time": "2024-08-18T12:05:59",
"upload_time_iso_8601": "2024-08-18T12:05:59.015574Z",
"url": "https://files.pythonhosted.org/packages/0c/db/94c7545f0ef8f8a3d10781df06a653fabb2cb8e9b7c19af77cc64d78bb2e/teachable_machine-1.2.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-18 12:05:59",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "MeqdadDev",
"github_project": "teachable-machine",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "teachable-machine"
}