Code Release and pre-trained models for InputRepair.
In this paper we describe InputRepair, an on-the-fly input repair technique for detected failure-inducing inputs. It is an input debugging and repairing technique for deep neural networks.
debug.py: code for find confusing regions from inputgrad_cam.py: code for calculating heatmap scores for each layerrepair.py: code for repairing the input regionskdes_generation.py: code for generating kde values for each layersearch_occlusion.py: code for the crash occlusion position for each testing image on which the original classifier begins to mis-predictstore_occlused_data.py: code to store the occlused testing datasetmodels/: pre-trained modelstmp/: temp filesimages/: additional results
- conda create --name myenv
- pip install -r requirements.txt
- To locate confusing regions: python debug.py --d "cifar10" --m "conv"
- To repair input: python repair.py --d "cifar10" --m "conv"
We evaluate the accuracy of Grad-CAM and InputRepair's debugging module (IR-Debug) with a set of occluded images that are mis-predicted by the DNN models. As shown in Table 4, IR-Debug always performs better than Grad-CAM. This demonstrates that the debugging module in InputRepair works well in practice.
