SRai22 / tfjs-object-detection

Object Detection using MobileNet SSD with WASM and WebGPU backend

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Object Detection in Real time

Running with Wasm backend

    npm start 
  • Opens the browser, allow the browser to access camera, click the button to start the detection.

Running with WebGPU backend

  • Download and Install Chrome Canary from https://www.google.com/chrome/canary/

  • Open chrome, and goto: chrome://flags/ , enable the option #enable-unsafe-webgpu

  • Relaunch chrome

  • Goto tfjs-object-detection/src/components/ObjectDetection.js --> edit line

66           await detector.current.setModelBackend("wasm");

                        to 

66           await detector.current.setModelBackend("webgpu");
    npm start
  • Open with Chrome Canary, allow the browser to access camera, click the button to start the detection.

TODO

  • Parameterize the backend variable

About

Object Detection using MobileNet SSD with WASM and WebGPU backend


Languages

Language:JavaScript 91.7%Language:CSS 4.2%Language:HTML 4.1%