vtu81 / backdoor-toolbox

A compact toolbox for backdoor attacks and defenses.
143 stars 18 forks source link

Inquiry about the imagenette2 dataset and modifications required for using a new dataset #4

Closed FZU-LW closed 12 months ago

FZU-LW commented 1 year ago

Hi, Tinghao:

First and foremost, I would like to express my appreciation for your remarkable work on this repository. It is truly outstanding!

Could you kindly provide some information about the imagenette2 dataset? I'm not familiar with this dataset.

Additionally, I am considering utilizing a different dataset for my project. In order to accomplish this, could you please guide me on which files or sections of the codebase I would need to modify? Any insight or instructions you can offer in this regard would be immensely helpful.

Once again, thank you for your exceptional efforts in creating and maintaining this repository. I look forward to your response.

Best regards

vtu81 commented 12 months ago

Hi FZU-LW,

Thanks for the question about datasets. I apologize that the current version does not support imagenette (only supporting full-size ImageNet dataset now).

As for customizing a new dataset of your own, you may need to check the following files:

cleanser.py
config.py
create_clean_set.py
create_poisoned_set.py
train_on_cleansed_set.py
train_on_poisoned_set.py
utils/default_args.py
utils/supervisor.py
utils/default_args.py
other_attacks_tool_box/backdoor_attack.py
other_defenses_tool_box/backdoor_defense.py
...

and follow my existing code (e.g., search for code snippets like if args.dataset == 'cifar10').

Best, Tinghao

FZU-LW commented 12 months ago

Thanks!