A Python package to simplify the deployment process of exported
Project description
Teachable Machine Lite
Description
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.
Developed by @MeqdadDev
Supported Classifiers
Image Classification: use exported and quantized TensorFlow Lite model from Teachable Machine platfrom (a model file with tflite
extension).
Requirements
Python >= 3.7
How to install package
pip install teachable-machine-lite
Dependencies
numpy
tflite-runtime
Pillow (PIL)
How to Use Teachable Machine Lite Package
from teachable_machine_lite import TeachableMachineLite
import cv2 as cv
cap = 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:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for teachable-machine-lite-1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ea5d14e462b695c59d49093326db3323c9eb3299d03a531030ed4e6db75613d |
|
MD5 | fb3b520283e23ade125ab0edf3363987 |
|
BLAKE2b-256 | 0abc4612ce5e0a3cce31b6b93c5e0cc660a85613e052a505f91ced0738cb13b6 |
Close
Hashes for teachable_machine_lite-1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9103042f245a7661e54ec12ba07fb870c026a10cd5d4f08d701177b54a614ced |
|
MD5 | 3a3f4bb52a00371a4e7c91ac802ff0d2 |
|
BLAKE2b-256 | ec53442371c2bd684494ffa9edfcfbed6394ff29346c00dcc41b704b6be5b7be |