liveBook · Manning

TensorFlow.js

As explained in Web Components in Action

TensorFlow.js is a JavaScript library for developing and executing machine-learning models in web browsers and other JavaScript environments.

TensorFlow.js lets a trained machine-learning model run in a browser. A hand-recognition model trained with Google’s TensorFlow framework in Python can be used through JavaScript, while the training process itself remains outside the browser. section 15.4

A browser hand-tracking integration typically combines these pieces:

  • Render tracking details to a canvas while using a Web Component to hide the library and video-processing complexity. section 15.4

Hand-tracking Web Component

Extend a video component, load the hand-tracking model in the constructor, and call detect on the component’s video element. A demo page supplies the non-module Handtrack.js dependency, enables camera and canvas display, and listens for hand-location events. The same component can drive a Web Harp interface.

How Web Components in Action covers it

How deep it goes
Explains browser inference and integration, but leaves model-training details largely outside the treatment.
Examples
Uses a hand-tracking component, camera video, canvas output, DOM events, and a Web Harp interface.
What it assumes
Assumes JavaScript, browser components, source video, and canvas concepts while treating model training as background.
What you can do after
Apply it via Handtrack.js to build a browser hand-tracking component around video input and prediction events.
How it connects
Connects machine learning, trained models, Handtrack.js, Web Components, video elements, and canvas rendering.

Also explained in

Compare how 3 books explain TensorFlow.js →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Web Components in Action. The section links point to the parts of the book it draws on.