You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 1.4 kB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # Examples
  2. ## Introduction
  3. This package includes application demos for all developed tools of MindArmour. Through these demos, you will soon
  4. master those tools of MindArmour. Let's Start!
  5. ## Preparation
  6. Most of those demos are implemented based on LeNet5 and MNIST dataset. As a preparation, we should download MNIST and
  7. train a LeNet5 model first.
  8. ### 1. download dataset
  9. The MNIST database of handwritten digits has a training set of 60,000 examples, and a test set of 10,000 examples
  10. . It is a subset of a larger set available from MNIST. The digits have been size-normalized and centered in a fixed-size image.
  11. ```sh
  12. cd examples/common/dataset
  13. mkdir MNIST
  14. cd MNIST
  15. mkdir train
  16. mkdir test
  17. cd train
  18. wget "http://yann.lecun.com/exdb/mnist/train-images-idx3-ubyte.gz"
  19. wget "http://yann.lecun.com/exdb/mnist/train-labels-idx1-ubyte.gz"
  20. gzip train-images-idx3-ubyte.gz -d
  21. gzip train-labels-idx1-ubyte.gz -d
  22. cd ../test
  23. wget "http://yann.lecun.com/exdb/mnist/t10k-images-idx3-ubyte.gz"
  24. wget "http://yann.lecun.com/exdb/mnist/t10k-labels-idx1-ubyte.gz"
  25. gzip t10k-images-idx3-ubyte.gz -d
  26. gzip t10k-labels-idx1-ubyte.gz -d
  27. ```
  28. ### 2. trian LeNet5 model
  29. After training the network, you will obtain a group of ckpt files. Those ckpt files save the trained model parameters
  30. of LeNet5, which can be used in 'examples/ai_fuzzer' and 'examples/model_security'.
  31. ```sh
  32. cd examples/common/networks/lenet5
  33. python mnist_train.py
  34. ```

MindArmour关注AI的安全和隐私问题。致力于增强模型的安全可信、保护用户的数据隐私。主要包含3个模块:对抗样本鲁棒性模块、Fuzz Testing模块、隐私保护与评估模块。 对抗样本鲁棒性模块 对抗样本鲁棒性模块用于评估模型对于对抗样本的鲁棒性,并提供模型增强方法用于增强模型抗对抗样本攻击的能力,提升模型鲁棒性。对抗样本鲁棒性模块包含了4个子模块:对抗样本的生成、对抗样本的检测、模型防御、攻防评估。