Code for paper Personalized visual encoding model construction with small data.
In this work, we compare the prediction accuracy (the ability to accurately predict brain responses)and consistency (the ability to preserve inter-individual variability) between several models with small training data. They are
Individual-20K model
: model with a standard architecture (ResNet50 backbone) trained on densely-sampled individual data, e.g. 20,000 samplesScratch model
: model that has the same architecture as individual-20K but trained on small data, e.g. 300 samplesFinetuned model
: model that has the same architecture as individual-20K but initialized with the group-level individual-20K weights and finetuned on small dataLinear ensemble model
: model that linearly ensembles predictions from individual-20K modelsAverage ensemble model
: model that simply averages predictions from individual-20K models
- Prepare your data and wrap them in dataloaders.
individual_model.py
: train individual-20K model and scratch model.individual_finetune.py
: train finetuned model.ensemble.py
: train linear ensemble model.
Gu, Z., Jamison, K., Sabuncu, M. et al. Personalized visual encoding model construction with small data. Commun Biol 5, 1382 (2022). https://doi.org/10.1038/s42003-022-04347-z