apply license of the package mosek on https://www.mosek.com/products/academic-licenses/ and move the license file 'mosek.lic' to folder /home/username/mosek/mosek.lic
create new conda environment(the environment name is mlalp)
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