MouseLand / cellpose

a generalist algorithm for cellular segmentation with human-in-the-loop capabilities
https://www.cellpose.org/
BSD 3-Clause "New" or "Revised" License
1.24k stars 359 forks source link

[BUG] DenoiseModel and CellposeDenoiseModel returning image flattened across one axis #919

Open natelharrison opened 2 months ago

natelharrison commented 2 months ago

Describe the bug I have a script for running Cellpose and after adding options to use the DenoiseModel or CellposeDenoiseModel, the output for a 3D image is flattened across one of the axes when using the denoising related models. I've confirmed that the tiff file is being loaded properly and the default CellposeModel is acting as expected, returning a 3D image. I'm thinking there's a setting I am getting wrong or missing, but I'm unable to find a solution so far.

Run log INFO:cellpose.io:reading tiff with 350 planes 100%|██████████| 350/350 [00:10<00:00, 34.12it/s] INFO:cellpose.denoise:>> denoise_cyto3 << model set to be used INFO:cellpose.core: TORCH CUDA version installed and working. INFO:cellpose.core:>>>> using GPU INFO:cellpose.denoise:>>>> model diam_mean = 30.000 (ROIs rescaled to this size during training) Scan_Iter_0003_CamA_ch0_CAM1_stack0000_488nm_0000000msec_0018536711msecAbs_decon.tif has shape (350, 1480, 1879) Denoised image has shape (1, 350, 1480, 1)