eth-sri / eran

ETH Robustness Analyzer for Deep Neural Networks
Apache License 2.0
320 stars 103 forks source link

Verification of own Dataset #108

Closed tomkolberg closed 2 years ago

tomkolberg commented 2 years ago

Hello,

I am relatively new to the field of neural networks. Now I have trained a neural network on the dataset of the German traffic sign recognition benchmark (GTSRB), for this I have chosen a pixel density of 30x30 pixels (input_shape =30x30x3). Since I also had problems with the tensorflow version as described in other posts, I converted my networks directly to the onnx format.

Due to the different format of my dataset, I rewrote the main.py class so that my dataset can now be loaded into ERAN.

However, when I now verify my network with the following console command, I get an analysis precision of 0/1, with 85 of 86 images returned as 'not considered, incorrectly classified'.

python3 . --netname <> --dataset gtsrb30 --domain deepzono --epsilon 0.01

So I wanted to ask if I missed something that I should have changed in the main class, or in another class, or if you have any idea what could cause this problem.

All related files are stored under the following Git repository, where only the main class was edited , and the test file, as well as the networks, are stored inside the data folder: https://github.com/tomkolberg/ERANV2 To help you find the parts I've edited, I've marked them all with the comment " # made changes here ".

It would be very helpful if you could help me to solve this problem. Thank you in advance.

mnmueller commented 2 years ago

Hello @tomkolberg,

Thank you for your interest in ERAN. Please understand that I can not fully debug 3rd party modifications to ERAN.

The error you encounter seems like either the loading of the network (unlikely) or the data (more likely) was not successful leading to almost all samples being misclassified and hence not considered for certification. I would recommend you to make sure that the data is provided in the expected format/order (a flattened representation of nhwc with the label prepended) and that you pass the correct normalization parameters (in the [0,1] not [0, 255] domain) to ERAN.

Cheers, Mark