Open Sequential-circuits opened 5 years ago
same
same
I have the same question
comment this line in model.py: conv9 = Conv2D(2, 3, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal')(conv9). it works for me, but i don‘t know the reason.
AliceWord thanks for the reply, but I did what you said and still only black screen despite of 50 epochs
i got an acc of 99% and loss of 0.13
I changed the number of channals in Conv2D function from 64, 128,256... to 16,32,64... and it can work correctly.
@AliceWord Previously, I encountered the same issue. I compared the model in this repository with the model in the U-Net paper and found that there is no need to have the 2 * 3 * 3
filters. After removing it, the model works.
@AliceWord Previously, I encountered the same issue. I compared the model in this repository with the model in the U-Net paper and found that there is no need the have the
2 * 3 * 3
filters. After removing it, the model works.
Sorry i'm a beginner here. how do I do that? Thanks again.
I changed the number of channals in Conv2D function from 64, 128,256... to 16,32,64... and it can work correctly.
I tried this and it didn't work
@AliceWord Previously, I encountered the same issue. I compared the model in this repository with the model in the U-Net paper and found that there is no need the have the
2 * 3 * 3
filters. After removing it, the model works.Sorry i'm a beginner here. how do I do that? Thanks again.
@jnather What I did is to remove/comment the following line in model.py
:
conv9 = Conv2D(2, 3, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal')(conv9)
same
did any one find solution to this???
I am experiencing this problem as well.
Same problem. I get 99% accuracy but only black image. I think it matches with the background which is about 99% of pixels.
@wadoodachaudhary , i see your comment is right , cause I'm having the same case in my dataset , where the background covers most of the image, So where you able to solve this issue Thanks
You have to play with loss functions. Try Dice, Pixel loss, mean iou.
You have to play with loss functions. Try Dice, Pixel loss, mean iou.
i have tried the dice loss function and I find which will case a new error.So the loss function should use binary loss function .And I finally solve the problem that the result is gray.
comment this line in model.py: conv9 = Conv2D(2, 3, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal')(conv9). it works for me, but i don‘t know the reason.
Thanks
You have to play with loss functions. Try Dice, Pixel loss, mean iou.
i have tried the dice loss function and I find which will case a new error.So the loss function should use binary loss function .And I finally solve the problem that the result is gray.
Thanks for your reply. I wonder whether the "binary loss function" you mentioned refers to "loss = 'binary_crossentropy' " in the original model.py.
I understand this software should generate black and white images separating the cells found
However, I only get plain black, white, or grey images depending on what value I put in the code below (0.5), which I obtained from another thread here: for i,item in enumerate(npyfile): if flag_multi_class: img = labelVisualize(num_class,COLOR_DICT,item) else: img=item[:,:,0] print("image=",img,np.max(img),np.min(img)) img[img>0.5]=1 img[img<=0.5]=0 print("image=",img,np.max(img),np.min(img)) io.imsave(os.path.join(save_path,"%d_predict.png"%i),img)
I also put "img = img / 255." as instructed at another thread, but also to no avail
How can I get an image such as https://raw.githubusercontent.com/zhixuhao/unet/master/img/0label.png ?