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

Fine tuning #11

Closed
Steve-Pan opened this issue Oct 13, 2020 · 2 comments
Closed

Fine tuning #11

Steve-Pan opened this issue Oct 13, 2020 · 2 comments

Comments

@Steve-Pan
Copy link

Hi Yiqiu,

I am considering to perform fine tuning of models in this repo on a couple of mammograms with image-level labels (only normal and malignant labels). I have the following concerns to seek your kind advice.

  1. To fine tune the pretrained model, what loss function should I use? Should I use the binary CELoss of predicted output (line 183 of the run_model.py) and the ground-truth image label as the loss function or should I use the loss function given in Eq.(13) in your paper to re-train the model?

  2. Is it reasonable to use the predicted benign probability, generated from line 183 of the run_model.py, as the probability of normal cases for fine tuning the model?

  3. For image pre-processing, which method should be applied a). for each single training image, remove its mean value and divided by its std; b). for each batch_size training images, remove the mean value and divided by std (mean and std are calculated on all images from a mini-batch); c). for the whole training images, remove the mean value and divided by std (mean and std are calculated on all images from whole training set)

Thanks for your time and wait for your feedback.

@seyiqi
Copy link
Collaborator

seyiqi commented Oct 14, 2020

Hi Steve,

  1. You can start with BCE but eventually, Equation 13 will give you better performance. The regularization term |A| is basically model.saliency_maps.mean().

  2. This depends on your datasets. If all breasts in your datasets are either benign or malignant, then you might want to make the model only output a single score indicating if there is any malignant lesion. If your dataset has normal breasts that don't have any benign or malignant lesions, then you should use BCE.

  3. We applied (a).

Hope it helps!

@seyiqi seyiqi closed this as completed Oct 14, 2020
@Steve-Pan
Copy link
Author

Thank you very much, Yiqiu.

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