Advanced

Glossary

Definitions of technical terms used throughout the help docs.

Alpha channel

The fourth channel in an RGBA image (alongside Red, Green, Blue) that stores transparency information. Values range from 0 (fully transparent) to 255 (fully opaque), with every value in between for partial transparency. The alpha channel is what makes a PNG "see-through."

Straight alpha

Also called unassociated alpha or non-premultiplied alpha. In straight alpha, the RGB values of a pixel represent its true colour, independent of how transparent it is. A pixel that is 50% transparent still has its full original colour in RGB. This is the correct format for compositing in professional tools like Photoshop. NSS always exports straight alpha.

Premultiplied alpha

Also called associated alpha. In premultiplied alpha, the RGB values have been multiplied by the alpha value before storage. A pixel that is 50% transparent has RGB values that are half their true colour values. A fully transparent pixel has RGB = 0, 0, 0. When a Photoshop user opens a premultiplied PNG, these zero-RGB transparent pixels appear black. This is the cause of the "black background" problem common with other background removal tools.

Mask

A grayscale representation of the selection — which pixels belong to the subject and which belong to the background. In NSS, the mask is stored as a Float32Array of values from 0.0 (background) to 1.0 (subject). It's kept separate from the image data until the final export.

Float32Array

A JavaScript typed array where each element is a 32-bit floating-point number. NSS stores the mask in Float32Array throughout the pipeline to avoid the rounding errors that would occur if converted to 8-bit integer (0–255) values prematurely. Only at the final export step are mask values quantised to integers.

WebGPU

A modern web API that allows JavaScript to run code on the device's graphics processing unit (GPU). NSS uses WebGPU to accelerate AI inference, making it 5–20x faster than running on the CPU. Available in Chrome, Edge, and Opera 94+.

WebAssembly (WASM)

A binary format that allows code written in languages like C/C++/Rust to run in the browser at near-native speed. NSS falls back to WASM for AI inference when WebGPU isn't available. WASM is supported in all modern browsers.

SharedArrayBuffer

A JavaScript feature that enables shared memory between the main thread and web workers, making multi-threaded WASM possible. Requires specific HTTP headers (COOP + COEP) that NSS sets correctly.

Decontamination

The process of removing background colour that has bled into subject edge pixels — called "colour spill." NSS's decontamination algorithm works in Lab colour space to identify and correct spill without affecting opaque subject areas.

Feathering

Softening the edge of a mask by applying a Gaussian blur to the boundary. Creates a smooth, gradual transition from opaque to transparent instead of a hard cutoff.

ICC profile

International Colour Consortium profile — metadata embedded in image files that describes the colour space the image was captured in. Common profiles include sRGB (standard), Display P3 (wide gamut, used by iPhones), and AdobeRGB (professional photography). NSS reads and preserves ICC profiles so colours remain accurate.

Inference

The process of running an input image through the AI model to produce an output — in this case, a mask separating the subject from the background. Each inference run produces one mask for one image.

ONNX

Open Neural Network Exchange — an open format for AI models. NSS uses ONNX-format versions of the RMBG-1.4 and RMBG-2.0 models, which can be loaded and run by Transformers.js in the browser.

RMBG-1.4

The "Fast" AI model used by NSS for background removal. Developed by BRIA AI and released under a RAIL licence. ~80 MB download. Good for most photos and fast inference.

RMBG-2.0

The "Best Quality" AI model used by NSS. BRIA AI's second-generation model with significantly better performance on hair, fur, and complex edges. ~180 MB download. Released under the BRIAAI licence.

Lab colour space

A colour model where L represents lightness, and a and b represent colour channels. Lab is designed to be perceptually uniform — equal numerical differences correspond to equal perceived colour differences. NSS's decontamination algorithm uses Lab because it makes "shift this colour toward another" operations behave predictably.

Service worker

A JavaScript file that runs in the background of your browser, separate from the page. NSS uses a service worker to cache the app shell and AI model files, enabling offline use.

Progressive Web App (PWA)

A web application that can be installed on your device and used like a native app — with its own window, icon, and offline capability. NSS supports PWA installation on desktop (Chrome, Edge) and mobile (Chrome for Android, Safari for iOS).

Related