explaingit

tensorflow/tfjs-models

Analysis updated 2026-06-24

14,783TypeScriptAudience · developerComplexity · 3/5LicenseSetup · easy

TLDR

Collection of pre-trained TensorFlow.js models (image, audio, text) packaged as npm libraries you can call from a browser or Node project.

Mindmap

mindmap
  root((tfjs-models))
    Inputs
      Images
      Audio clips
      Text
      Video frames
    Outputs
      Classifications
      Embeddings
      Keypoints and poses
      Segmentation masks
    Use Cases
      Add ML to a web app
      Run pose detection in browser
      Compute text embeddings
      Transfer-learn on small data
    Tech Stack
      TensorFlow.js
      TypeScript
      JavaScript
      WebGL
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Add body or hand pose detection to a webcam-based browser app

USE CASE 2

Run object detection or image classification entirely client-side

USE CASE 3

Compute sentence embeddings in the browser for semantic search

USE CASE 4

Transfer-learn MobileNet on your own image categories

What is it built with?

TensorFlow.jsTypeScriptJavaScriptWebGLNode.js

How does it compare?

tensorflow/tfjs-modelsvercel-labs/json-renderglips/figma-context-mcp
Stars14,78314,77514,741
LanguageTypeScriptTypeScriptTypeScript
Last pushed2026-05-20
MaintenanceMaintained
Setup difficultyeasymoderateeasy
Complexity3/54/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 30min

Each sub-model has its own npm package and API, pick from the README table rather than installing the root.

Apache-2.0: free to use, modify, and distribute with attribution, includes an explicit patent grant.

In plain English

tfjs-models is a Google-maintained collection of pre-trained machine learning models that have been ported to TensorFlow.js, the JavaScript version of the TensorFlow library. The point is that the models are already trained, so a developer can drop them into a web page or Node project and call them without needing to know how to train a model from scratch. They are published on NPM and unpkg, so any project can install them out of the box. The README says the models can be used directly, or in a transfer-learning setup where someone fine-tunes them with their own data. Each model lives in its own subdirectory with its own README and its own API. The maintainers say they try to hide the underlying tensors from the API so people who are not machine learning experts can still use the code. A large table in the README lists what is available. For images, there is MobileNet for classifying images against the ImageNet label set, hand-pose detection, body pose detection, Coco SSD for object detection, DeepLab v3 for semantic segmentation, and face landmark detection for inferring the 3D geometry of a face in real time. For audio, there is a speech-commands model that classifies one-second clips. For text, there is the Universal Sentence Encoder, which turns text into a 512-dimensional embedding, and a toxicity model that scores comments. Other entries include portrait depth estimation, which estimates per-pixel distance from a single portrait image, and general utilities such as a K-Nearest-Neighbors classifier. Each row lists a live demo, a source link, a short description, and an npm install command. People interested in adding a new model are asked to file an issue on the main tfjs repo first.

Copy-paste prompts

Prompt 1
Set up a webpage that runs pose-detection on the webcam using tfjs-models
Prompt 2
Use coco-ssd from tfjs-models to draw bounding boxes on an uploaded image
Prompt 3
Compute sentence embeddings with universal-sentence-encoder and cluster them client-side
Prompt 4
Show how to do transfer learning on MobileNet with the KNN classifier helper

Frequently asked questions

What is tfjs-models?

Collection of pre-trained TensorFlow.js models (image, audio, text) packaged as npm libraries you can call from a browser or Node project.

What language is tfjs-models written in?

Mainly TypeScript. The stack also includes TensorFlow.js, TypeScript, JavaScript.

What license does tfjs-models use?

Apache-2.0: free to use, modify, and distribute with attribution, includes an explicit patent grant.

How hard is tfjs-models to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is tfjs-models for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.