Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
|
4 years ago | |
---|---|---|
.. | ||
src | 4 years ago | |
README.md | 4 years ago | |
coco_attack_genetic.py | 4 years ago | |
coco_attack_pgd.py | 4 years ago | |
coco_attack_pso.py | 4 years ago |
Dataset used: COCO2017
Install MindSpore.
Download the dataset COCO2017.
We use COCO2017 as dataset in this example.
Install Cython and pycocotool, and you can also install mmcv to process data.
pip install Cython
pip install pycocotools
pip install mmcv==0.2.14
And change the COCO_ROOT and other settings you need in config.py
. The directory structure is as follows:
.
└─cocodataset
├─annotations
├─instance_train2017.json
└─instance_val2017.json
├─val2017
└─train2017
You can download the pre-trained model checkpoint file here.
python coco_attack_pgd.py --pre_trained [PRETRAINED_CHECKPOINT_FILE]
Adversarial samples will be generated and saved as pickle file.
MindArmour关注AI的安全和隐私问题。致力于增强模型的安全可信、保护用户的数据隐私。主要包含3个模块:对抗样本鲁棒性模块、Fuzz Testing模块、隐私保护与评估模块。 对抗样本鲁棒性模块 对抗样本鲁棒性模块用于评估模型对于对抗样本的鲁棒性,并提供模型增强方法用于增强模型抗对抗样本攻击的能力,提升模型鲁棒性。对抗样本鲁棒性模块包含了4个子模块:对抗样本的生成、对抗样本的检测、模型防御、攻防评估。
Python Markdown Text other