orobix / retina-unet

Retina blood vessel segmentation with a convolutional neural network
1.26k stars 468 forks source link

If dividing pic into many N_subimgs is better than using whole pic to train? #21

Closed Bonsen closed 7 years ago

Bonsen commented 7 years ago

Did u do some experiments?

And if the g-net is from any paper?(u-net and g-net,which is better?)

I don't really understand the mean of "patches_masks_train = masks_Unet(patches_masks_train)"... in masks_Unet: masks = np.reshape(masks,(masks.shape[0],im_him_w)) new_masks = np.empty((masks.shape[0],im_him_w,2)) I think each line in new_masks is a pic ,but what about "2"?

THANKS.

pythonokai commented 7 years ago

Hi, Bonsen,

first I am not the initial developer, @lantiga @dcorti they are. And if you don't mind, here is my understanding, If there is any error, please correct me:

g-net(just like a Gaussian curve?) is a model derived from u-net, added upsampling and maxpool, it seems that the AUC of ROC on DRIVE being increased by 0.1%, but the cost is 3x training time of u-net.

And function 'masks_Unet' show that mask_patches(1-channel) have been turn to 2-channel, to save the 'Negative-channel' and the 'Positive-channel', I think it just want to adapt the data to the model's output then fit.

And next time, added the code from and from line is better. : ) Hope it can help you.

dcorti commented 7 years ago

Hi Bonsen,

I think using sub-images instead of the whole pictures is way better, because training on only 20 images would be very hard. Moreover, by extracting partially overlapping sub-images you obtain a significant augmentation of the data. At early stages of development I did few experiments with full images, but with very poor results.

As @pythonokai said, the "2" in the code introduce the two classes: positive (blood vessel) and negative (no blood vessel). I did it only to adapt the data to the keras model, but maybe there's a better way to do it :)

Bonsen commented 7 years ago

@pythonokai @dcorti
THANKS!