All Projects → anuragarnab → adversarial-attacks

anuragarnab / adversarial-attacks

Licence: MIT license
Code for our CVPR 2018 paper, "On the Robustness of Semantic Segmentation Models to Adversarial Attacks"

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to adversarial-attacks

Enet
ENet: A Deep Neural Network Architecture for Real-Time Semantic Segmentation
Stars: ✭ 530 (+488.89%)
Mutual labels:  caffe, semantic-segmentation
Cascaded Fcn
Source code for the MICCAI 2016 Paper "Automatic Liver and Lesion Segmentation in CT Using Cascaded Fully Convolutional NeuralNetworks and 3D Conditional Random Fields"
Stars: ✭ 296 (+228.89%)
Mutual labels:  caffe, semantic-segmentation
Vpgnet
VPGNet: Vanishing Point Guided Network for Lane and Road Marking Detection and Recognition (ICCV 2017)
Stars: ✭ 382 (+324.44%)
Mutual labels:  caffe, semantic-segmentation
Jacinto Ai Devkit
Training & Quantization of embedded friendly Deep Learning / Machine Learning / Computer Vision models
Stars: ✭ 49 (-45.56%)
Mutual labels:  caffe, semantic-segmentation
Pixelnet
The repository contains source code and models to use PixelNet architecture used for various pixel-level tasks. More details can be accessed at <http://www.cs.cmu.edu/~aayushb/pixelNet/>.
Stars: ✭ 194 (+115.56%)
Mutual labels:  caffe, semantic-segmentation
Scale-Adaptive-Network
Semantic Image Segmentation by Scale-Adaptive Networks (TIP 2019)
Stars: ✭ 42 (-53.33%)
Mutual labels:  caffe, semantic-segmentation
Dsrg
Weakly-Supervised Semantic Segmentation Network with Deep Seeded Region Growing (CVPR 2018).
Stars: ✭ 206 (+128.89%)
Mutual labels:  caffe, semantic-segmentation
PSPNet-Pytorch
Implemetation of Pyramid Scene Parsing Network in Pytorch
Stars: ✭ 26 (-71.11%)
Mutual labels:  caffe, semantic-segmentation
Classification Nets
Implement popular models by different DL framework. Such as tensorflow and caffe
Stars: ✭ 17 (-81.11%)
Mutual labels:  caffe
kitti deeplab
Inference script and frozen inference graph with fine tuned weights for semantic segmentation on images from the KITTI dataset.
Stars: ✭ 26 (-71.11%)
Mutual labels:  semantic-segmentation
CVPR2021 PLOP
Official code of CVPR 2021's PLOP: Learning without Forgetting for Continual Semantic Segmentation
Stars: ✭ 102 (+13.33%)
Mutual labels:  semantic-segmentation
wasr network
WaSR Segmentation Network for Unmanned Surface Vehicles v0.5
Stars: ✭ 32 (-64.44%)
Mutual labels:  semantic-segmentation
Deeplearning-digital-pathology
Full package for applying deep learning to virtual slides.
Stars: ✭ 59 (-34.44%)
Mutual labels:  caffe
SUIM
Semantic Segmentation of Underwater Imagery: Dataset and Benchmark. #IROS2020
Stars: ✭ 53 (-41.11%)
Mutual labels:  semantic-segmentation
ppq
PPL Quantization Tool (PPQ) is a powerful offline neural network quantization tool.
Stars: ✭ 281 (+212.22%)
Mutual labels:  caffe
caffe-mobilenet v2
caffe based mobilenet v2 deploy
Stars: ✭ 29 (-67.78%)
Mutual labels:  caffe
DeepLab-V3
Google DeepLab V3 for Image Semantic Segmentation
Stars: ✭ 103 (+14.44%)
Mutual labels:  semantic-segmentation
superpixelRefinement
Superpixel-based Refinement for Object Proposal Generation (ICPR 2020)
Stars: ✭ 24 (-73.33%)
Mutual labels:  caffe
deep-parking
Code to reproduce 'Deep Learning for Decentralized Parking Lot Occupancy Detection' paper.
Stars: ✭ 81 (-10%)
Mutual labels:  caffe
Fast-SCNN pytorch
A PyTorch Implementation of Fast-SCNN: Fast Semantic Segmentation Network(PyTorch >= 1.4)
Stars: ✭ 30 (-66.67%)
Mutual labels:  semantic-segmentation

On the Robustness of Semantic Segmentation Models to Adversarial Attacks

This code performs the experiments presented in our paper, On the Robustness of Semantic Segmentation Models to Adversarial Attacks. The code has been refactored from the version used to perform the experiments in the paper, but should reproduce the results.

If you find this work useful, please cite

@inproceedings{arnab_cvpr_2018,
	title={On the Robustness of Semantic Segmentation Models to Adversarial Attacks},
	author={Arnab, Anurag and Miksik, Ondrej and Torr, Philip H. S.},
	booktitle={CVPR},
	year={2018}
}

Installation

The adversarial attacks are implemented in the Caffe framework. To run the code, Caffe must be installed and pycaffe should be present in the $PYTHONPATH environment variable.

Adversarial attacks

Variants of the FGSM attack, which produces adversarial perturbations with bounded l_{infinity} norm, are implemented in attacks.py. The code does not depend on the version of Caffe being used. Therefore, any fork of Caffe can be used (as long as it is in $PYTHONPATH), allowing many different types of models to be attacked.

Demos

Segmentation on Cityscapes

Run ./examples/demo_cityscapes.sh. You should see the following in the output directory which will be created.

Input image Original prediction Adversarial prediction
Input image Original prediction Adversarial prediction

Segmentation on Pascal VOC

Run ./examples/demo_voc.sh. You should see the following in the output directory which will be created.

Input image Original prediction Adversarial prediction
Input image Original prediction Adversarial prediction

ImageNet classification

Run ../examples/demo_imagenet.sh. You should see

Original image Adversarial image
Original image Adversarial image
Prediction of original image
[281 282 285 277 287]
n02123045 tabby, tabby cat                                   0.312
n02123159 tiger cat                                          0.238
n02124075 Egyptian cat                                       0.124
n02119022 red fox, Vulpes vulpes                             0.101
n02127052 lynx, catamount                                    0.071

Prediction of adversarial image
[274 272 277 273 278]
n02115913 dhole, Cuon alpinus                                1.000
n02114855 coyote, prairie wolf, brush wolf, Canis latrans    0.000
n02119022 red fox, Vulpes vulpes                             0.000
n02115641 dingo, warrigal, warragal, Canis dingo             0.000
n02119789 kit fox, Vulpes macrotis                           0.000

Running on your own images

You can modify the demo script, or refer to opts.py for the command line arguments that need to be passed to the main.py. Note the keys which are expected to be in the model definition protoxt, as described next

Model definitions

The model defintion prototxt should set force_backward: true. This is necessary to compute gradients. The code assumes that there are nodes in the graph named data, label and output. These are the RGB image, the label and logits (not softmax-normalised) predicted by the network. An example of this is the here

Contact

For any queries, contact [email protected]. Pull requests are also welcome.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].