# U-Net-based Prediction of Concealed Volume Loss - Dataset

This repository contains the data and associated cross-validation artifacts for the paper *U-Net-based Prediction of Concealed Volume Loss in AZ31 from Optical Corrosion Imprints and As-Exposed Surface Topography*
(https://doi.org/10.1002/aidi.70168)

Dataset: https://doi.org/10.15480/882.17491

The code used to preprocess the data, train the models, and generate the predictions is published under the BSD-3 license: https://collaborating.tuhh.de/m-29/software/ai2

Note that the data in the `data` folder is a processed subset of the data originally collected by Song et al. and described in:

C. Song, B. Vaghefinazari, T. Würger, A. Lisitsyna, D. Mei, M. Nienaber, J. Bohlen, M. L. Zheludkevich, S. Albarqouni, C. Feiler, S. V. Lamaka, *Corrosion Science* **2025**, *250* 112903 (https://doi.org/10.1016/j.corsci.2025.112903)

Data Collectors: \
Lars Dammann<sup> 1, 2</sup> ORCID: [0000-0001-5759-3896](https://orcid.org/0000-0001-5759-3896) \
Ci Song<sup> 1</sup> ORCID: [0009-0000-9214-7349](https://orcid.org/0009-0000-9214-7349)

Contributing Researchers: \
Christian Feiler<sup> 1, 2, 3</sup> ORCID: [0000-0003-4312-7629](https://orcid.org/0000-0003-4312-7629) \
Sviatlana V. Lamaka<sup> 1</sup> ORCID: [0000-0002-0349-0899](https://orcid.org/0000-0002-0349-0899)\
Bahram Vaghefinazari<sup> 1</sup> ORCID: [0000-0001-5035-6476](https://orcid.org/0000-0001-5035-6476)

<sup> 1</sup> Institute of Surface Science, Helmholtz-Zentrum Hereon, Geesthacht, Germany. \
<sup> 2</sup> Institute for Interface Physics and Engineering, Hamburg University of Technology, Hamburg, Germany. \
<sup> 3</sup> Kiel Nano, Surface and Interface Science KiNSIS, Kiel University, Kiel, Germany.

## Contents

The release includes:

- `data`: the processed training and test data
- `models`: the trained cross-validation model artifacts
- `model-configs`: JSON configuration files for the trained cross-validation models
- `predictions`: fold-level inference outputs for the cross-validation test samples

## Training and test data
### Data Structure and Sample Names

The published data is organized into the following folders:

```text
data/
├── after/
│   ├── height/
│   └── image/
├── before/
│   ├── height/
│   └── image/
├── mask/
└── modulator-list.csv
```

Each sample is stored as a coordinated set of modalities:

- Before image: optical corrosion imprint before removal
- Before height: corresponding height information before removal
- After image: optical image of the cleaned or reference state
- After height: corresponding height information after removal
- Mask: corrosion region annotation used for training and evaluation

The files are aligned by sample ID, and the exact image dimensions and numerical encoding are preserved in the files themselves.

The main data locations are:

- `data/before/image/` - before-corrosion RGB images in PNG format
- `data/before/height/` - before-corrosion height maps in NPY format
- `data/after/image/` - after-corrosion RGB images in PNG format
- `data/after/height/` - after-corrosion height maps in NPY format
- `data/mask/` - binary or labeled corrosion masks in NPY format
- `data/modulator-list.csv` - sample metadata and target values

Samples that share the same name stem are the same modulator. In practice, the first three dash-separated parts identify the modulator, and the final suffix distinguishes replicate or sample instances. For example, the sample `3-7-2-1` is available as:

- `data/before/image/3-7-2-1.png`
- `data/before/height/3-7-2-1.npy`
- `data/after/image/3-7-2-1.png`
- `data/after/height/3-7-2-1.npy`
- `data/mask/3-7-2-1.npy`

### Metadata

The file `data/modulator-list.csv` provides the master lookup table for the dataset.

Columns:

- unnamed first column - export index that can be ignored when loading the file
- `id` - sample identifier matching the file stem
- `name` - modulator or compound name associated with the sample
- `volumeloss` - volume loss as determined by Song et al. for the corresponding modulator

The file contains 1196 sample entries, but only a subset of these samples is included in the processed `data` folder.

The identifier structure appears hierarchical and encodes the experimental grouping used during data collection. Samples with the same first three components share the same modulator, and the last number distinguishes sample variants within that group.

## Trained Models

The data in the `data` directory was divided into 18 cross-validation folds, each containing `train`, `val`, and `test` directories. For more details, see the paper. To reproduce the splits or retrain the models, use the associated training script `ai2/crossvalidation.py` from: https://collaborating.tuhh.de/m-29/software/ai2/-/blob/main/ai2/crossvalidation.py

On each `train` directory of each of the 18 folds a regression model was trained. The results are stored in:

- `models`: the best PyTorch Lightning checkpoints for each fold, selected according to the validation score
- `model-configs`: JSON files containing the hyperparameters, normalization settings, and trainer configuration for each model

## Predictions

Each of the 18 models was used to generate predictions on its corresponding `test` split.

- `predictions/*/test/`: fold-level inference outputs for the test samples in each cross-validation run

These predictions can be reproduced by running the `ai2/crossvalidation.py` script from: https://collaborating.tuhh.de/m-29/software/ai2/-/blob/main/ai2/crossvalidation.py

## License

The dataset is released under the CC BY 4.0 license.

## Citation

Please cite the associated publications when using this dataset:

*U-Net-based Prediction of Concealed Volume Loss in AZ31 from Optical Corrosion Imprints and As-Exposed Surface Topography*
(https://doi.org/10.1002/aidi.70168)

Citation for the unprocessed data used in the `data` folder:

C. Song, B. Vaghefinazari, T. Würger, A. Lisitsyna, D. Mei, M. Nienaber, J. Bohlen, M. L. Zheludkevich, S. Albarqouni, C. Feiler, S. V. Lamaka, *Corrosion Science* **2025**, *250* 112903 (https://doi.org/10.1016/j.corsci.2025.112903).

If you use the dataset in your work, also please also cite the dataset: https://doi.org/10.15480/882.17491
