- Fridtjof Storm Flaate | fridtjsf@stud.ntnu.no
In this project we will implement two CNN's, Inception V3 and Resnet-18. These models will be trained on the ISIC2018 and ISIC2019 datasets. Furthermore, we will implement two types of adversarial attacks to pertubate input images and try to fool the models. When this milestone is finished, we will extract kernels and other parameters from the model to train a adversarial detector model, which are trained on perturbated and non-pertubated images.
data/
- Directory for storing data filesaugmented_data/
- Directory for storing augmented data filesmodels/
- Default directory for trained and tested modelsrun_*
- Files used to run python scriptsrun_test_multiprocessing.py
: Script to evaluate the number of processors your computer can handlerun_data_augmentation.py
: Script to perform the data augmentation of dataset. Saves the augmented data into theaugmented_data/
directory.run_train_model.py
: Script to load in data, train and test model, uses parameters defined in theconfig.py
file. Will also save the model and the config.py file used to get that model.
*_helper
- Files used for helper functionstrain_model_helper.py
: Helper functions related to therun_train_model.py
file.train_model()
test_model()
get_category_counts()
random_split()
get_data_loaders()
data_exploration_helper.py
: Helper functions related to EDA (Exploratory Data Analysis)dataset_overview()
perform_eda()
misc_helper.py
: A collection of miscellaneous helper functions that do not have a specific category assignmenttruncated_uuid4()
get_trained_or_default_model()
save_model_and_parameters_to_file()
load_model_from_file()
file_exists()
folder_exists()
adversarial_attacks_helper.py
: Helper functions related to adversarial attacks
customDataset.py
: Custom dataset which inherits fromtorch.data.utils.Dataset
. Collects dataset based on the value provided inconfig.py
parameter file.README.md
- This file, containing information about the project.
- Clone the repo and enter directory
adversarial_mitigation
git clone https://github.com/StormFlaate/adversarial_mitigation.git
- create environment
conda create -n adv_mit python=3.10
- activate environment
conda activate adv_mit