charlesnchr / ML-SIM

Desktop app, web app and source code for training, testing and using ML-SIM
http://ML-SIM.com
29 stars 1 forks source link
deep-neural-network reconstruction sim

ML-SIM

ML-SIM: universal reconstruction of structured illumination microscopy images using transfer learning

Charles N. Christensen1,2,*, Edward N. Ward1, Meng Lu1, Pietro Lio2, Clemens F. Kaminski

1University of Cambridge, Department of Chemical Engineering and Biotechnology, Laser Analytics Group
2University of Cambridge, Department of Computer Science and Technology, Artificial Intelligence Group
*Author of this repository:

Update – July 2023: Interactive Streamlit Application

Announcing a new app in the ML-SIM project: the integration of an interactive Streamlit application for exploring training data with the image formation model that forms the foundation of the training data in ML-SIM. This enables the exploration of the optical parameters relevant to SIM and can provide insight into achievable resolution improvement based on simulated frequency support (OTF area). The app makes it easier to fine-tune and choose parameters before training a custom ML-SIM model.

Access the Streamlit application here:

Streamlit App

To play with the Streamlit application locally, execute the following command:

streamlit run MLSIM_datagen/streamlit_frequency_support.py

Below is a preview of the interactive Streamlit application:

ML-SIM image formation Streamlit

Update – September 2022: HuggingFace Spaces Demo

See https://ML-SIM.github.io for examples and test images. A live demo is available at:

Hugging Face Spaces

The model used in this demo assumes that the inputs are 9 frame SIM stacks of 512x512 resolution; i.e. 3 orientations and 3 phase shifts. It will work for other dimensions, but is unlikely to be good.

ML-SIM Publications

Journal Publication, April 2021

ML-SIM: universal reconstruction of structured illumination microscopy images using transfer learning https://doi.org/10.1364/BOE.414680

Pre-print manuscript, March 2020

ML-SIM: A deep neural network for reconstruction of structured illumination microscopy images https://arxiv.org/abs/2003.11064

ML-SIM in action

A demonstration of the graphical user interface that has been developed for ML-SIM is shown below. It relies on an engine written in Python using various image libraries for parsing the many formats used in scientific imaging and Pytorch for deep learning purposes. The functionality of applying ML-SIM in this app is fit for end-users as it stands. More features are planned such as generating new SIM datasets and training new models on those datasets within the app. Over time this software will also be extended with other plugins that rely on deep learning for other image processing tasks. Read more. ML-SIM Graphical desktop app animation

Status of repository

Code files, Jupyter notebooks and source code for a graphical desktop app have been added. Further documentation, example reconstruction outputs, pre-trained models and snippets to train and evaluate the models reported in the publications are to be added shortly.

To-do

How it works

ML-SIM uses synthetic training data that is simulated based on an physically accurate implementation of the SIM (structured illumination microscopy) imaging process. A deep neural network is trained to solve the inverse problem and with transfer learning it is possible to make the trained model work well on experimental data from the lab. Pipeline depiction of ML-SIM

Dependencies

For more detailed package versions, please see the Pipfile in Graphical-App.

Layout of repository

Resources

Graphical desktop app

An easy to install and use desktop app for Windows 10, macOS and Linux is available as an Electron app. Instructions and all source code to run the app is given in the sub folder Graphical-App. The program allows one to batch process a set of directories including subdirectories that contain TIFF stacks, and customise and select the model that is used for reconstruction. See screenshot below.

Credits