Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumeBellec authored Nov 25, 2021
1 parent 5242e34 commit a18ce74
Showing 1 changed file with 10 additions and 17 deletions.
27 changes: 10 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,29 +23,22 @@ python train.py --SEED=0 --ground_truth=no --GPU=yes --maxiter=800
```


`src.parser.py` specifies arguments used in the experiment.


#### Network architecture

Overall, the network `src.buildnet.py` consists of two parts. One is the CNN `conv2`that pre-processes the video non-linearly. And the other is stochastic recurrent neural network `RSNN` that contains one layer of N GLM neurons that generates spikes.
The default parameters defined in `src.parser.py` should match the parameters used in the paper.


#### Dataset

`DataLoader` in the `src.utils.py` handles preprocessing and loading data.

To run the code, one will need to prepare (saved under folder `data_dir` specified in `src.parser.py`):
One video data for training, saved in the form of numpy array with size: #pixel_y, #pixel_x, #frame;
One spike train recordings for training, saved in the form of numpy array with size: #repetition, #frame, #neuron;
And similarly, one video data + one spike train recordings for validating/ testing.

You can either use your own dataset, or download the dataset we used (V1-dataset) from https://crcns.org/data-sets/vc/pvc-11/about.
If you want to use V1-dataset, please follow the instructions of the website and refer to the pre-processing steps described in our paper.
To reproduce the results on the V1-dataset, download it at: https://crcns.org/data-sets/vc/pvc-11/about.
Please follow the instructions of the website and refer to the pre-processing steps described in the Appendix A of our paper.

If you are testing a different dataset, you may also want to tailor the CNN that pre-processes the video according to the input.
Once a different video or CNN is used, one have to specify the `input_latent_size`, it's the size of the flattened output of CNN, also the input size of the recurrent network.
The processed data should be saved in the folder `data_dir` specified in `src.parser.py`.
The video data should be saved as a numpy array of shape: ( #pixel_y, #pixel_x, #frame ).
The spike train aligned to the video should be saved in the form of numpy array of shape: ( #repetition, #frame, #neuron).
Similar video spike trains should be saved for validating/ testing.
Then `DataLoader` in `src.utils.py` handles the preprocessing and the data loading.

If you are using a different dataset with a different video resolution the output of the CNN is likely to be different.
This should be specified using the parameter the `input_latent_size` which is the size of the flattened output of CNN.

#### Forcasting

Expand Down

0 comments on commit a18ce74

Please sign in to comment.