|
|
@@ -41,7 +41,6 @@ class FaceAdversarialAttack(object): |
|
|
|
input_img (numpy.ndarray): The input image. |
|
|
|
target_img (numpy.ndarray): The target image. |
|
|
|
seed (int): optional Sets custom seed for reproducability. Default is generated randomly. |
|
|
|
|
|
|
|
""" |
|
|
|
|
|
|
|
if (seed is not None): np.random.seed(seed) |
|
|
@@ -76,10 +75,9 @@ class FaceAdversarialAttack(object): |
|
|
|
Args: |
|
|
|
attack_method (Sting) : Including target attack and non-target attack. |
|
|
|
|
|
|
|
Returns: |
|
|
|
Returns: |
|
|
|
Tensor, adversarial image. |
|
|
|
Tensor, mask image. |
|
|
|
|
|
|
|
""" |
|
|
|
|
|
|
|
if attack_method == "non-target attack": |
|
|
|