2
0
mirror of https://github.com/Shawn-Shan/fawkes.git synced 2024-12-22 07:09:33 +05:30

update param;

This commit is contained in:
Shawn-Shan 2020-08-02 15:43:25 -05:00
parent 3c91395e97
commit 2b08b3ec8e

View File

@ -208,6 +208,13 @@ def main(*argv):
image_paths = [path for path in image_paths if "_cloaked" not in path.split("/")[-1]] image_paths = [path for path in image_paths if "_cloaked" not in path.split("/")[-1]]
protector = Fawkes(args.feature_extractor, args.gpu, args.batch_size) protector = Fawkes(args.feature_extractor, args.gpu, args.batch_size)
if args.mode == 'all':
for mode in ['min', 'low', 'mid', 'high']:
protector.run_protection(image_paths, mode=mode, th=args.th, sd=args.sd, lr=args.lr,
max_step=args.max_step,
batch_size=args.batch_size, format=args.format,
separate_target=args.separate_target, debug=args.debug, no_align=args.no_align)
else:
protector.run_protection(image_paths, mode=args.mode, th=args.th, sd=args.sd, lr=args.lr, protector.run_protection(image_paths, mode=args.mode, th=args.th, sd=args.sd, lr=args.lr,
max_step=args.max_step, max_step=args.max_step,
batch_size=args.batch_size, format=args.format, batch_size=args.batch_size, format=args.format,