Skip to content

Neural-network inference

Algorithm atlasDeep learning

Execute a trained model by passing tensors through its computation graph.

Try it on your image ↓

VISUAL WALKTHROUGHDeep learning
REFERENCE INPUTImage to classify

The sample drawing makes the data representation visible; it is not an actual model input/output pair.

RESULTInterpret the output tensor

These illustrative class scores show one possible output contract. Detection, segmentation and other networks require different interpretation.

STEP 03 / 03

Run forward inference and interpret the named outputs.

Illustrative example. The stages explain the method; they are not a live OpenCV execution.

Try it on an image

YOUR IMAGE · REAL OPENCV

Experiment at pixel level

Open full lab ↗

Run a user-supplied ONNX network with an NCHW colour blob and inspect one output plane. The built-in model is only a ReLU demonstration, not a trained vision network.

The engine loads on your first run. Your images stay in this browser.

Input448 × 320
OutputWaiting for a result

Scroll over either image to zoom at the pointer. Use the scrollbars to pan both views over the same relative area. Zoom is relative to the input; pixel coordinates belong to each image. Warps can change scene correspondence.

Pixel inspector RGBA · native values · matched scale · 9 × 9 output pixels
Hover to inspect. Click to pin a pixel.
Input
Select a pixel

Output
Select a pixel

Sample models and licenses

When to use it

Run classifiers, detectors, segmenters or other supported models in a browser or Node worker.

How it works

  1. 01Load the model bytes into the instance’s virtual filesystem.
  2. 02Prepare input tensors with the model’s exact layout, size and normalization.
  3. 03Run forward inference and interpret the named outputs.

preprocess → learned layers → model-specific outputs

What to tune

Match model input names, RGB/BGR order, scale, mean and layout. Postprocessing is model-specific.

Where it breaks down

Compilation of DNN does not imply every operator or model is supported. This build runs on CPU WASM and does not enable WebGPU.

TypeScript API

Open an entry for its exact overloads, parameter descriptions, result ownership and pinned upstream source.

All of these calls execute on the CPU. Native objects need explicit disposal. See matrices and ownership and build compatibility.