SharifAmit / RVGAN

[MICCAI'21] [Tensorflow] Retinal Vessel Segmentation using a Novel Multi-scale Generative Adversarial Network
BSD 3-Clause "New" or "Revised" License
88 stars 20 forks source link

the generation of the final output image #3

Closed mjm92 closed 3 years ago

mjm92 commented 3 years ago

The paper descire the model and training skill very well in detail, but it seems to forget to describe the generation of the final output image. How do you use the results from Gf and Gc to predict an image?

SharifAmit commented 3 years ago

I will upload the infer.py file that can be used for running inference/testing images.

In the meantime, you can check the visualization.py and dataloader.py files in the 'src' folder to see how to do prediction. If you check the strided_crop_DRIVE.py files then we are taking N number of a crops from each image and mask. The prediction will be something like this:

X_coarse, x_global = coarse_model.predict([Coarse_Crop Coarse_Mask])
X_fine = g_model.predict([Fine_crop,Fine_Mask,x_global])

Fine_crop = 128x128 crop from the fine image Fine_mask = 128x128 crop from the fine mask Coarse_crop= 64x64 crop by dividing the Fine_crop / / 2 Coarse_mask = 64x64 crop by dividing the Fine_mask // 2

You can save both the X_coarse and X_fine as .PNG and show it as a Plot ( Already provided in visualization.py)

N. B. you have to do it for all the crops in one image, then overlap all the crops and average the pixel values. I will provide that code in the infer.py file.

Hope this helps !

mjm92 commented 3 years ago

I think I understand your meaning, thank you very much!