booz-allen-hamilton / DSB3Tutorial

381 stars 197 forks source link

Black picture instead of tumor's mask. Help. #21

Closed ghost closed 7 years ago

ghost commented 7 years ago

Hello, could you please help me? I tried to repeat the tutorial, and that's what i've got: Left-top - segmented lungs right-top - tumor's mask left-bottom - predicted mask.

The predicted result after first epoch:

default

After 15 epoch (diferent MRI scan, but the same order of images) with coeff = 0.3 image

Could you please tell me, what's can be possible problem here? I just replace working path and run tutorial code step-by-step, I used subset0 and subset1 to create dataset

jt827859032 commented 7 years ago

I got the same problem ...

ghost commented 7 years ago

I got the same problem ...

Did you manage it?

jt827859032 commented 7 years ago

@normeow not yet

jt827859032 commented 7 years ago

@normeow have you fixed the problem?

ghost commented 7 years ago

@jt827859032 unfortunately, no

ghost commented 7 years ago

@jt827859032 I found this possible reason on kaggle. But didn't check it out

jt827859032 commented 7 years ago

@normeow What might be the possible reason ?

ghost commented 7 years ago

@jt827859032 check link in my coment above. It's because tumor masks are binary but all scans in gray scale.

User Guoxiaolu said:

I finally got the correct result after trying many methods. I have to say it cannot get the correct result just following the tutorial codes. At first, I got an result image whose pixel value is almost 0.0. After I study the original code of U-Net https://www.kaggle.com/c/ultrasound-nerve-segmentation/forums/t/21358/0-57-deep-learning-keras-tutorial, I finally find the answer: the trainning image pixel value is [0-255], and the mask image is [0-1] The detail: LUNA_segment_lung_ROI.py, line 155, it's better to change to 'img = (img-min) / (max-min)'; after line 157, add 'new_node_mask = (new_node_mask > 0.0).astype(np.float32)' Besides, in train.py: it's better to take the same 'mean, std' process when output test.npy Then after training about 150 epochs using subset0-5, I get a good result just as @JonathanMulholland tutorial shown, however, if no change, almost black result output.

jt827859032 commented 7 years ago

@normeow hey! I wanna tell you that I've got the right result just follow these steps you quoted ! And after 41 epoches(1770 imgs each epoch) trained, the dice_coef is nearly up to 0.8354 ! That's very kind of you.

ghost commented 7 years ago

@jt827859032 Glad to hear it! :)

JalongMa commented 7 years ago

@jt827859032 I follow those steps you did, but I can't get the reasonable result. The dice_coef in training is about ~8e-04. It's so low. You said ur dice_coef is nearly up to 0.8. What other things did you do in ur implementation? thx!

jt827859032 commented 7 years ago

@JalongMa I've change the nodules' bboxes into rectangle, but I don't know if it make any sense

JalongMa commented 7 years ago

@jt827859032 which subsets do you use as your training datasets? I use all subsets, and can not achieve the reasonable result.

abhiML commented 6 years ago

@JalongMa did you find a solution?