You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This artifact is used to reproduce the results in _Robustness Verification of Video Classification Neural Networks_.
4
4
5
+
Included in the artifact are the NNV tool, datasets, and scripts used to produce all of the results in the aforementioned paper. The paper introduces a novel abstract set representation for handling layer types common to video classification neural network architectures (3D convolutional, 3D pooling, etc.). The implementation of this abstract set representation is done within the NNV tool, which results in its inclusion in the artifact. Specifically, there exists a subdirectory (`nnv/code/nnv/examples/Submission/FORMALISE2025`) of the artifact which contains the scripts necessary to using the NNV tool for verification and producing the results in the paper.
6
+
5
7
All results from _Robustness Verification of Video Classification Neural Networks_ were captured using an `Apple M1 Max 10-core [email protected]×10` with 64GB of RAM.
6
8
7
9
# Requirements
8
10
9
11
The following resources are required to run this artifact:
10
12
11
-
- MATLAB 2024a with NNV and `npy-matlab` installed and added to the path.
13
+
- MATLAB 2024a with the NNV tool and `npy-matlab` packages installed and added to the path as well as the following toolboxes installed:
14
+
- Computer Vision
15
+
- Control Systems
16
+
- Deep Learning
17
+
- Image Processing
18
+
- Optimization
19
+
- Parallel Computing
20
+
- Statistics and Machine Learning
21
+
- Symbolic Math
22
+
- System Identification
23
+
-[Deep Learning Toolbox Converter for ONNX Model Format](https://www.mathworks.com/matlabcentral/fileexchange/67296-deep-learning-toolbox-converter-for-onnx-model-format)
12
24
- A conda environment with Python v3.11. Install rquirements from `requirements.txt`. Make sure to install the source files.
25
+
- The datasets which are available for download here: https://doi.org/10.5281/zenodo.14721214
13
26
14
27
# Installation
15
28
16
29
This section describes all of the necessary steps for installing tools, dependencies, etc. needed to reproduce the artifact. For the remainder of these instructions when the `FORMALISE2025` directory is referred to we are really referring to the directory at the following path: `nnv/code/nnv/examples/Submission/FORMALISE2025`.
17
30
18
-
1. Clone NNV and `npy-matlab` and install them ensuring that both have been added to the MATLAB path.
31
+
1. Clone the NNV repository (or download artifact for reviewers accessing this way) and ensure all dependencies have been added to the MATLAB path.
Follow the instructions under heading `# Installation:` on [NNV's README](https://github.com/verivital/nnv/blob/master/README.md). Note, if using a computer with an Apple silicon CPU, then it may be necessary to remove the following line from NNV's `install.m` script:
38
+
Next, we provide instructions for installing both pieces of software as needed for using the artifact. Note that it will be necessary to perform installations with administrator privileges for both pieces of software so that it is possible to `savepath` in MATLAB after completing their respective installation instructions.
To setup the NNV tool, there are a number of toolboxes that we need to first install. Assuming you have already installed MATLAB R2024a, then you can use the `nnv/install_ubuntu.sh` if you are on an Ubuntu machine to speedup this process. Otherwise, you will need to ensure that the toolboxes mentioned under [Requirements](#requirements) are included in your MATLAB installation.
33
43
34
-
For `npy-matlab`, add and save the path to MATLAB. Again, instructions are available on [`npy-matlab`'s README](https://github.com/kwikteam/npy-matlab/blob/master/README.md).
44
+
Additionally, you must install the following support package [Deep Learning Toolbox Converter for ONNX Model Format](https://www.mathworks.com/matlabcentral/fileexchange/67296-deep-learning-toolbox-converter-for-onnx-model-format).
35
45
36
-
> NOTE: It will be necessary to perform installations with administrator privileges for both of these tools so that it is possible to `savepath` in MATLAB after completing their respective installation instructions.
46
+
> Note: Support packages can be installed in MATLAB's HOME tab > Add-Ons > Get Add-ons, search for the support package using the Add-on Explorer and click on the Install button.
37
47
38
-
2. Download the following dataset files from [here](https://drive.google.com/drive/folders/1sXRtSObHLBTeKVss2IA-NGPKljirgD8D?usp=drive_link) into the `FORMALISE2025/data` folder so that the file tree now looks like
48
+
After completing the initial steps, the next step is to run the `nnv/code/nnv/install.m` script in MATLAB. If using a computer with an Apple silicon CPU, then it may be necessary to remove the following line from NNV's `install.m` script:
Note that the `GTSRB` data folder is quite large, so it will likely be downloaded in separate parts. Please make sure the organization of the folder is the same as in the download link and that all filenames match.
54
+
Either comment it out or remove it.
51
55
52
-
3. Create a conda environment with `Python v3.11` and install the requirements from `requirements.txt`. Instructions for installing conda can be found [here](https://docs.conda.io/projects/conda/en/latest/user-guide/install/) with links under `# Regular installation` to instructions for various operating systems. After confirming that conda has installed successfully by creating a conda environment and making it active, proceed to install the requirements as detailed below. In addition to installing from `requirements.txt`, you must install the source files to the environment. Both of these can be done by running the following commands from the root directory (`FORMALISE2025`):
56
+
> Note: if you restart Matlab, rerun either `install.m` or `startup_nnv.m`, which will add the necessary dependencies to the path; you alternatively can run savepath after installation to avoid this step after restarting Matlab, but this may require administrative privileges
53
57
54
-
```bash
55
-
# installing requirements
56
-
pip install -r requirements.txt
58
+
All of these instructions are additionally included under heading `# Installation:` on [NNV's README](https://github.com/verivital/nnv/blob/master/README.md). Note, if using a computer with an Apple silicon CPU, then it may be necessary to remove the following line from NNV's `install.m` script:
57
59
58
-
# before installing source files, make sure to navigate to this src directory, e.g.
59
-
cd /path/to/FORMALISE2025/src
60
-
pip install -e .
61
-
```
60
+
3. Install the `npy-matlab` package
61
+
62
+
For `npy-matlab`, add and save the path to MATLAB with the following commands from the MATLAB interface:
63
+
64
+
```matlab
65
+
>> addpath('/path/to/npy-matlab/npy-matlab')
66
+
>> savepath
67
+
```
68
+
69
+
For reference, the `npy-matlab` package is included in this artifact inside the `FORMALISE2025` directory.
70
+
71
+
Instructions are also available on [`npy-matlab`'s README](https://github.com/kwikteam/npy-matlab/blob/master/README.md).
72
+
73
+
4. Download the `data.tar.gz` file which contains all variations of datasets needed for reproducing results in the desired file structure from the following link: https://doi.org/10.5281/zenodo.14721214.
74
+
75
+
After downloading the file, move it to the `FORMALISE2025` directory and unpack it there (`tar -xzf data.tar.gz` if possible, but can also extract files using whatever file explorer is available on machine) so that the file tree now looks like
76
+
77
+
```pseudo
78
+
FORMALISE2025
79
+
├── data
80
+
│ ├── ZoomIn
81
+
│ ├── ZoomOut
82
+
│ ├── GTSRB
83
+
│ └── STMNIST
84
+
│ └── data.tar.gz
85
+
...
86
+
```
87
+
88
+
after which the `data.tar.gz` file can be deleted. Please make sure the organization of the folder is the same as shown above.
89
+
90
+
5. Create a conda environment with `Python v3.11` and install the requirements from `requirements.txt`.
91
+
92
+
For producing the results, the Anaconda distribution was used so its installation instructions are provided here; users can also follow general installation instructions [here](https://docs.conda.io/projects/conda/en/latest/user-guide/install/). When installing Anaconda in macOS, a `.pkg` file will be provided. Double-click the `.pkg` file and follow the prompts to install Anaconda. For Linux, a `.sh` script will be provided. Executing the command `bash anaconda-latest-Linux-x86_64.sh` and following the prompts will install Anaconda.
93
+
94
+
To activate conda in your terminal environment, you will have to restart it. Then, you can test that the installation was successful with
95
+
96
+
```bash
97
+
conda list
98
+
```
99
+
100
+
We can then create a `Python v3.11` environment with command
101
+
102
+
```bash
103
+
conda create --name <env_name> python=3.11
104
+
```
105
+
106
+
Then, activate the environment with and check its Python version
107
+
108
+
```bash
109
+
conda activate <env_name>
110
+
python --version
111
+
```
112
+
113
+
After the environment is activated, install the Python dependencies from `requirements.txt` along with the source files by running the following commands from the `FORMALISE2025` directory in your terminal
114
+
115
+
```bash
116
+
cd /path/to/nnv/code/examples/Submission/FORMALISE2025
117
+
118
+
# install requirements
119
+
pip install -r requirements.txt
120
+
121
+
# before installing source files, make sure to navigate to the src directory e.g.
122
+
cd src/ # from FORMALISE2025 directory
123
+
pip install -e .
124
+
```
125
+
126
+
Now all Python dependencies have been installed.
62
127
63
-
4. Modify the `.env` file to add the path to your NNV and npy-matlab directories (the repositories that were cloned earlier). For the `npy-matlab` repository, you'll want to reference the subfolder in the directory also called `npy-matlab`, e.g. `/some/path/to/npy-matlab/npy-matlab`.
128
+
6. Modify the `.env` file to add the path to your NNV and npy-matlab directories (the repositories that were cloned earlier). For the `npy-matlab` repository, you'll want to reference the subfolder in the directory also called `npy-matlab`, e.g. `/some/path/to/npy-matlab/npy-matlab`.
64
129
65
-
5. With all of these steps done, you are now ready to begin reproducing the artifacts.
130
+
7. With all of these steps done, you are now ready to begin reproducing the artifacts.
66
131
67
132
# Smoke Test Instructions (~1min)
68
133
@@ -93,7 +158,7 @@ Assuming the average runtime for the experiments remains as shown in the paper,
93
158
3. Run the following command to begin reproducing a subset of the artifacts:
94
159
95
160
```bash
96
-
chmod +x run_subset_vvn.sh && run_subset_vvn.sh
161
+
chmod +x run_subset_vvn.sh &&./run_subset_vvn.sh
97
162
```
98
163
99
164
# Reproducing a Subset of the Results pt. 2
@@ -105,7 +170,7 @@ There is additionally a script to reproduce a single sample from all variations
105
170
3. Run the following command to begin reproducing a subset of the artifacts:
0 commit comments