Intelligenza Artificiale Computer Vision JavaScript

Computer Vision in the Browser with JavaScript: Webcam, TensorFlow.js and MoveNet

Build a computer vision web app with React, TensorFlow.js and MoveNet: detect the human body in real time from a webcam.

Course description

Your browser sees what you do — and you can program it

Imagine a web app that detects your body position in real time using only your laptop's webcam. No special hardware, no backend server: everything runs in the browser with JavaScript, TensorFlow.js and the MoveNet model. In this course we build exactly that — from scratch.

What We Build Together

  • React + TypeScript project setup with TensorFlow.js and the MoveNet model
  • Webcam access and video streaming directly in the browser
  • Webcam selector to choose the available input device
  • Canvas drawing overlaid on the video in real time
  • Human body detection and 17 anatomical keypoints
  • Drawing shoulder-elbow-wrist connections to visualize the pose
  • Movement counter based on the relative position of wrist and nose

Who This Is For

JavaScript and React developers who want to explore machine learning in the browser. No prior AI experience required: we start from environment setup and end up with a working app that analyzes movement in real time.

Why This Is Interesting

Client-side computer vision opens up scenarios that until a few years ago required dedicated servers and professional GPUs. Today you can build fitness trackers, gesture detectors, accessibility systems — all in the browser, with complete privacy because data never leaves the device.

Lessons list

I'll show you how to create a React project with TypeScript from scratch using Vite — the foundation we'll build our Computer Vision app on. We'll configure the environment and walk through the generated file structure.

Guarda lezione

Let's activate the webcam directly in the browser with React, then install TensorFlow.js and the MoveNet model. By the end of this lesson we'll be ready for real-time pose estimation.

Guarda lezione

I'll show you how to build a webcam selector using a React SelectBox component. We'll enumerate available input devices and let the user choose which camera to use at runtime.

Guarda lezione

We'll take the webcam stream and render each frame onto an HTML canvas element, turning it into our working surface for overlaying Computer Vision data in real time.

Guarda lezione

I'll integrate TensorFlow.js and the MoveNet model into the project: we'll initialize the WebGL backend and start pose estimation to detect the human body directly in the browser.

Guarda lezione

Let's make MoveNet's results visible by drawing all 17 anatomical keypoints onto the canvas, so we can verify in real time that the model is detecting the body correctly.

Guarda lezione

Using MoveNet keypoints, I'll draw a line connecting the shoulder, elbow and wrist on the canvas — our first real read of body movement and the building block for gesture recognition.

Guarda lezione

We'll build the core application logic: counting how many times the wrist rises above the nose level using MoveNet's coordinates — the heart of a browser-based fitness tracker with no backend required.

Guarda lezione
Giovanni Pace

Giovanni Pace

Ingegnere Informatico · Pratola Peligna

  • 107 Courses
About the teacher

Sono un ingegnere informatico con oltre 15 anni di esperienza nel settore ICT. Mi occupo di sviluppo software, cybersecurity, data science e intelligenza artificiale, con particolare attenzione all’innovazione e all’automazione dei processi aziendali. Da anni svolgo anche attività di docenza e formazione, creando percorsi pratici e coinvolgenti su programmazione, DevOps, AI e sicurezza informatica.

This course includes

  • Lessons 8
  • Duration 2h 0m
  • Difficulty intermedio
  • Language it
  • Certificate No

Recently viewed