Skip to content
/ MLALP Public

PyTorch implementation of "Generating Multi-label Adversarial Examples by Linear Programming", IJCNN 2020.

Notifications You must be signed in to change notification settings

hinanmu/MLALP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Generate Multi-label Adversarial Examples by Linear Programming

Requirements

  • python-3.6.6
  • numpy-1.16.5
  • torch-1.3.1
  • torchnet-0.0.4
  • torchvision-0.2.0
  • tqdm-4.31.1
  • mosek-9.1.7

Usage

conda env create -f mlalp_conda_env.yaml
  • download the VOC2007 and VOC2012 dataset and move to the folder 'data/voc2007/VOCdevkit/VOC2012/' or 'data/voc2012/VOCdevkit/VOC2012/'
  • download ML-GCN model and ML-LIW model from model download or you can train the model yourself
cd ml_gcn_model or cd ml_liw_model
python train.py
  • move the model to folder 'checkpoint/mlgcn' or 'checkpoint/mlliw'
  • go the code folder
cd src
  • run attack
python demo_mlgcn_voc2007.py --adv_batch_size=10 --adv_method='mla_lp' --target_type='hide_single'
python demo_mlgcn_voc2012.py --adv_batch_size=10 --adv_method='mla_lp' --target_type='hide_single'
python demo_mlliw_voc2007.py --adv_batch_size=10 --adv_method='mla_lp' --target_type='hide_single'
python demo_mlliw_voc2012.py --adv_batch_size=10 --adv_method='mla_lp' --target_type='hide_single'
  • test attack performance

Adversarial Data and Model

Thanks

About

PyTorch implementation of "Generating Multi-label Adversarial Examples by Linear Programming", IJCNN 2020.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages