This repo has the core code for the following paper
Deep Neural Networks for Modeling Visual Perceptual Learning
Li K. Wenliang, Aaron R. Seitz
Journal of Neuroscience 4 July 2018, 38 (27) 6028-6044; DOI: 10.1523/JNEUROSCI.1620-17.2018
It contains the necessary files to run the simulation described in the paper and the Jupyter Notebooks that plots figures (all but Figure 1). Let me know if anything is missing.
Unfortunately, Caffe was the best DNN toolbox during this project, but it was still very difficult to use. Hence, the pipeline of reproducing the results may seem convoluted.
As a result, it is strongly encouraged to use better DNN toolbox (TensorFlow or PyTorch) to continue this line of research!
The code was written in Python 2.7 with the following dependencies:
- Caffe 1.0 built on Ubuntu 14.04 with GPU support.
- CUDA 7.5
- cuDNN 5.1 for CUDA 7.5
- facemorepher
- lmdb 0.86
- numpy 1.11.0
- matplotlib 1.5.1
To run the simulations:
- Generate data (Gabors) using
generate_pair_angle.py
. - Train the network by running
pair_transfer.py
. Need to set the following parameters:
noise
angle1
wave1
ctrst1
(contrast)
The script will produce a figure in the figs/ directory and a result file in the results/ directory. The results are used by the plot_summary.ipynb
notebook to produce behaviour and layer-wise results.
- Run
compute_tuning.py
to get the tuning properties of the units (neurons) in the network. The results will be saved in results/tuning/. These are used in by thetuning_main.ipynb
andtuning_supp.ipynb
to generate figures of tuning attributes.
- You would have to obtain the PhotoFace dataset from the authors of this paper
- Choose male and female images from the dataset and put them into data/high/male and data/high/female
- Inside data/high, run
data/high/morph.py
which will generate 12 sets of train-test data in data/high. - Run
high_desc.py
to train the network. Need to set thedset
parameter to loop from 1 to 12 - The results will be used to generate figures in the
plot_summary.ipynb
notebook.