concept browser extension in category deep learning

appears as: A browser extension, browser extensions, browser extension
Deep Learning with JavaScript: Neural networks in TensorFlow.js

This is an excerpt from Manning's book Deep Learning with JavaScript: Neural networks in TensorFlow.js.

  • Whether you are a frontend JavaScript developer or a Node.js developer, based on what you learned in this chapter, brainstorm a few possible cases in which you can apply machine learning to the system you are working on to make it more intelligent. For inspiration, refer to tables 1.1 and 1.2, as well as section 1.3.3. Some further examples include the following:
    1. A fashion website that sells accessories such as sunglasses captures images of users’ faces using the webcam and detects facial landmark points using a deep neural network running on TensorFlow.js. The detected landmarks are then used to synthesize an image of the sunglasses overlaid on the user’s face to simulate a try-on experience in the web page. The experience is realistic because the simulated try-on can run with low latency and at a high frame rate thanks to client-side inference. The user’s data privacy is respected because the captured facial image never leaves the browser.
    2. A mobile sports app written in React Native (a cross-platform JavaScript library for creating native mobile apps) tracks users’ exercise. Using the HTML5 API, the app accesses real-time data from the phone’s gyroscope and accelerometer. The data is run through a TensorFlow.js-powered model that automatically detects the user’s current activity type (for example, resting versus walking versus jogging versus sprinting).
    3. A browser extension automatically detects whether the person using the device is a child or an adult (by using images captured from the webcam at a frame rate of once per 5 seconds and a computer-vision model powered by TensorFlow.js) and uses the information to block or grant access to certain websites accordingly.
    4. A browser-based programming environment uses a recurrent neural network implemented with TensorFlow.js to detect typos in code comments.
    5. A Node.js-based server-side application that coordinates a cargo logistics service uses real-time signals such as carrier status, cargo type and quantity, date/time, and traffic information to predict the estimated time of arrival (ETA) for each transaction. The training and inference pipelines are all written in Node.js, using TensorFlow.js, simplifying the server stack.
  • How to deploy TensorFlow.js models to various platforms and environments, ranging from browser extensions to mobile apps, and from desktop apps to single-board computers
  • Since the extension is operating on top of JavaScript and HTML within the browser’s execution engine, what you can do with TensorFlow.js in a browser extension is similar to what is possible in a standard web page deployment. The model security story and data privacy story are identical to the web page deployment. By performing prediction directly within the browser, the users’ data is relatively secure. The model security story is also similar to that of web deployment.

    As an example of what is possible using a browser extension, see the chrome-extension example within tfjs-examples. This extension loads a MobileNetV2 model and applies it to images on the web, selected by the user. Installing and using the extension is a little different from the other examples we have seen, since it is an extension, not a hosted website. This example requires the Chrome browser.[10]