Open spectroscopy for everyone

From raw spectra to deployed models — a Python reference library, desktop Studio app, client-side WASM web client, shared UI package, provider clients, and portable RC package topology for Near-Infrared Spectroscopy.

Real-world impact

Where NIRS makes a difference

Near-infrared spectroscopy provides rapid, non-destructive analysis across industries — from field to laboratory.

Agriculture & Crops

Crop quality assessment, soil composition analysis, and phenotyping for plant breeding programs.

Grain Quality Soil Analysis Phenotyping

Food Quality & Safety

Rapid authentication, composition analysis, and quality grading of food products and raw materials.

Authenticity Composition Grading

Research & Pharma

Pharmaceutical process monitoring, chemical analysis, and materials characterization in research laboratories.

Process Control QC/QA Materials
Where we make the difference

The library and the app

Most people meet nirs4all through the Python reference library or Studio, the no-code desktop app. Those maintained production lines stay outside the final V1 RC publication batch, which separates the portable aggregate (nirs4all-core), the client-side WASM web app, the shared UI package, the soft-importing provider layer, file readers, datasets, and engines.

nirs4all · Python library

The Python reference implementation and scientific oracle — declarative NIRS pipelines, 30+ preprocessings, 15+ PLS models, multi-backend training, and portable .n4a bundles. Its maintained production PyPI/docs line remains separate from the final V1 RC aggregate publication train.

Backends
Get started in seconds
# Core library
pip install nirs4all

# With PyTorch backend
pip install nirs4all[torch]

# With TensorFlow backend
pip install nirs4all[tensorflow]

# All backends (sklearn + TF + PyTorch + JAX)
pip install nirs4all[all]

# GPU/CUDA acceleration
pip install nirs4all[all-gpu]
import nirs4all

# Run a pipeline on your spectral data
result = nirs4all.run(
    pipeline=[SNV(), PLSRegression(10)],
    dataset="data.csv"
)

# Inspect results
print(result.best_rmse)
print(result.top(5))

# Deploy the best model
result.export("best_model.n4a")

# Predict on new spectra
preds = nirs4all.predict("best_model.n4a", new_data)
import nirs4all

