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.1 kB

5 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # mnist demo
  2. ## Introduction
  3. The MNIST database of handwritten digits, available from this page, has a training set of 60,000 examples, and a test set of 10,000 examples. It is a subset of a larger set available from MNIST. The digits have been size-normalized and centered in a fixed-size image.
  4. ## run demo
  5. ### 1. download dataset
  6. ```sh
  7. $ cd example/mnist_demo
  8. $ mkdir MNIST_unzip
  9. $ cd MNIST_unzip
  10. $ mkdir train
  11. $ mkdir test
  12. $ cd train
  13. $ wget "http://yann.lecun.com/exdb/mnist/train-images-idx3-ubyte.gz"
  14. $ wget "http://yann.lecun.com/exdb/mnist/train-labels-idx1-ubyte.gz"
  15. $ gzip train-images-idx3-ubyte.gz -d
  16. $ gzip train-labels-idx1-ubyte.gz -d
  17. $ cd ../test
  18. $ wget "http://yann.lecun.com/exdb/mnist/t10k-images-idx3-ubyte.gz"
  19. $ wget "http://yann.lecun.com/exdb/mnist/t10k-labels-idx1-ubyte.gz"
  20. $ gzip t10k-images-idx3-ubyte.gz -d
  21. $ gzip t10k-images-idx3-ubyte.gz -d
  22. $ cd ../../
  23. ```
  24. ### 1. trian model
  25. ```sh
  26. $ python mnist_train.py
  27. ```
  28. ### 2. run attack test
  29. ```sh
  30. $ mkdir out.data
  31. $ python mnist_attack_jsma.py
  32. ```
  33. ### 3. run defense/detector test
  34. ```sh
  35. $ python mnist_defense_nad.py
  36. $ python mnist_similarity_detector.py
  37. ```

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