Skip to content

Releases: MeqdadDev/teachable-machine

v1.3.2

Choose a tag to compare

@MeqdadDev MeqdadDev released this 12 Sep 19:13

[1.3.2] - 2026-09-12

Fixed

  • Logo missing on the PyPI project page: README.md referenced the logo with a relative path (logo.png), which GitHub resolves against the repo but PyPI's rendered long description does not, so it showed as a broken image on pypi.org/project/teachable-machine. Switched to an absolute URL (raw.githubusercontent.com).
  • Corrected a leftover v1.3.0 reference in the TensorFlow/Keras compatibility note (README and docs site) to v1.3.1 — the fixes actually first shipped in v1.3.1, since the v1.3.0 release attempt failed to build and nothing was ever published to PyPI under that version (see the v1.3.1 entry below).

v1.3.1

Choose a tag to compare

@MeqdadDev MeqdadDev released this 12 Sep 19:03

[1.3.1] - 2026-09-12

Fixed

  • TensorFlow/Keras 3 compatibility: Teachable Machine's exported .h5 models embed a legacy DepthwiseConv2D layer config ('groups': 1) that current Keras (Keras 3, bundled by default since TensorFlow 2.16) rejects during deserialization, causing model loading to fail with TypeError/ValueError: Unrecognized keyword arguments passed to DepthwiseConv2D: {'groups': 1}. TeachableMachine now loads models with a compatibility shim that discards the unused key, so exported models work on up-to-date TensorFlow/Keras installs without pinning an old TensorFlow version. Fixes #2.
  • Nested-Sequential .h5 exports fail to load under Keras 3: some Teachable Machine .h5 exports save the model as a Sequential wrapping nested Sequential/Functional submodels. Keras 3's legacy H5 loader mis-rebuilds that shape (a Functional submodel's single output comes back as a length-1 list, which the next layer misreads as two inputs), previously surfacing as a misleading FileNotFoundError: Model file not found. TeachableMachine now falls back to a manual reconstruction that flattens the nested wrappers, rebuilds the graph via the Functional API, and restores weights by matching each layer's name against the saved weight paths.
  • Prediction annotation crashes on Windows / recent Pillow: show_prediction_on_image() used ImageFont.truetype("DejaVuSans-Bold.ttf", ...), not resolvable by bare name on Windows (OSError), and ImageDraw.textsize(), removed in Pillow 10+. Both are now handled: a ImageFont.load_default() fallback when the named font can't be found, and textbbox() in place of textsize(). Also fixed the highlight box behind the prediction label clipping text descenders (e.g. "g", "%") by measuring the box at the actual draw position instead of reusing an origin-measured extent.
  • Package build was broken: setup.py reads __version__ from src/__init__.py, but that file was never declared as package data, so it was missing from the sdist. Building the wheel from the sdist (as pypa/gh-action-pypi-publish's two-phase build does) then failed with FileNotFoundError, before any PyPI upload was attempted. Added MANIFEST.in to include it.

Changed

  • install_requires now specifies tensorflow>=2.16 (previously unpinned, which could silently resolve to a broken combination).
  • python_requires raised to >=3.9 to match current TensorFlow's supported Python range; removed unsupported 3.7/3.8 classifiers.
  • requirements.txt (dev/test) updated to current dependency versions and now includes pytest, pytest-mock, and h5py.

Added

  • Regression tests covering the legacy DepthwiseConv2D config shape, including an end-to-end test that saves a model, tampers its config to reproduce Teachable Machine's legacy export, and verifies it still loads and classifies correctly.
  • CI workflow to run the test suite on pushes/PRs, and a release workflow to publish to PyPI on tagged GitHub releases.

v1.2

Choose a tag to compare

@MeqdadDev MeqdadDev released this 17 Aug 13:18
634743f

Releasing a new version 1.2 for Teachable Machine for Python package

What's Changed:

  • Add classification result to the camera view
  • Add the possibility to classify and show the result at the same time
  • Refactoring the source code
  • Add unit tests
  • Build documentation (find it here)
  • Enhance error handling and messages
  • Design a logo for the package

Teachable Machine v1.1

Choose a tag to compare

@MeqdadDev MeqdadDev released this 15 Feb 18:57

Releasing Teachable Machine for Python package, v1.1

Features of this version:

  • Increase the package compatibility by updating the dependencies versions'
  • Getting the class names and confidence scores from Keras models
  • Adding more detailed results after classification process
  • Enhance error messages to be more specific
  • Refactoring the source code with modularized components

v1.0

Choose a tag to compare

@MeqdadDev MeqdadDev released this 19 Sep 11:32
2b9f18e

Releasing Teachable Machine for Python package, v1.0

Features of this version:

  • Running an Image Classification model created by Teachable Machine using Python. (keras model with h5 extension)
  • Working with frames using OpenCV.

Give it a try from here:
https://pypi.org/project/teachable-machine/

Full Changelog: https://github.com/MeqdadDev/teachable-machine/commits/v1.0