Frequency-based Optimal Style Mix
Install packages
$ pip install pipenv
$ virtualenv -p ~/.pyenv/versions/3.10.4/bin/python ~/venvs/fosmix
$ source ~/venvs/fosmix/bin/activate
$ (fosmix) pip install -r requirements.txt
Modify the installed packages
$ (fosmix) chmod 777 modify_package_contents.sh
$ (fosmix) ./modify_package_contents.sh
Train the model
$ (fosmix) ./train.sh
Hyper parameters with * is required.
--dataset (str*) : Select the dataset.
--n_epochs (int*): Number of training epochs.
--ver (int*): Version.
--final (bool): Use the final model parameters for testing.
--randomize (bool*): Randomize images ot not, i.e., whether to use the baseline or the proposal.
--optimize (bool*): Optimize the mask or not. When optimize
is 1, randomize
is always 1.
--aug_color (float): Probability of color change in augmentation.
--MFI (int*): Mask From Image or not, whether to generate the OPTIMAL MASK from the image.
--fullmask (int*): Use FULL MIX or not. You can Also use the optimize
together with this option. If fullmask
is 1, randomize
must always be set to 1 as well.