{"id":16463680,"url":"https://github.com/meqdaddev/teachable-machine","last_synced_at":"2026-03-03T15:04:04.638Z","repository":{"id":57473728,"uuid":"473646583","full_name":"MeqdadDev/teachable-machine","owner":"MeqdadDev","description":"A Python package designed to simplify the integration of exported models from Google's Teachable Machine platform into various environments.","archived":false,"fork":false,"pushed_at":"2024-12-04T20:59:27.000Z","size":2769,"stargazers_count":6,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-17T22:08:19.790Z","etag":null,"topics":["classification-algorithm","cnn-classification","deep-learning","deep-neural-networks","image-classification","image-processing","keras","machine-learning","opencv","opencv-python","python"],"latest_commit_sha":null,"homepage":"https://meqdaddev.github.io/teachable-machine/","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-24T14:42:36.000Z","updated_at":"2025-03-11T01:35:57.000Z","dependencies_parsed_at":"2024-08-14T14:46:30.782Z","dependency_job_id":null,"html_url":"https://github.com/MeqdadDev/teachable-machine","commit_stats":{"total_commits":13,"total_committers":1,"mean_commits":13.0,"dds":0.0,"last_synced_commit":"cabfd49a7f6a422a6dedf4a4d4617ed3a15139c6"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MeqdadDev%2Fteachable-machine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MeqdadDev%2Fteachable-machine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MeqdadDev%2Fteachable-machine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MeqdadDev%2Fteachable-machine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MeqdadDev","download_url":"https://codeload.github.com/MeqdadDev/teachable-machine/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244751194,"owners_count":20504236,"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":["classification-algorithm","cnn-classification","deep-learning","deep-neural-networks","image-classification","image-processing","keras","machine-learning","opencv","opencv-python","python"],"created_at":"2024-10-11T11:15:10.804Z","updated_at":"2026-03-03T15:04:04.483Z","avatar_url":"https://github.com/MeqdadDev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Teachable Machine\n_By: [Meqdad Darwish](https://github.com/MeqdadDev)_\n\n\n\u003cp align=\"center\"\u003e\n\u003cpicture\u003e\n  \u003cimg alt=\"Teachable Machine Package Logo\" src=\"logo.png\" width=\"50%\" height=\"50%\" \u003e\n\u003c/picture\u003e\n\u003c/p\u003e\n\n[![Downloads](https://static.pepy.tech/badge/teachable-machine)](https://pepy.tech/project/teachable-machine)\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)](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 \u003e= 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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeqdaddev%2Fteachable-machine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeqdaddev%2Fteachable-machine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeqdaddev%2Fteachable-machine/lists"}