A MATLAB implementation of the DeepInterpolation principle
DeepInterpolation is a published general-purpose algorithm created by the Allen Institute for removing noise that arrives independently from data frame to data frame.
DeepInterpolation uses deep learning to predict a data frame from the contents of several preceeding and succeeding frames. The resulting prediction is free of independent noise such as shot noise (imaging) or thermal noise (electrophysiology). If the signal is well predicted by these preeceding and succeeding frames, as in 2-photon imaging and multi-channel recording, then DeepInterpolation does an excellent job of increasing signal-to-noise ratio. In systems neuroscience, this allows more cells to be characterized with better certainty about their activity.
Get started with inference examples using smaller datasets. You can individually view 👀 or run
Inference Example | Trained Model | Sample data | View | Run | |
---|---|---|---|---|---|
⚡ | "Ephys" (electrophysiology1) | model | sample data | 👀 | |
🔬 | "Ophys" (optical physiology2) object demo | model (AWS, 120 MB) | sample data | 👀 | |
🔬 | "Ophys" (optical physiology2) detailed demo | model (AWS, 120 MB) | sample data | 👀 | |
🧠 | fMRI (functional magnetic resonance imaging) | model (AWS, 407.55 KB) | sample_data (OpenNeuro) | 👀 |
1 via Neuropixels neural probes 2 via two-photon (2P) calcium imaging
- Deep Learning Toolbox Converter for TensorFlow Models support package.
Try out training your own DeepInterpolation network. You can individually view (:eyes:) or run (:arrow_forward:) these examples on MATLAB Online:
Nickname | Model | Dataset | View | Run |
---|---|---|---|---|
"Ephys" (electrophysiology) | model | dataset | 👀 | |
"Ophys" (optical physiology) | model | dataset (AWS, 55.6 GB) | 👀 | (*) |
(*) This data-intensive example is recommended for use on a local machine, not for MATLAB online.
For large datasets that are too large to load entirely into memory, the custom datastore offers a solution. By initializing the datastore with a dataset's path, users can sequentially access both flanking frames and their respective center frames. This allows for easy training and inference.
For a detailed introduction and a practical workflow, see the customdatastore_example:
Nickname | Model | Dataset | View | Run |
---|---|---|---|---|
"Custom datastore" Read from a custom datastore | model | sample_data | 👀 |
DeepInterpolation with MATLAB is a public repository. Contributions can be made in the form of adding issues or submitting pull requests.
The principle behind DeepInterpolation is illustrated in the following figure from Lecoq et al. 2021 in Nature Methods.
To predict the frame-of-interest ("predicted frame"), a deep learning network uses data from several preceeding and succeeding video frames. During training, the network is modified so that it produces better and better representations of the predicted frames over several datasets. During inference, the network produces predicted frames that are used in place of the original data. If the signal in the data is well predicted by the information in the preceeding and succeeding frames, then the inferred data contains a reconstruction of the original data where the usual noise that occurs independently on each frame is greatly reduced, because it is not predicted on average. The signal can be inferred with high quality in part because the network can average out the independent noise in the preceeding and succeeding frames to uncover the underlying signal just prior to and just after the signal in the predicted frame.
We use progressbar and mimic some functions from Brain Observatory Toolbox.