Shirui, Guo
Official PyTorch implementation of OCEM: A deep-learning Python module for reconstructing 3D volumes from encoded 2D measurements. Code for the paper "Off-axis Compressed Encoding Microscopy for High-Resolution, High-Throughput, High-Contrast Volumetric Imaging".
- Python 3.11 (tested on)
- Conda
- PyTorch 2.3.0 (tested on)
- Windows 10 / 11
- PyCharm 2022.3+
- CPU or GPU that supports CUDA, CuDNN, and PyTorch 2.3.0.
- Minimum requirement: 12 GB VRAM (e.g., TITAN). Recommended: 24 GB VRAM (e.g., NVIDIA GeForce RTX 3090 ).
- Install PyTorch and other dependencies. The main Python dependencies include:
numpy
pytorch
tifffile
matplotlib
torchsummary
-
For a given image stack (tiff format), first run the python code
Preprocess_main.pyto process the raw datasets, generate the.npyformat training data.- Input parameters:
file_root,save_file,sample_number,channels,arrays,point_1(crop coordinates),layers,speed
- Input parameters:
-
Verify or adjust the normalization coefficients and dataset loading parameters in
data_loader_our.py.- Input parameters:
layer,strip,speed, normalization scaling factors (self.input/self.outputdivisors)
- Input parameters:
-
Run
train_our.pyto train the deep learning reconstruction network (e.g., LW-UNet, ResUNet, or RCAN).- Input parameters:
--train_save_file,--data_file,--data_type,--train_test_val,--channel_in,--channel_out
- Input parameters:
-
Run
predict_our.py(orpredict_our_oridata.py) for the reconstruction of the testing image stack. This utilizes the trained network to restore structural details across the axial depth.- Input parameters:
file(test dataset path),file_write(output restoration path),model(weights load path),scale(normalization coefficient),patch_size,stride,speed,depth
- Input parameters: