├── .gitignore ├── .gitmodules ├── README.md ├── data ├── pretrained_models │ └── README.md ├── val_data │ ├── val_data.json │ └── vocab_dict.json └── wordPOS │ ├── adjective.txt │ ├── adverb.txt │ ├── noun.txt │ └── verb.txt ├── dataloader.py ├── eval_step.py ├── hidden_keywords_attack.py ├── misc ├── __init__.py ├── inception.py ├── inception_utils.py ├── resnet.py ├── resnet_utils.py ├── rewards.py └── utils.py ├── models ├── AttEnsemble.py ├── AttModel.py ├── CaptionModel.py ├── FCModel.py ├── OldModel.py ├── ShowTellModel.py └── __init__.py ├── observed_keywords_attack.py ├── opts.py ├── run_hidden_keywords.sh ├── run_observed_keywords.sh ├── run_target_caption.sh ├── scripts ├── copy_model.sh ├── make_bu_data.py ├── prepro_feats.py ├── prepro_inception_feats.py ├── prepro_labels.py └── prepro_ngrams.py ├── target_caption_attack.py └── tools ├── README ├── cal_metric.py ├── calculate.py ├── calculate_pre_rec_all.py └── example.png /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wubaoyuan/adversarial-attack-to-caption/HEAD/.gitignore -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wubaoyuan/adversarial-attack-to-caption/HEAD/.gitmodules -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wubaoyuan/adversarial-attack-to-caption/HEAD/README.md -------------------------------------------------------------------------------- /data/pretrained_models/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wubaoyuan/adversarial-attack-to-caption/HEAD/data/pretrained_models/README.md -------------------------------------------------------------------------------- /data/val_data/val_data.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wubaoyuan/adversarial-attack-to-caption/HEAD/data/val_data/val_data.json -------------------------------------------------------------------------------- /data/val_data/vocab_dict.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wubaoyuan/adversarial-attack-to-caption/HEAD/data/val_data/vocab_dict.json -------------------------------------------------------------------------------- /data/wordPOS/adjective.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wubaoyuan/adversarial-attack-to-caption/HEAD/data/wordPOS/adjective.txt -------------------------------------------------------------------------------- /data/wordPOS/adverb.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wubaoyuan/adversarial-attack-to-caption/HEAD/data/wordPOS/adverb.txt -------------------------------------------------------------------------------- /data/wordPOS/noun.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wubaoyuan/adversarial-attack-to-caption/HEAD/data/wordPOS/noun.txt -------------------------------------------------------------------------------- /data/wordPOS/verb.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wubaoyuan/adversarial-attack-to-caption/HEAD/data/wordPOS/verb.txt -------------------------------------------------------------------------------- /dataloader.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wubaoyuan/adversarial-attack-to-caption/HEAD/dataloader.py -------------------------------------------------------------------------------- /eval_step.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wubaoyuan/adversarial-attack-to-caption/HEAD/eval_step.py -------------------------------------------------------------------------------- /hidden_keywords_attack.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wubaoyuan/adversarial-attack-to-caption/HEAD/hidden_keywords_attack.py -------------------------------------------------------------------------------- /misc/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /misc/inception.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wubaoyuan/adversarial-attack-to-caption/HEAD/misc/inception.py -------------------------------------------------------------------------------- /misc/inception_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wubaoyuan/adversarial-attack-to-caption/HEAD/misc/inception_utils.py -------------------------------------------------------------------------------- /misc/resnet.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wubaoyuan/adversarial-attack-to-caption/HEAD/misc/resnet.py -------------------------------------------------------------------------------- /misc/resnet_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wubaoyuan/adversarial-attack-to-caption/HEAD/misc/resnet_utils.py -------------------------------------------------------------------------------- /misc/rewards.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wubaoyuan/adversarial-attack-to-caption/HEAD/misc/rewards.py -------------------------------------------------------------------------------- /misc/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wubaoyuan/adversarial-attack-to-caption/HEAD/misc/utils.py -------------------------------------------------------------------------------- /models/AttEnsemble.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wubaoyuan/adversarial-attack-to-caption/HEAD/models/AttEnsemble.py -------------------------------------------------------------------------------- /models/AttModel.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wubaoyuan/adversarial-attack-to-caption/HEAD/models/AttModel.py -------------------------------------------------------------------------------- /models/CaptionModel.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wubaoyuan/adversarial-attack-to-caption/HEAD/models/CaptionModel.py -------------------------------------------------------------------------------- /models/FCModel.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wubaoyuan/adversarial-attack-to-caption/HEAD/models/FCModel.py -------------------------------------------------------------------------------- /models/OldModel.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wubaoyuan/adversarial-attack-to-caption/HEAD/models/OldModel.py -------------------------------------------------------------------------------- /models/ShowTellModel.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wubaoyuan/adversarial-attack-to-caption/HEAD/models/ShowTellModel.py -------------------------------------------------------------------------------- /models/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wubaoyuan/adversarial-attack-to-caption/HEAD/models/__init__.py -------------------------------------------------------------------------------- /observed_keywords_attack.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wubaoyuan/adversarial-attack-to-caption/HEAD/observed_keywords_attack.py -------------------------------------------------------------------------------- /opts.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wubaoyuan/adversarial-attack-to-caption/HEAD/opts.py -------------------------------------------------------------------------------- /run_hidden_keywords.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wubaoyuan/adversarial-attack-to-caption/HEAD/run_hidden_keywords.sh -------------------------------------------------------------------------------- /run_observed_keywords.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wubaoyuan/adversarial-attack-to-caption/HEAD/run_observed_keywords.sh -------------------------------------------------------------------------------- /run_target_caption.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wubaoyuan/adversarial-attack-to-caption/HEAD/run_target_caption.sh -------------------------------------------------------------------------------- /scripts/copy_model.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wubaoyuan/adversarial-attack-to-caption/HEAD/scripts/copy_model.sh -------------------------------------------------------------------------------- /scripts/make_bu_data.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wubaoyuan/adversarial-attack-to-caption/HEAD/scripts/make_bu_data.py -------------------------------------------------------------------------------- /scripts/prepro_feats.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wubaoyuan/adversarial-attack-to-caption/HEAD/scripts/prepro_feats.py -------------------------------------------------------------------------------- /scripts/prepro_inception_feats.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wubaoyuan/adversarial-attack-to-caption/HEAD/scripts/prepro_inception_feats.py -------------------------------------------------------------------------------- /scripts/prepro_labels.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wubaoyuan/adversarial-attack-to-caption/HEAD/scripts/prepro_labels.py -------------------------------------------------------------------------------- /scripts/prepro_ngrams.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wubaoyuan/adversarial-attack-to-caption/HEAD/scripts/prepro_ngrams.py -------------------------------------------------------------------------------- /target_caption_attack.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wubaoyuan/adversarial-attack-to-caption/HEAD/target_caption_attack.py -------------------------------------------------------------------------------- /tools/README: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wubaoyuan/adversarial-attack-to-caption/HEAD/tools/README -------------------------------------------------------------------------------- /tools/cal_metric.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wubaoyuan/adversarial-attack-to-caption/HEAD/tools/cal_metric.py -------------------------------------------------------------------------------- /tools/calculate.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wubaoyuan/adversarial-attack-to-caption/HEAD/tools/calculate.py -------------------------------------------------------------------------------- /tools/calculate_pre_rec_all.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wubaoyuan/adversarial-attack-to-caption/HEAD/tools/calculate_pre_rec_all.py -------------------------------------------------------------------------------- /tools/example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wubaoyuan/adversarial-attack-to-caption/HEAD/tools/example.png --------------------------------------------------------------------------------