Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while saving output file using stardist-predict2d.py #271

Open
migueLib opened this issue Apr 30, 2024 · 2 comments
Open

Error while saving output file using stardist-predict2d.py #271

migueLib opened this issue Apr 30, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@migueLib
Copy link

Describe the bug
I'm using stardist's entry point script stardist-predict2d, the script seems to run until the point of saving the output file..
Raising the following error TypeError: imwrite() got an unexpected keyword argument 'compress'

I don't think there's a 'compress' argument on imwrite()

To reproduce
I'm using some ome.tif files to segment.
And running it from the command line using the following command

stardist-predict2d -i ~/data/plate_2024_01_29_A3_nuclear/ometif/Plate_2024_01_29_A3_s01c1.ome.tif -o ~/data/plate_2024_01_29_A3_nuclear/segmentation/stardist/ -m 2D_versatile_fluo -v
Expected behavior
I would have expected it to run and output the file on the specified directory

Data and screenshots
image

Environment (please complete the following information):

  • StarDist version [0.9.1]
  • CSBDeep version [0.8.0]
  • TensorFlow version [2.15.0]
  • OS: [Mac]
  • GPU memory (if applicable): [ 32 GB M1 mac]

You may run this code and paste the output:
stardist: 0.9.1
csbdeep: 0.8.0
tensorflow: 2.15.0

WARNING:tensorflow:From :2: is_gpu_available (from tensorflow.python.framework.test_util) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.config.list_physical_devices('GPU') instead.
tensorflow GPU: False

@migueLib migueLib added the bug Something isn't working label Apr 30, 2024
@uschmidt83
Copy link
Member

Hi @migueLib, thanks for raising this issue.

I don't think there's a 'compress' argument on imwrite()

There was until version 2022.4.22 of tifffile (see changelog).

I just replaced the use of compress in one of our example notebooks, but I overlooked the prediction scripts. We will fix this for the next release.

In the meantime, you can try downgrading tifffile to an earlier version, e.g. pip install "tifffile<2022.4.22".
(Beware that this can potentially break another package in your environment.)

@migueLib
Copy link
Author

migueLib commented Apr 30, 2024

@uschmidt83 Thanks a lot for the quick reply!

Is there any plan of joining --outdir and --outname flags into one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants