Skip to content
Pretrained models for TensorFlow.js
Branch: master
Clone or download
caisq Various fixes to unit-test infra and speech-commands (#176)
- General unit-test infrastructure fix:
  - Let test_util.ts pick up only files in the respective `src/` directories of the models
- speech-commands
  - Upgrade to tfjs and tfjs-node 1.0.2
  - Name the dense layer of the new head explicitly
  - Add NODE_OPTIONS to cross-env to prevent out-of-heap-memory error during `yarn watch` and `yarn build`
Latest commit dbc132b Mar 24, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode Generalize KNN Image Classifier to KNN Classifier, taking an arbitrar… Jun 19, 2018
body-pix Update docs for body-pix and toxicity. (#169) Mar 9, 2019
coco-ssd Update bodypix, cocossd, knn-classifier, posenet to depend on tfjs 1.0 ( Mar 6, 2019
knn-classifier Update bodypix, cocossd, knn-classifier, posenet to depend on tfjs 1.0 ( Mar 6, 2019
mobilenet Update versions of tfjs and mobilenet in the example code (#174) Mar 19, 2019
posenet Update bodypix, cocossd, knn-classifier, posenet to depend on tfjs 1.0 ( Mar 6, 2019
speech-commands Various fixes to unit-test infra and speech-commands (#176) Mar 24, 2019
toxicity Update toxicity demo per reviewer feedback. (#172) Mar 14, 2019
universal-sentence-encoder Depend on tfjs 1.0 in USE. (#164) Mar 6, 2019
.gitignore
.travis.yml
CONTRIBUTING.md Add license and contributing Apr 30, 2018
LICENSE
README.md Document coco SSD and speech commands from the root readme. (#95) Nov 7, 2018
package.json
presubmit.ts Update models to use latest 0.x (#156) Feb 26, 2019
run_python_tests.sh Initial check in of the speech-commands project (#50) Jul 25, 2018
test_util.ts
tslint.json
yarn.lock

README.md

Pre-trained TensorFlow.js models

This repository hosts a set of pre-trained models that have been ported to TensorFlow.js.

The models are hosted on NPM and unpkg so they can be used in any project out of the box. They can be used directly or used in a transfer learning setting with TensorFlow.js.

To find out about APIs for models, look at the README in each of the respective directories. In general, we try to hide tensors so the API can be used by non-machine learning experts.

For those intested in contributing a model, please file a GitHub issue on tfjs to gauge interest. We are trying to add models that complement the existing set of models and can be used as building blocks in other apps.

Models

Image

Audio

General utilities

  • KNN Classifier - Create a custom k-nearest neighbors classifier. Can be used for transfer learning.
    • npm i @tensorflow-models/knn-classifier

Development

You can run the unit tests for any of the models by running the following inside a directory:

yarn test

New models should have a test NPM script.

To run all of the tests, you can run the following command from the root of this repo:

yarn presubmit

You can’t perform that action at this time.