Installation¶
NNV requires MATLAB 2023a or newer with several toolboxes. This guide covers installation on all platforms.
Prerequisites¶
MATLAB 2023a or newer with the following toolboxes:
Toolbox |
Used For |
|---|---|
Computer Vision |
Image processing operations |
Control Systems |
Control system plant models |
Deep Learning |
Neural network layers and operations |
Image Processing |
Image manipulation and analysis |
Optimization |
LP solving (linprog) |
Parallel Computing |
Multi-core reachability analysis |
Statistics and Machine Learning |
Statistical operations |
Symbolic Math |
Symbolic computation |
System Identification |
System modeling utilities |
Clone the Repository¶
NNV depends on several submodules (CORA, NNMT, HyST, onnx2nnv), so you must clone recursively:
git clone --recursive https://github.com/verivital/nnv.git
Ubuntu Quick Install¶
On Ubuntu, a one-step installation script is provided:
chmod +x install_ubuntu.sh
./install_ubuntu.sh
Then skip to Verify Installation.
Windows / macOS Installation¶
Install MATLAB (2023a or newer) with the toolboxes listed above.
Install the ONNX support package: Deep Learning Toolbox Converter for ONNX Model Format
Note
Support packages can be installed from MATLAB’s HOME tab > Add-Ons > Get Add-Ons, then search for the package name.
Open MATLAB, navigate to the NNV root directory, and run:
installNote
If you restart MATLAB, rerun
install.morstartup_nnv.mto restore paths. Alternatively, runsavepathafter installation (may require admin privileges).
Optional Packages¶
VGG16/VGG19 support (for CNN verification on these architectures):
MATLAB Verification Library (used in CAV 2023 comparison):
Framework converters (load models from TensorFlow/PyTorch):
Conformal Prediction (requires Python 3.12+):
# From the NNV root directory:
python -m venv .venv
# Windows: .venv\Scripts\activate
# macOS/Linux: source .venv/bin/activate
pip install -r requirement.txt
See Conformal Prediction Setup for detailed Python setup instructions.
Verify Installation¶
Run the diagnostic tool to check your setup:
check_nnv_setup()
This checks:
MATLAB version compatibility
Required toolbox availability (critical, important, and optional tiers)
Submodule paths (CORA, NNMT, HyST)
Python environment for conformal prediction (if configured)
You should see a Ready! confirmation when all critical dependencies are satisfied.
You can also check the NNV version programmatically:
NNVVERSION() % Returns 'NNV v3.0.0'
Execution Without Installation¶
NNV can be executed online without installing MATLAB through CodeOcean:
Latest (CAV 2023): https://doi.org/10.24433/CO.0803700.v1
CAV 2020 ImageStar: https://doi.org/10.24433/CO.3351375.v1
CAV 2020 Tool paper: https://doi.org/10.24433/CO.0221760.v1
Uninstallation¶
To remove NNV from your MATLAB path:
cd code/nnv
uninstall