1. Install Python
2. install virtualenv
3. In virtual env:
- Install TensorFlow
- install keras
- activate keras for virtualenv to generate the keras.json file
- set keras backend to be tensorflow
- install Pillow
- install h5py
- install opencv-python
- install Mimicus
5. Run below commands under each dataset directory:
- MINIST: python gen_diff.py blackout 1 0.1 10 20 50 0
- ImageNet: python gen_diff.py occl 1 0.1 10 20 50 0
- Driving: python gen_diff.py light 1 0.1 10 20 50 0
- PDF: python gen_diff.py 2 0.1 10 20 50 0
- Drebin: python gen_diff.py 1 0.5 20 50 0
some Fedora commands:
# yum install python-virtualenv
# virtualenv --python /usr/bin/python2.7 env (this will create a dir called env under your virtualenv environment, fedora default is ~)
# . env/bin/activate (activate the created env)
## to activate keras and get the keras.json file
$ python (this will activate keras)
>>> import keras
>>> quit()
## sme packages might be missing when install mimicus
# yum install freetype-devel
# python -m pip install pkgconfig
没有评论:
发表评论