wasmvision

wasmVision gets you up and running with computer vision.

OTHER License

Stars
7

Get up and running with computer vision

wasmVision gets you up and running with computer vision.

It provides a high-performance computer vision processing engine that is designed to be customized and extended using WebAssembly.

How it works

  • Capture images from a camera or video file
  • Process them using WebAssembly
  • Output the results to a stream or video file
flowchart LR
    subgraph engine
        Capture
        Runtime[WASM Runtime]
        Capture--frame-->Runtime
        Capture<-->OpenCV
        Runtime<-->OpenCV
    end
    subgraph processors
        Runtime--frame-->processor1.wasm
        Runtime--frame-->processor2.wasm
        Runtime--frame-->processor3.wasm
        Runtime--frame-->processor4.wasm
    end

wasmVision Engine

The wasmVision engine is written in the Go programming language using the GoCV Go language wrappers for OpenCV and the Wazero WASM runtime.

See the ARCHITECTURE.md document for more details.

wasmVision Processors

wasmVision processing modules are WebAssembly guest modules that support the wasmCV interface.

Processors can filter images, analyze them, and modify them using traditional computer vision algorithms.

Processors can also use deep neural networks and other machine learning algorithms, and can even download the models they need automatically.

Want some pre-compiled processors you can try out right away? Take a look at a few such as:

Check out the processors directory for the complete list.

Processors can be written in Go, Rust, or the C programming language.

See the PROCESSOR.md document for more information about how processors work and how to develop your own.

Quick start

Linux

Download the latest release for Linux under Releases by clicking on the latest release.

Under "Assets" click on the link for either "wasmvision-linux-amd64" or "wasmvision-linux-arm64" depending on your processor.

Extract the executable to your desired directory.

You might need to set the file as "executable", which you can do from the command line by running chmod +x ./wasmvision in the same directory to which you extracted the wasmvision executable.

Verify wasmVision is installed by running these commands:

cd /path/to/wasmvision/install
wasmvision version

Now you can run a test to capture video using your webcam, blur it using a WebAssembly processor, and then stream the output to port 8080 on your local machine:

wasmvision run -p blur

wasmVision will automatically download the blur.wasm processor from our repo to your local $HOME/processors directory.

Point your browser to http://localhost:8080 and you can see the output.

Want to know more? Please see USING.md

macOS

NOTE: wasmVision currently runs on M-series processors only.

Install wasmVision on macOS using Homebrew:

brew tap wasmvision/tools
brew install wasmvision

Verify it is installed like this:

wasmvision version

Now you can run a test to capture video using your webcam, blur it using a WebAssembly processor, and then stream the output to port 8080 on your local machine:

wasmvision run -p blur

wasmVision will automatically download the blur.wasm processor from our repo to your local $HOME/processors directory.

Point your browser to http://localhost:8080 and you can see the output.

Want to know more? Please see USING.md

Windows

Download the latest release for Windows under Releases by clicking on the latest release.

Under the "Assets" click on the link for "wasmvision-windows-amd64".

NOTE: you will likely need to configure your Windows Defender to download the ZIP file with the wasmvision.exe executable.

Extract the executable to your desired directory.

Verify it is installed like this:

chdir C:\path\to\wasmvision\install
wasmvision.exe version

Now you can run a test to capture video using your webcam, blur it using a WebAssembly processor, and then stream the output to port 8080 on your local machine:

wasmvision.exe run -p blur

wasmVision will automatically download the blur.wasm processor from our repo to your local $HOME/processors directory.

You will probably need to configure Windows Firewall to allow the wasmvision.exe executable to access the network port on your local machine.

Point your browser to http://localhost:8080 and you can see the output.

Want to know more? Please see USING.md

Docker

NOTE for macOS users: camera input does not work with Docker on macOS. File sources only.

You can run wasmVision using Docker.

Pull the current development version:

docker pull ghcr.io/wasmvision/wasmvision:main

Verify it is installed like this:

docker run ghcr.io/wasmvision/wasmvision:main version

Now you can run a test to capture video using your webcam, blur it using a WebAssembly processor, and then stream the output to port 8080 on your local machine:

docker run --privileged --network=host ghcr.io/wasmvision/wasmvision:main run -p /processors/blur.wasm

Point your browser to http://localhost:8080 and you can see the output.

Want to know more? Please see USING.md

Development

For information on how to obtain development builds, or work on development for wasmVision itself, please see DEVELOPMENT.md

Badges
Extracted from project README's
Linux macOS Windows Docker
Related Projects