RichardObi / medigan

medigan - A Python Library of Pretrained Generative Models for Medical Image Synthesis
https://medigan.readthedocs.io/en/latest/
MIT License
115 stars 13 forks source link

Can I use this weights as pretrained model to transfer my task ? #60

Closed xiaoerlaigeid closed 10 months ago

xiaoerlaigeid commented 1 year ago

Thanks for your work ! I wonder if there offer a code script that can used for transfer learning on my own dataset. If not I am very glad to contribute to this Best

xiaoerlaigeid commented 1 year ago

I checked the src code. It seems there are only have the generator and no training script ?

RichardObi commented 1 year ago

Hi @xiaoerlaigeid, maybe we can provide the training script. Which of the models in medigan would you like to use?

xiaoerlaigeid commented 1 year ago

Thanks for your reply. I may try two types of models.

  1. I attempt to train a DCGAN (256x256 or 512x512 image size). I may need to modify some layers.
  2. Another model is C-DCGAN.
xiaoerlaigeid commented 1 year ago

@RichardObi Another question regarding to your paper "High-resolution synthesis of high-density breast mammograms: Application to improved fairness in deep learning based mass detection" How you generated the annotation bounding box ? Manually annotated or generated by Cyclegan ?

RichardObi commented 1 year ago

Thanks for your reply. I may try two types of models.

  1. I attempt to train a DCGAN (256x256 or 512x512 image size). I may need to modify some layers.
  2. Another model is C-DCGAN.

Nice! You may check out the training code for DCGAN and C-DCGAN (128x128 or 224x224) that we have in this repo.

RichardObi commented 1 year ago

@RichardObi Another question regarding to your paper "High-resolution synthesis of high-density breast mammograms: Application to improved fairness in deep learning based mass detection" How you generated the annotation bounding box ? Manually annotated or generated by Cyclegan ?

In this work we translated low density breast to high density breast mammograms with cycleGAN. The masses were annotated as bounding box in the source domain (e.g. low density breast). We used the same source domain bounding boxes as annotations in the target domain (after cycleGAN translation).

xiaoerlaigeid commented 1 year ago

Thanks a lot! It seems that link I cannot open https://github.com/zuzaanto/mammo_gans/blob/main/gan_compare/scripts/train_gan.py

RichardObi commented 1 year ago

Thanks a lot! It seems that link I cannot open https://github.com/zuzaanto/mammo_gans/blob/main/gan_compare/scripts/train_gan.py

Sorry, here the link to the public repository.

xiaoerlaigeid commented 1 year ago

Hi, regarding the generation of high resolution, how do you process the image? For example the whole breast image, 1300x800

RichardObi commented 11 months ago

Hi @xiaoerlaigeid. Yes, the whole breast image is processed in order to translate the breast density. The default output pixel dimension is 1332x800, but you can also pass another image_size=[1332, 800] to change the rescaling of your input image before translation (see here)