Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Synthetic Image #11

Open
cah-ext-dilipanmuthuramalingam opened this issue Dec 24, 2018 · 7 comments
Open

Synthetic Image #11

cah-ext-dilipanmuthuramalingam opened this issue Dec 24, 2018 · 7 comments

Comments

@cah-ext-dilipanmuthuramalingam

Hi, Can we generate synthetic image data using GAN? If yes, could you please provide the steps.

@mp2893
Copy link
Owner

mp2893 commented Dec 25, 2018

Technically, yes you could. But there is no guarantee that the outcome will be high-quality images.
I wouldn't suggest using medGAN for generating synthetic images at all.
MedGAN doesn't have any convolutional layers, and the mini-batch averaging technic assumes that the target data is tabular; the row of a synthesized matrix is a single sample, and the column is a single feature (e.g. some diagnosis code).

Best,
Ed

@Myshgithub
Copy link

Myshgithub commented Mar 23, 2019

Would you please guide me , what should we exactly put for model_file to generate synthetic records, using the following command? or more explanation about what is model file and what is it doing?
Thanks
python medgan.py <matrix file> <generated output path> --model_file=<trained output path> --generate_data=True

@mp2893
Copy link
Owner

mp2893 commented Mar 31, 2019

In order to generate synthetic records, you need to train a medGAN model first.
While you are training medGAN, the model parameters will be saved to a path you specified.
should be the file path to that trained medGAN model.

@Myshgithub
Copy link

Myshgithub commented Apr 4, 2019

Thank you so much, But would you please clarify more what are model parameters that are saved?
What I get after training medGAN is actually, one checkpoint File, One .log file, plus 1000 Files of types .data, .index and .meta!
Which one you consider as file path, if there is any And please guide what/which should be substituted as --model_file= , please?!

In other words by substituting model_file with any of the files path to that trained medGAN model, we would get (Generate) different synthetic EHR's?
Or we should use all the 1000 trained medGAN model files and How please?
And (.data, .index and .meta) one?

Thanks again

@mp2893
Copy link
Owner

mp2893 commented Apr 5, 2019

medGAN will save 1,000 models because it is implemented to save the learned parameters after every epoch, and the default n_epoch is 1000.
You can choose the model from the epoch with the lowest discriminator loss (i.e. d_loss) or 50% accuracy. It is up to your preference.
Your --model_file should be a path leading up to .meta.
For example, if you have a model file named "/home/user/medgan/output/model.meta", then you should use --model_file="/home/user/medgan/output/model"

@vampypandya
Copy link

Hi,
Can we use minibatch averaging for images in a different network?

@mp2893
Copy link
Owner

mp2893 commented Feb 17, 2020

As I said above, minibatch averaging assumes the data is tabular. So unless you are dealing with very static images (i.e. the human face is always located at the center), minibatch averaging won’t be effective for images.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants