Closed kangyang94 closed 5 years ago
Dear @kangyang94 , can you share your code which change the background? may be, it should map 0 to 255, not 0 to 1. (I'm not sure.)
I donot change the code. My label is a PIL image in 'L' mode. The region I want to segment set to 1 and the background to 0. But in solver.py , I change the GT from tensor to numpy, the array only has number 0.Do you know why it is? No matter I use GT_np = GT.cpu().data.numpy() or GT_np = GT.cpu().numpy(), GT_np only have 0.
And the code may not have a test function?
can you try GT_np = GT.cpu().data.numpy() 255 or GT_np = GT.cpu().numpy() 255??
If you have no further questions, I will close the issue. I hope my answer was helpful.
@LeeJunHyun Thank you very much.It works.
I change the background to 0 and others to 1 in my labels.But when I save the GT that is loaded from dataloader as a image, I get a image full of 0. Do you know why it happened?