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

How to train from scratch #92

Open
Electro1111 opened this issue Aug 27, 2020 · 10 comments
Open

How to train from scratch #92

Electro1111 opened this issue Aug 27, 2020 · 10 comments

Comments

@Electro1111
Copy link

Hello,

I noticed there is no model definition in this repository. I also noticed that this was pre-trained on image-net dataset. I was wondering if it would be possible to get the image-net pre-trained weights so that I could retrain this network on the dataset.

@haydengunraj
Copy link
Collaborator

Hi there,

With respect to the model definition, while we do not provide code for constructing the model, we do provide the model's metagraph file and trained weights. You can train the model from scratch by simply commenting out the lines in the training script where the weights are loaded.

To answer your question about ImageNet weights, unfortunately providing them will not be possible. Quoting the COVID-Net paper:

"The initial COVID-Net prototype was built and evaluated using the Keras deep learning library with a TensorFlow backend. The proposed COVID-Net architecture was built using generative synthesis, as described in Section 3.3."

What this means is that the prototype network was trained on ImageNet and COVIDx, but was then heavily modified during the generative synthesis process. As such, ImageNet weights for the final COVID-Net model do not exist - only the prototype network has ImageNet weights.

@Electro1111
Copy link
Author

ok so to train from scratch would it just be a matter of commenting out this line in the code?

#saver.restore(sess, os.path.join(args.weightspath, args.ckptname))

@haydengunraj haydengunraj added wontfix This will not be worked on and removed wontfix This will not be worked on labels Aug 27, 2020
@haydengunraj
Copy link
Collaborator

Yes, that's correct.

@Electro1111
Copy link
Author

also from what I understand, this is the portion of the code that loads the metagraph, correct?:

tf.get_default_graph()
saver = tf.train.import_meta_graph(os.path.join(args.weightspath, args.metaname))
graph = tf.get_default_graph()

@haydengunraj
Copy link
Collaborator

haydengunraj commented Aug 27, 2020

That's right - tf.train.import_meta_graph() loads the metagraph into the default graph.

@Electro1111
Copy link
Author

Ok, thank you

are there any plans to release the scripts used to do the generative synthesis from the prototype model?

@haydengunraj
Copy link
Collaborator

Generative synthesis is part of the GenSynth deep learning development platform provided by DarwinAI, and so we will not be able to release any code for this.

@Electro1111
Copy link
Author

Electro1111 commented Aug 27, 2020

ahh ok. Has there been any experimentation with training the developed model from scratch and seeing how it performs with just simple training?

@haydengunraj
Copy link
Collaborator

As far as I know this has not been explored - if you do so, we'd love to hear the results you achieve and settings you use!

@Electro1111
Copy link
Author

One final question, was your model pretrained using a black and white version of Imagenet since these images are single channel?

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

2 participants