Skip to content

Repository files navigation

WM-FPM

A generative adversarial framework for FPM reconstruction, termed WM-FPM, integrates wavelet transform blocks and mamba-inspired linear attention models.

This repository contains the official implementation of the paper "Fast High-Fidelity Fourier Ptychographic Microscopy via Wavelet Transform and Linear Attention".

Some visual examples:

🛠 Environment Setup

This project requires Python 3.9 and PyTorch 2.5.1. Follow these steps to set up the environment:

1. Clone Repository

git clone https://github.com/ww20250822/WM-FPM.git
cd WM-FPM

2. Create Conda Environment

conda create -n wm-fpm python=3.9
conda activate wm-fpm

3. Install Dependencies

pip install -r requirements.txt

📊 Dataset

1.Download datasets from FPM-BioCell

2.Extract files to the datasets directory

3.The processing method of the dataset can be found in pytorch-CycleGAN-and-pix2pix.

🏋️ WM-FPM train/test

1. Train

python train.py --dataroot ./datasets/FPM --name WM_FPM --model pix2pix --netG WM-FPM --direction BtoA

To see more intermediate results, check out ./checkpoints/WM_FPM/web/index.html.

2. Test

python test.py --dataroot ./datasets/FPM --name WM_FPM --model pix2pix --netG WM-FPM --direction BtoA

The test results will be saved to a html file here: ./results/WM_FPM/test_latest/index.html.

📚 Acknowledgements

Our codebase is built with references to the following open-source projects:

We sincerely appreciate the authors for open-sourcing their valuable work.

📝 Citation

If you use this code for your research, please cite our paper.

@article{sun2025fast,
  title={Fast High-Fidelity Fourier Ptychographic Microscopy via Wavelet Transform and Linear Attention},
  author={Sun, Wenwen and Li, Jiajin and Wu, Hao and Jiang, Xiang and Zhang, Xingnan and Wei, Xunbin and Wang, Yadan and Zhou, Jinhua},
  journal={Laser \& Photonics Reviews},
  pages={e01895},
  year={2025},
  publisher={Wiley Online Library}
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages