Skip to content

Latest commit

 

History

History
172 lines (114 loc) · 7.33 KB

README.md

File metadata and controls

172 lines (114 loc) · 7.33 KB

CalDenoise: Automated Denoising Software for Calcium Imaging Signals Using Deep Learning


CalDenoise: Automated Denoising Software for Calcium Imaging Signals Using Deep Learning

We developed CalDenoise, a software designed to automate the denoising of Ca2+ Spatio-Temporal Maps (STMaps) to quantify cellular Ca2+ patterns. The software comprises an image-processing-based pipeline and three generative-adversarial-network-based deep learning models capable of removing various types of noise patterns.

graphical-caldenoise

Summary

Ca2+ signaling is vital for cell survival and death, and Ca2+ imaging is a common method to study and measure these cellular patterns. Nevertheless, noise from equipment and experimental protocols can hinder the accurate extraction of Ca2+ signals from the resulting Spatio-Temporal Maps (STMaps). Current denoising methods for STMaps are often time-consuming and subjective. To address this issue, we've developed CalDenoise, an automated software that utilizes robust image processing and deep learning models to effectively eliminate noise, enhancing Ca2+ signals in STMaps. The software offers four pipelines for noise removal, covering salt-and-pepper, impulsive, periodic noise, and background noise detection and subtraction. It incorporates three deep learning models capable of handling complex noise patterns and accurately distinguishing boundary noise. CalDenoise is adaptable to various cell types, reducing the potential for user errors through its automated denoising modules. The software also features adjustable parameters and a user-friendly graphical interface for ease of access and utilization.

Highlights

• CalDenoise: an automated Ca2+ signals denoising software that effectively removes background image noise.

• The software features one image-processing pipeline and three GAN models for removing noise from STMaps.

• CalDenoise: effectively removes STMap noise such as salt-and-pepper, impulsive, and periodic noises.

• The software enhances the extraction of key Ca2+ event parameters effectively.

• The denoising models minimize user error and offer multiple options for end-users to calibrate parameters, enabling efficient denoising of STMap datasets.

Installation Guide

This guide will help you install and run our application, Calcium denoise, on Windows, Ubuntu, Arch Linux, and Mac (Intel and M1/M2). Please follow the instructions carefully.

Pre-requisite

Download and Install Anaconda from the following link

https://www.anaconda.com/products/individual

Linux or MacOS: Make sure to export your conda bin folder to .bashrc if installing on Linux or MacOS

export PATH="/root/anaconda3/bin:$PATH"

Windows: Make sure to select "Add Anaconda(3) to the system Path environment variable" during installation as shown below

Download and unzip the application from

Click here to download Calcium Denoise application

Windows users

Run the following command:

install_windows.bat

Linux (GPU) users

Run the following command:

./install_gpu_linux.sh

Special instructions for Linux users

Linux users need to execute a series of additional commands to ensure compatibility. Here are the commands:

sudo apt-get install libxcb-xinerama0
sudo apt-get install '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev
pip3 uninstall pyqt5 pyqt5-qt5 pyqt5-sip
conda install PyQt5-sip
pip install pyqt5 pyqt5-qt5
conda remove --force qt-main
pip uninstall opencv-python
pip install opencv-python-headless
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$(dirname "$(readlink -f "$0")")/4conda/lib"

Users on other platforms can skip this step.

Mac (Intel & M1/M2) users

Run the following command:

./install_mac.sh

Running the Application

To run the application on macOS or linux, execute the following command:

./run_linux.sh

Windows users should run this command:

./run_windows.bat

Mac users should run this command:

./run_mac.sh

If you encountered issue running th bach/zsh/sh scripts, you can manually start the application by activating the conda env first:

conda activate ./4conda

after activating the Conda env, you can re-run the corresponding run script

Now, Calcium denoise should be up and running on your machine!

Usage

Denoising pipelines

The software features one image-processing pipeline and three GAN models for removing noise from STMaps as shown below:

Image-Processing pipeline input:

GAN pipelines input:

  • Threshold : As the predicted image is a probability map with values between 0 to 255. The user can pick a threshold value (= 1 to 254) to make this image into a binary image with values of 0 and 255.

  • Stride: Calcium Denoise creates multiple small patches of image by using fixed sized overlapping crops from one test image. The image size can vary, but the crop size is fixed ( 64x64). By default we use a stride size of 3. However, having a larger stride will create a small number of crops from each test image and a smaller stride will yield a larger number of cropped images. Contrarily, larger strides will give faster yet poor visual results, whereas smaller strides will give slower yet high-quality visual results. For example: Given Image size = 128 x 128, if we choose stride= 64, then the number of cropped images will be 4. If the stride = 8, the number of cropped images will be 81.

Batch Processing:

To batch process multiple images, 1) simply select a folder containing your input images, 2) select your denoising pipeline (algorithm) and 3) click apply

Single Image Processing

To process a single images, 1) select your input images, 2) select your denoising pipeline (algorithm) and 3) click apply

Output

By default, the software saves the denoised image and intermediary images into a folder named: "output". The denoised images are organized in sub-folders in the main "output" folder. The name of the sub-folders contains the selected denoise pipeline and the specified input parameters.

The software provides an easy way to explore the input/output folders containing the images. Double-clicking on an image will display the image as shown below:

License

The code is released under the GPL-2 License, you can read the license file included in the repository for details.