zhixuhao / unet

unet for image segmentation
MIT License
4.6k stars 2k forks source link

How can I Convert the predicted data from white background to black background? #142

Open reachsak opened 5 years ago

reachsak commented 5 years ago

I have a set of annotated data with black background , but the code is written to use to train with the data with white background. I'd like to know if there any method to modify the code that will result the predicted image to have black background. Otherwise I have to re-annotated my datasets and retrain my model. I think it should be something related to the TestGenerator part , but haven't figure it out yet.

svanbodegraven commented 5 years ago

What about https://stackoverflow.com/questions/51347194/convert-white-pixels-to-black-in-opencv-python