Unet Segmentation Mask Converter to help against common errors / problems

To paraphrase @LessW2020, can you show how you defined your variable saveToPath?

Also, can you print

type(saveToPath)

for example?

If it is str, then all you probably need to do is

from pathlib import Path
saveToPath = Path(...)

where the dots should be replaced with the string that you have used so far to declare your variable.

1 Like

Thanks it helped, but my mask turned into full black image @Antoine.C @LessW2020
as mentioned in the forum above should i have to use the black images generated by the code to segment or should i have to turn the images using imageJ and download them and use them for segmentation.@ptrampert can i use the black images which have 0 and 1 in min and max value for segmentation and for naked eyes we see them as black,is it correct. please correct me if i am wrong

Yes, you can use them. The “black” images contain the correct classes. By adjusting the visible range you will also see both classes in the images (e.g. in ImageJ).

1 Like