juglab / n2v

This is the implementation of Noise2Void training.
Other
394 stars 108 forks source link

save_tiff_imagej_compatible('pred_train.tif', pred_train, axes='YX') #152

Open farukalamai opened 5 months ago

farukalamai commented 5 months ago

When using this it's not saving the actual predicted image. I also wanted to know how can I save the predicted image in different format like jpg/png etc.

I have tried different method, nothing is working. Its' saving a blank image.

farukalamai commented 5 months ago

@jdeschamps

tibuch commented 5 months ago

Did you verify that you image is not empty?

A quick google search reveals how to save images as jpg e.g.:

from PIL import Image
im = Image.fromarray(arr)
im.save("your_file.jpeg")
farukalamai commented 5 months ago

I have tried this. It's just saving a blank image.