import os


patch_dir_list = ['generated_patch/vgg19/ImageNet',
                  'generated_patch/vgg19/KITTI',
                    'generated_patch/vgg19/MSCOCO',
                  'generated_patch/vgg19/black',
                  'generated_patch/vgg19/white'
                  ]
model = 'vgg19' #ensure the consistency of the model with the patch dir


for patch_dir in patch_dir_list:
        proxy_data = patch_dir.split('/')[-1]

        p = ' --patch-dir ' +'\'' + patch_dir +'\''

        m = ' --model '+ '\'' + model +'\''

        g = ' --GPU-device 2'

        out = proxy_data +'.txt'

        print('==========================================='+
                'CURRENT COMMEND: '+'python -u fooling_rate.py' + p + m + g +' >'+out
              +'===========================================')

        os.system('python -u fooling_rate.py' + p + m  + g + ' >' + out)

        print('==========================================='+
                patch_dir + ' '  + ' is done!'
              +'===========================================')

        #python - u fooling_rate.py - -model 'vgg19' - -GPU - device 2 - -patch-dir 'generated_patch/vgg19/ensemble' > ensemble.txt &