# Preprocessing variants × PLS sweep on n_components
pipeline_1 = [
    {"_or_": [SNV, MSC, Detrend]},
    {"model": {
        "type": PLSRegression,
        "param": {"n_components": {"_range_": [2, 20, 5]}
      }
    }
]

# Stacking: compare PLS vs RF in branches, then merge + meta-learner
pipeline_2 = [
    {"branch": [
        [SNV(), {"model": PLSRegression(10)}],
        [MSC(), {"model": RandomForestRegressor()}],
    ]},
    {"merge": "predictions"},
    {"model": Ridge()},  # meta-learner trained on stacked predictions
]

results = nirs4all.run(pipeline=[pipeline_1, pipeline_2], dataset="data.csv")

nirs4all Studio · Desktop app

The no-code desktop app built on the Python reference and shared nirs4all-ui components — drag-and-drop pipeline building, real-time spectral visualization, SHAP analysis and experiment tracking, packaged with Electron. Existing production downloads remain available while final V1 RC app artifacts stay separate from the aggregate publication batch.

Runs on
No code, just clicks
Studio · Playground nirs4all Studio — Playground See it in action →
Capabilities

Everything spectroscopy needs

Built specifically for NIRS workflows — not generic ML tools adapted for spectra.

30+ Spectral Preprocessing Transforms

Comprehensive NIRS-specific preprocessing including wavelength-aware operators that automatically receive wavelength information.

SNVMSCSavitzky-Golay OSCEPOWavelet BaselineCARSMCUVE

15+ Advanced PLS Models

State-of-the-art Partial Least Squares variants with automatic operator selection via AOM-PLS for optimal model performance.

PLSPLS-DA NLPLSPLS-DA AOM-PLSFCK-PLSOPLS DiPLSMBPLSPCR

Multi-Backend Machine Learning

Unified API across all major ML frameworks. Swap backends without changing your pipeline code.

scikit-learnTensorFlow PyTorchJAXAutoGluon

Declarative Pipeline Syntax

Express complex workflows — branching, merging, hyperparameter sweeps, cross-validation — with a concise, readable list syntax. Parallel execution via joblib.

_or__range_branch mergeOptuna

SHAP Explainability

Full scikit-learn compatibility enables SHAP integration for spectral band importance visualization, prediction diagnostics, and model transparency.

SHAPVariable Importance sklearn compatible

Portable Model Bundles

Export entire trained pipelines as .n4a bundles for seamless deployment and sharing. Includes predict, explain, and retrain capabilities.

.n4a exportpredict() explain()retrain()
nirs4all Studio

See it in action

Interactive desktop application for exploring data, building pipelines, and analyzing results — no code required.

The full picture

One growing ecosystem

It began with nirs4all, the Python library, which remains the scientific oracle and reference implementation. Its maintained production line, along with Studio's production line, stays outside the final V1 RC publication batch. In the v1 RC topology, nirs4all-core is the canonical portable aggregate, web.nirs4all.org is client-side-only WASM, nirs4all-ui is shared by Studio and the web client, and nirs4all-providers offers one soft-import read surface over datasets and repository.

01
Reference oracle

nirs4all Python

Where the behavior is defined, tested and explained — the Python source of truth for scientific parity and .n4a exports.

02
User-facing surfaces

Studio, Web & UI

Studio is the desktop app, nirs4all-web is the client-side WASM app, and nirs4all-ui keeps their React interface shared.

03
RC aggregate · v1

core aggregate target

nirs4all-core is the V1 RC aggregate and the public portable target for new integrations.

RMATLABOctaveWASM
Live ecosystem status — follow every project in the cockpit cockpit.nirs4all.org →
Python oracle
nirs4all Python
v0.10.3

The Python oracle/reference implementation for the ecosystem: declarative NIRS pipelines with 30+ spectral preprocessings, 15+ advanced PLS models, and a unified API over scikit-learn, TensorFlow, PyTorch and JAX. Train, explain, and export portable .n4a model bundles.

Desktop app
nirs4all Studio React · Electron
v0.9.1

The no-code desktop application built on the Python reference and shared nirs4all-ui components: a drag-and-drop pipeline builder, real-time spectral visualization, experiment tracking, and SHAP analysis — packaged with Electron for Windows, Linux and macOS.

Shared UI package
nirs4all-ui React · TypeScript
v0.1.12

The shared React UI and visual-system package for Studio, Web, and custom hosts: reusable presentational components, runtime status view models, score helpers, default CSS tokens, generated brand metadata/assets, and packaged motion motifs, while host apps keep routing, data fetching, execution, icons, and app state ownership.

PLS engine
nirs4all-methods C++ · C ABI
v1.0.9

A portable Partial Least Squares engine in C++17 with a stable C ABI (libn4m) and binding surfaces for Python, R, MATLAB/Octave, JavaScript/WebAssembly and Android targets — one numerical core with parity checks across supported bindings.

Adaptive models
nirs4all-aom Python · sklearn
v0.10.2

Operator-adaptive calibration models — AOM-PLS, POP-PLS and AOM-Ridge — that fold spectral preprocessing directly into the model and replace external preprocessing grid-search. scikit-learn compatible; companion code for the AOM-PLS paper.

File readers
nirs4all-formats Rust
v0.2.7

Rust-first, low-level readers for ~58 NIRS & spectroscopy format families. Content-sniffed, lossless, provenance-tracked records with Python, R, WebAssembly and C bindings — the messy vendor-file zoo turned into one clean data model. Try the full reader catalog right in the browser via the live demo.

Dataset bridge
nirs4all-io Python · Rust · R
v0.1.11

A dataset-assembly bridge: turn any input — a folder, a glob, vendor spectra plus a reference table, or a config — into a pipeline-ready dataset through resolve → infer → configure → materialize, with a score-based inference engine. Built on nirs4all-formats.

Reference datasets
nirs4all-datasets Python
v0.3.5

A Python library that transparently pulls curated, hand-picked NIRS test datasets from Dataverse — turning reproducible, DOI-citable benchmarks and lab experiments into a one-line import.

Execution core
dag-ml Rust · C ABI
v0.2.7

A leakage-safe, in-process DAG execution core. It owns the graph, phases, folds, out-of-fold joins, lineage, caching and deterministic RNG — exposed through a C ABI so any host language can drive reproducible ML pipelines.

Data contracts
dag-ml-data Rust · C ABI
v0.2.9

The data-contract and planning layer beneath dag-ml: typed, sample-aligned, multi-source data views, representation adapters, data plans, and schema fingerprints — the foundation that keeps pipelines reproducible.

Distributed execution
nirs4all-cluster Python
v0.1.4

A trusted-LAN beta for distributing nirs4all.run() across lab machines — FastAPI coordinator, SQLite queue, capability routing and crash-safe leases. It is a validation bench, not a public multi-tenant service.

Browser client
nirs4all-web WASM · JS
v0.1.8

The browser-native client at web.nirs4all.org. It runs in the page through WASM: load spectra, build a pipeline from nirs4all-methods nodes, train, score and predict — entirely client-side, with no Python runtime and no server-side analysis.

V1 RC aggregate
nirs4all-core Rust · Python · R · WASM
v0.3.11

The canonical V1 RC aggregate for the reproducible cross-language stack. Version 0.3.11 gathers dag-ml, dag-ml-data, formats, io, datasets, and methods into one portable surface across Rust, Python, R, WASM and MATLAB/Octave. PyPI nirs4all-core is published, npm/crates/GitHub release surfaces are visible, and the release includes R and MATLAB/Octave artifacts.

New
nirs4all-benchmarks
v0.1.6

Reproducible, scored nirs4all pipelines run on curated reference datasets, published as a browsable benchmark resource with interactive dataviz (leaderboards, effect analysis, 3D landscapes, clustered pipeline graphs). An early prototype — currently a static client-side demo; a live meta-analysis service is planned.

Pipeline library
nirs4all-repository
v0.1.10

A public beta catalogue of pre-configured nirs4all & dag-ml pipeline recipes stored with provenance, checksums, reference dataset hints, and per-recipe evaluation status. Treat published entries as draft/community recipes unless their catalogue record is marked validated.

Repro publishing
nirs4all-papers
v0.2.3

An early prototype that turns a finished experiment into a self-contained reproduction document — an auto-generated methods & bibliography report alongside an in-browser page that re-runs the exact pipeline, on the bundled data or your own.

Provider clients
nirs4all-providers Python
v0.2.10

The dependency-light, soft-importing provider client layer over nirs4all-datasets and nirs4all-repository. Benchmarks and papers keep their own public APIs. It stays read-side only, with optional-dependency contracts and local export helpers, without owning NIRS, ML, IO, parsing, or write-back logic. PyPI nirs4all-providers is published at v0.2.10 and the GitHub Release carries fallback wheel/sdist assets.

Migration toolkit
nirs4all-tools Python · CLI
v0.0.5

The legacy migration and verification toolkit for V1 cutover: inspect old workspaces, preserve payloads, convert supported saved runs and predictions, and emit machine-readable reports. Version 0.0.5 is published on PyPI and tagged on GitHub.

Ecosystem_ 21 projects · open source
Install pick a package manager
# the library, the engines, the models & the data tools pip install nirs4all pip install nirs4all-methods pip install pls4all pip install nirs4all-aom pip install nirs4all-formats pip install nirs4all-io pip install nirs4all-datasets pip install nirs4all-papers # repro-document publisher (prototype)
The packages listed above are on PyPI; nirs4all-core and nirs4all-providers are also published RC packages with tagged GitHub Release fallback assets.
# R preview/subset packages, auto-built from source install.packages( c("n4m", "pls4all", "nirs4allformats", "nirs4allio", "nirs4alldatasets", "nirs4all"), repos = "https://gbeurier.r-universe.dev" )
R surfaces are release-candidate previews; R-universe can lag GitHub/PyPI/npm/crates after a release, and local execution can still be environment-dependent.
CRAN — release-candidate preview.
Source tarballs for the R subset (n4m, pls4all, nirs4allformats, nirs4allio, nirs4alldatasets, nirs4all) are handled through Releases/R·universe while CRAN publication remains gated.
Methods bindings are a subset surface for both runtimes; aggregate MATLAB/Octave packaging remains RC-gated.
# JS / WASM bindings and shared React UI npm install nirs4all npm install nirs4all-ui npm install @nirs4all/datasets-wasm
nirs4all-web runs live as a client-side-only WASM app; nirs4all-ui is the shared Studio/Web React package.
How it fits together

From spectra to shared models

The whole pipeline, end to end — every box is a package you can use on its own, and the provider layer offers one read surface over datasets and repository. Hover or tap a node to see what it does and where to get it.

Every node is a real package — hover, tap or focus to open it.

Makers

The team

Researchers and engineers from the PHENOMEN team at CIRAD / UMR AGAP Institut, building open-source tools for spectroscopy science.

Gregory Beurier

Gregory Beurier

Co-founder & Lead Developer
CIRAD · UMR AGAP Institut
AI Modelization Dev Optimization
Denis Cornet

Denis Cornet

Co-founder & Product Owner
CIRAD · UMR AGAP Institut
Ecophysiology Data Science Chemometrics
Lauriane Rouan

Lauriane Rouan

Co-founder & Contributor
CIRAD · UMR AGAP Institut
Biostatistics Data Science Optimization
Home

Institutions

nirs4all is developed at CIRAD within the UMR AGAP Institut — a research center dedicated to plant genetics, genomics, and agro-resources.

The French Agricultural Research Centre for International Development — a research organization working with developing countries to tackle international agricultural and development challenges.

Visit CIRAD →

Amélioration Génétique et Adaptation des Plantes méditerranéennes et tropicales — a joint research unit focused on plant genetic improvement, genomics, and adaptation for Mediterranean and tropical species.

Visit UMR AGAP →
Adoption

They already use it

Research institutes, universities, and companies across Europe and Africa build their near-infrared spectroscopy workflows with nirs4all.

Research

Publications

Research using nirs4all and related spectroscopic analysis.

2026
Tabular foundation models for robust calibration of near-infrared chemical sensing data
Reiter R., Cornet D., Michel F. et al.
arXiv preprint, 2026
2026
Reframing preprocessing selection as model-internal calibration in near-infrared spectroscopy: a large-scale benchmark of operator-adaptive PLS and Ridge models
Beurier G., Reiter R., Noûs C. et al.
arXiv preprint, 2026
2024
Convolutional neural network allows amylose content prediction in yam (Dioscorea alata L.) flour using near infrared spectroscopy
Houngbo M.E., Desfontaines L., Diman J.-L. et al.
Journal of the Science of Food and Agriculture, 104(8), 4915–4921, 2024
2024
Food quality profile of pounded yam and implications for yam breeding
Otegbayo B.O., Oroniran O., Tanimola A. et al.
Journal of the Science of Food and Agriculture, 104(8), 4635–4651, 2024
2024
NIRSpredict: a platform for predicting plant traits from near infra-red spectroscopy
Vaillant A., Beurier G., Cornet D. et al.
BMC Plant Biology, 24, Article 1100, 2024
2022
A perspective on plant phenomics: coupling deep learning and near-infrared spectroscopy
Vasseur F., Cornet D., Beurier G. et al.
Frontiers in Plant Science, 13, Article 836488, 2022
2021
Near-infrared spectroscopy (NIRS) applications for high throughput phenotyping (HTP) for cassava and yam: a review
Alamu E.O., Nuwamanya E., Cornet D. et al.
International Journal of Food Science & Technology, 56(3), 1491–1501, 2021
2021
Predicting quality, texture and chemical content of yam (Dioscorea alata L.) tubers using near infrared spectroscopy
Ehounou A.E., Cornet D., Desfontaines L. et al.
Journal of Near Infrared Spectroscopy, 29(3), 128–139, 2021
2019
Development of NIRS and molecular marker to improve breeding efficiency in greater yam (Dioscorea alata L.) for key quality traits
Ehounou A.E., Cormier F., Cornet D. et al.
International Conference on Applied Biochemistry and Biotechnology (ABB 2019), Macau, China
Cite this software
@software{beurier2025nirs4all,
  author  = {Gregory Beurier and Denis Cornet and Lauriane Rouan},
  title   = {NIRS4ALL: Open spectroscopy for everyone},
  url     = {https://github.com/GBeurier/nirs4all},
  version = {0.10.3},
  year    = {2026},
}
Search-ready answers

Frequently asked questions

Answers to the main questions researchers, engineers, and applied teams ask before adopting nirs4all for Near-Infrared Spectroscopy workflows.

What is nirs4all?

nirs4all is an open-source Near-Infrared Spectroscopy ecosystem. The Python package is the reference implementation and scientific oracle, and Studio is the desktop application, but both maintained production lines remain outside the final V1 RC publication batch. nirs4all-web is a client-side WASM browser app, nirs4all-ui is the shared React package of reusable components and brand assets, nirs4all-providers is the soft-importing read-side provider client layer, and nirs4all-core is the canonical V1 RC portable aggregate.

Can I use nirs4all without coding?

Yes. nirs4all Studio provides a desktop interface for interactive exploration, pipeline building, experiment tracking, result analysis, and data inspection without needing to write code.

Which machine-learning and deep-learning backends does nirs4all support?

The nirs4all Python library supports multiple backends and integrations including scikit-learn, TensorFlow, PyTorch, JAX, and advanced chemometric workflows around Partial Least Squares models.

How do I install or download nirs4all?

You can install the Python reference library from PyPI with pip install nirs4all, and you can download nirs4all Studio for Windows, macOS, and Linux from the latest GitHub releases page. Those maintained production lines remain separate from the final V1 RC publication batch, which is tracked through nirs4all-core and separate Studio RC artifacts.

What is the v1 RC package topology?

For the v1 release-candidate line, nirs4all remains the Python oracle/reference, nirs4all-core is the canonical portable aggregate, web.nirs4all.org runs client-side-only through WASM, nirs4all-ui is the shared React package of reusable components and brand assets for Studio and the web client, and nirs4all-providers is the soft-importing read-side client layer over datasets and repository.