Add dataset card, link to paper and GitHub repository

#1
by nielsr HF Staff - opened
Files changed (1) hide show
  1. README.md +61 -0
README.md CHANGED
@@ -1,3 +1,64 @@
1
  ---
2
  license: mit
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: mit
3
+ task_categories:
4
+ - image-classification
5
+ tags:
6
+ - robustness
7
+ - vssm
8
+ - mamba
9
  ---
10
+
11
+ This repository contains the dataset and evaluation artifacts for the paper [Towards Evaluating the Robustness of Visual State Space Models](https://huggingface.co/papers/2406.09407).
12
+
13
+ Vision State Space Models (VSSMs) are a novel architecture that combines the strengths of recurrent neural networks and latent variable models. This work presents a comprehensive evaluation of VSSMs' robustness under various perturbation scenarios, including:
14
+ - **Adversarial attacks**: White-box, Frequency-based, and Transfer-based Black-box attacks.
15
+ - **Information Drop**: Occlusions along scanning lines and patch dropping.
16
+ - **Natural/Common Corruptions**: Evaluation on ImageNet-C, ImageNet-A, ImageNet-R, ImageNet-S, ImageNet-B, and ImageNet-E.
17
+ - **Downstream Tasks**: Robustness on object detection and segmentation (COCO-C, ADE20K-C).
18
+
19
+ **GitHub Repository:** [HashmatShadab/MambaRobustness](https://github.com/HashmatShadab/MambaRobustness)
20
+
21
+ ## Installation
22
+
23
+ To set up the environment, follow these steps from the official repository:
24
+
25
+ ```bash
26
+ conda create -n mamba_robust
27
+ conda install pytorch==1.13.0 torchvision==0.14.0 torchaudio==0.13.0 pytorch-cuda=11.7 -c pytorch -c nvidia
28
+ pip install -r req.txt
29
+ cd kernels/selective_scan && pip install .
30
+ ```
31
+
32
+ ## Sample Usage
33
+
34
+ ### Robustness against Adversarial attacks
35
+
36
+ To craft adversarial examples using Projected Gradient Descent (PGD) at a perturbation budget of 8/255 with 20 attack steps:
37
+
38
+ ```bash
39
+ cd classification/
40
+ python generate_adv_images.py --data_dir <path to dataset> --attack_name pgd --source_model_name <model_name> --epsilon 8 --attack_steps 20
41
+ ```
42
+
43
+ ### Inference on ImageNet Corrupted datasets
44
+
45
+ For evaluating on ImageNet-A, ImageNet-R, or ImageNet-S:
46
+
47
+ ```bash
48
+ cd classification/
49
+ python inference.py --dataset <dataset name> --data_dir <path to corrupted dataset> --batch_size <batch_size> --source_model_name <model name>
50
+ ```
51
+
52
+ Supported datasets for the `--dataset` argument include: `imagenet-b`, `imagenet-e`, `imagenet-v2`, `imagenet-a`, `imagenet-r`, and `imagenet-s`.
53
+
54
+ ## Citation
55
+
56
+ ```bibtex
57
+ @article{shadab2024towards,
58
+ title={Towards Evaluating the Robustness of Visual State Space Models},
59
+ author={Shadab Malik, Hashmat and Shamshad, Fahad and Naseer, Muzammal and Nandakumar, Karthik and Shahbaz Khan, Fahad and Khan, Salman},
60
+ journal={arXiv e-prints},
61
+ pages={arXiv--2406},
62
+ year={2024}
63
+ }
64
+ ```