- Run
pip install requirements.txt
to install all the required packages.
- Run all training and validation files with the
-c
argument and give the path to the config file. Some sample config files are given in the configs folder and can be customized. For e.g. To run a 5-shot OULU meta-training experiment,python meta-oulu.py -c configs/oulu/5-shot/train.config
.
Note: All files when run for the first time will take some time to generate the metadataset based on the actual data.
This metadataset should be saved in the file specified in the bookkeeping_path
in the configs files and later runs will reuse this file.
I think this depends on the seed given in the configs otherwise learn2learn will index the files differently each run so the seed should be set in the configs.
- MNIST examples under the mnist folder. A sample config file for it is also given and can be customized.
Run
python meta_mnist.py -c configs/mnist/train_config.yml
.
Various scripts to preprocess all datasets are provided in preprocessing folder.
- LGSC Model (Feng et. al., 2020)
- Resnet18
Meta-training and meta-testing scripts for both models are given.
Pass the checkpoint
flag in the configs to the weights to restart training from that checkpoint.
Continued log folders will be marked with a CHECKPOINT
file.
-
Finn, C., Abbeel, P., & Levine, S. (2017, July). Model-agnostic meta-learning for fast adaptation of deep networks. In International Conference on Machine Learning (pp. 1126-1135). PMLR.
-
Feng, H., Hong, Z., Yue, H., Chen, Y., Wang, K., Han, J., ... & Ding, E. (2020). Learning generalized spoof cues for face anti-spoofing. arXiv preprint arXiv:2005.03922.