Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/meqdaddev/teachable-machine-lite
A Python package to simplify the deployment process of exported Teachable Machine models into different Robotics, AI and IoT controllers such as: Raspberry Pi, Jetson Nano and any other SBCs using TensorFlowLite framework.
https://github.com/meqdaddev/teachable-machine-lite
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
Last synced: about 2 months ago
JSON representation
A Python package to simplify the deployment process of exported Teachable Machine models into different Robotics, AI and IoT controllers such as: Raspberry Pi, Jetson Nano and any other SBCs using TensorFlowLite framework.
- Host: GitHub
- URL: https://github.com/meqdaddev/teachable-machine-lite
- Owner: MeqdadDev
- License: mit
- Created: 2022-03-25T15:40:36.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-24T20:04:01.000Z (4 months ago)
- Last Synced: 2024-10-12T11:15:02.443Z (2 months ago)
- 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
- Language: Python
- Homepage: https://pypi.org/project/teachable-machine-lite/
- Size: 41 KB
- Stars: 10
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Teachable Machine Lite
[![MIT License](https://img.shields.io/badge/License-MIT-green.svg)](https://choosealicense.com/licenses/mit/)
[![Downloads](https://static.pepy.tech/badge/teachable-machine-lite)](https://pepy.tech/project/teachable-machine-lite)
[![PyPI](https://img.shields.io/pypi/v/teachable-machine-lite)](https://pypi.org/project/teachable-machine-lite/)## Description
A Python package to simplify the deployment process of exported [Teachable Machine](https://teachablemachine.withgoogle.com/) models into different Robotics, AI and IoT controllers such as: Raspberry Pi, Jetson Nano and any other SBCs using TensorFlowLite framework.
Developed by [@MeqdadDev](https://www.github.com/MeqdadDev)
## Supported Classifiers
**Image Classification**: use exported and quantized TensorFlow Lite model from [Teachable Machine platfrom](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 (PIL)
```## How to Use Teachable Machine Lite Package
```python
from teachable_machine_lite import TeachableMachineLite
import cv2 as cvcap = cv.VideoCapture(0)
model_path = 'model.tflite'
image_file_name = "frame.jpg"
labels_path = "labels.txt"tm_model = TeachableMachineLite(model_path=model_path, labels_file_path=labels_path)
while True:
ret, frame = cap.read()
cv.imshow('Cam', frame)
cv.imwrite(image_file_name, frame)
results = tm_model.classify_frame(image_file_name)
print("results:",results)
k = cv.waitKey(1)
if k% 255 == 27:
# press ESC to close camera view.
break
```## Links:
[PyPI](https://pypi.org/project/teachable-machine-lite/)
[Source Code](https://github.com/MeqdadDev/teachable-machine-lite)
[Developer Profile](https://github.com/MeqdadDev)