Closed satoshiSchubert closed 3 years ago
Hi @bossConneR , To train your own adv example targeting a specified label such as a car, banana, etc, you need to do the following:
data_sampling
folder.attack_methods/base_logic.py
and implement a predefined abstract method.
Especially, this method matters
@abstractmethod
def build_model_attack_graph(self, **kwargs):
"""
Prepare an end-to-end differentiable model.
Args:
**kwargs: Other named arguments.
"""
raise NotImplementedError
You need to analyze the object detector to fetch the targeted output you want for adversarial sticker generation. This method also defines the optimization process, which is to calculate the adversarial perturbation s.t fetched output ~ target distribution. You can check eotb_attack.py
for more details.
Thank you for such a detailed reply! I will try it :D
Thanks for your wonderful work. I'd like to know how to train my own adv examples trargeting a certain object, such as cars, etc. If it is possible, what should i do? need i put my dataset in a certain folder or modify the code? Looking forward to your reply:D