克隆本项目并安装依赖:
git clone https://github.com/ydc123/AI-Testing.git
cd AI-Testing/image
pip install requirements.txt
或者从启智社区上克隆本项目
git clone https://openi.pcl.ac.cn/Numbda/AI-Testing.git
cd AI-Testing/image
pip install requirements.txt
本开源项目的image/Datasets/中提供了Cifar10和ILSVR2012-ImageNet数据集。用户可使用上述数据集,或按照完整API文档,进行数据集扩展。
用户需要使用所选数据集的训练集,执行模型训练过程。由于空间所限,本项目中统一不提供数据集对应的训练集,仅给出测试集以供测试。
使用cd image/test进入test目录。重明开源项目提供了几个示例的算法文件。如测试在FGSM攻击算法下,Resnet20模型的鲁棒性结果:
# 使用接口文件默认参数
python testimport.py
# 自定义参数调用
python testimport.py --attack_method "FGSM" --evaluation_method "ALDp" --model_dir ""
上述命令均将测试ResNet20模型,在FGSM算法攻击下,ALDp指标的评测结果变化。并将结果存在image/test/temp。
Content type
Image
Digest
sha256:7313dbcda…
Size
3.7 GB
Last updated
over 3 years ago
docker pull wenh06/ai-testing-image