AllenCellModeling / pytorch_fnet

Three dimensional cross-modal image inference
Other
151 stars 61 forks source link

Incompatible with "Hyperstack" tif file saved from ImageJ #183

Open wong-ziyi opened 2 years ago

wong-ziyi commented 2 years ago

Hi everyone,

I would like to know how do I input the TIF file from ImageJ "Hyperstack"?

No matter how do I change the channel order, the Hyperstack -> Stack, or save it as OME-TIF, the pytorch_fnet always only recognizes one slice like below:

ValueError: Dataset item 0, component 0 shape torch.Size([1, 3, 480, 640]) incompatible with patch_shape [32, 64, 64]

I have tried to use numpy.reshape and numpy.moveaxis after reading my "Hyperstack" tif file using Tifffile package, but it still can not work.

Can anyone teach me how do I to input a tif file saved from ImageJ? Thanks so much!