Code Monkey home page Code Monkey logo

webml-polyfill's Introduction

Deprecated

W3C Launched the Web Machine Learning Working Group in April 2021, the Web Neural Network Polyfill project has been moved to https://github.com/webmachinelearning/webnn-polyfill. You can also get latest updates for the Web Neural Network API and other relevant projects in github.com/webmachinelearning.

Web Machine Learning

Web Neural Network (WebNN) API polyfill and examples

A polyfill for Web Neural Network (WebNN) API with computer vision and natural language processing examples.

The Web Neural Network (WebNN) API is a dedicated low-level API for neural network inference hardware acceleration. It is worked on in the W3C Machine Learning for the Web Community Group.

Project Build Status

MacOS Linux Windows
Build Status CircleCI Build status

Examples

WebNN API Examples QR Code

Supported Backends

  • Polyfill
    • WASM: TensorFlow.js WebAssembly backend builds on top of the XNNPACK library
    • WebGL: TensorFlow.js GPU accelerated WebGL backend
    • WebGPU: WIP
  • WebNN: Web Neural Network (WebNN) API

Run example with hardware accelerated WebNN backend

If you are interested, please refer to WebNN Chromium build repo and WIKI:

Benchmarks

  • Web AI Workload Use this tool to collect the performance-related metrics (inference time, etc) of various models and kernels on your local device with Wasm, WebGL, or WebNN backends. The Web AI Workload also supports to measure the OpenCV.js DNN performance with Wasm, Wasm Threads and Wasm SIMD.
  • OpenCV.js Performance Test Use this tool to collect the OpenCV.js performance for image processing with Wasm, Wasm Threads and Wasm SIMD.

Building & Testing

Install

$ npm install

Start

$ npm start

# Start an HTTPS server
$ HTTPS=true npm start

Build

$ npm run build

# Production build
$ NODE_ENV=production npm run build

# WASM backend build:
$ npm run build-wasm

Test

$ npm start

Open browser and navigate to http://localhost:8080/test

Watch

$ npm run watch

License

This project is following Apache License Version 2.0.

Documents in test/wpt/resources are licensed by the W3C 3-clause BSD License.

webml-polyfill's People

Contributors

ibelem avatar huningxin avatar brucedai avatar pinzhenx avatar cuiyanx avatar wenzhao-xiang avatar shenx3x avatar christywl avatar akineeic avatar zhaoming0 avatar mingmingtasd avatar lisa0314 avatar belem avatar yl495 avatar ganwenyao avatar markghx avatar halton avatar honry avatar fujunwei avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.