FAST is a real-time self-supervised denoising framework for fluorescence neural imaging, achieving enhanced image quality in low-SNR scenarios through spatiotemporal joint optimization. (https://doi.org/10.21203/rs.3.rs-6101322/v1)
- ๐ Real-Time Processing: >1000 fps denoising (hardware-dependent)
- ๐ค Self-Supervised Learning: Eliminates need for clean ground truth
- ๐ Spatiotemporal Optimization: Frame-multiplexing enhances SNR
- ๐ High Adaptability: Suitable for various fluorescence imaging data
- Python 3.9+
- PyTorch 2.x (CUDA version aligned with your hardware)
- CUDA-capable GPU (recommended)
- Windows 10: NVIDIA RTX 3060, RTX 3090, RTX 4070
- Ubuntu 22.04: NVIDIA RTX A6000
- CUDA Version: 12.4
numpy==1.24.1
torch==2.5.1
torchvision==0.20.1
torchaudio==2.5.1
scikit-image==0.24.0
tqdm==4.66.5
pyqt5==5.15.7
pyqt5-qt5==5.15.2
pyqt5-sip==12.11.0
csbdeep==0.8.1
# Create and activate environment
conda create -n FAST python=3.9
conda activate FAST
pip install -r requirements.txt# Training mode
python main.py --config_path "./params.json"
# Testing mode (with pretrained model)
python main.py --config_path "./checkpoint/model_name/config.json" --test_path "./data/test/test_dir"# Launch training GUI
python Train_GUI.py
# Launch testing GUI
python Test_GUI.pyFAST/
โโโ checkpoint/ # Model checkpoints
โ โโโ model_name
โโโ data/ # Data directory
โ โโโ test/ # Testing data
โ โโโ train/ # Training data
โโโ datasets/ # Dataset processing
โ โโโ dataAug.py # Data augmentation
โ โโโ data_process.py
โ โโโ dataset.py # Dataset classes
โโโ environment.yml # Environment configuration
โโโ FAST_logo.png # Project logo
โโโ log.txt # Runtime logs
โโโ main.py # Main entry point
โโโ models/ # Model architectures
โ โโโ baseLayers.py
โ โโโ loss/ # Loss functions
โ โ โโโ loss.py
โ โโโ Unet_Lite.py # Main model
โโโ params.json # Configuration file
โโโ result/ # Output results
โ โโโ model_name
โโโ Test_GUI.py # GUI for testing
โโโ test_in_gui.py
โโโ test.py # Testing script
โโโ Train_GUI.py # GUI for training
โโโ train_in_gui.py
โโโ train.py # Training script
โโโ utils/ # Utility functions
โโโ config.py # Configuration utils
โโโ fileSplit.py
โโโ general.py # General utilities
โโโ __init__.py
Customize model parameters by modifying params.json:
{
"data_extension": "tif",
"epochs": 100,
"miniBatch_size": 4,
"lr": 0.0001,
"weight_decay": 0.9,
"gpu_ids": "0",
"train_frames": 2000,
"data_type": "3D",
"denoising_strategy": "FAST",
"seed": 123,
"save_freq": 25,
"clip_gradients": 20.0,
"num_workers": 0,
"batch_size": 1
}-
Prepare Training Data
Place one or more.tif/.tifffiles (each should be an xy-t stack, ideally >1000 frames per file) into a new folder under./data/train/, e.g.,./data/train/MyTrainDataset/. -
Edit Configuration
Openparams.jsonand set"train_folder": "path/to/MyTrainDataset". Adjust other parameters as neededโsee the Configuration section for details on each option. -
Start Training
Run the following command to train the model:python main.py --config_path "./params.json"After training, model weights and the config file will be saved in
./checkpoint/model_name/.
-
Prepare Test Data
Place one or more.tif/.tifffiles (xy-t stacks to be denoised) into a folder under./data/test/, e.g.,./data/test/MyTestDataset/. -
Run Inference
Use the following command to denoise your data with the trained model:python main.py --config_path "./checkpoint/model_name/config.json" --test_path "./data/test/MyTestDataset"
After completion, you will find the processed results in the
./result/model_namedirectory.
We welcome contributions, particularly:
- ๐ Bug reports and fixes
- โจ New feature proposals and implementations
- ๐ Documentation improvements
- ๐จ Code optimizations
- Use
UpperCamelCasefor class names - Use
lowercase_with_underscoresfor functions and variables - Include docstrings for core functions
- Follow PEP8 standards (validate using
flake8)
This project is licensed under the GNU General Public License v3.0. This means you are free to:
- โ Use
- โ Modify
- โ Distribute
But you must:
โ ๏ธ Disclose sourceโ ๏ธ Include original copyrightโ ๏ธ Use the same license
See LICENSE file for full text.
Coming soon
- ๐ง Email: yiqunwang22@fudan.edu.cn
- ๐ Project Page: GitHub Repository
If you use FAST in your research, please cite our paper:
@article{wang2024real,
title={Real-time self-supervised denoising for high-speed fluorescence neural imaging},
author={Yiqun Wang and Others},
journal={https://doi.org/10.21203/rs.3.rs-6101322/v1},
year={2025}
}