Code Monkey home page Code Monkey logo

Comments (12)

SharifAmit avatar SharifAmit commented on July 26, 2024

Hi, could you elaborate the problem you are facing?

As far as the training goes, we don't change any hyperparameters during training.

from rvgan.

AdamZHAOZhou avatar AdamZHAOZhou commented on July 26, 2024

traning_80th_epoch
until now, I have trained 80 epoch, and I did not change any hyperparameters, but the results of F1 score was still less than 0.8.
results

from rvgan.

AdamZHAOZhou avatar AdamZHAOZhou commented on July 26, 2024

I downloaded your weight and test, the results was right, so I did not whether I need to pay attention to some details during training.

from rvgan.

SharifAmit avatar SharifAmit commented on July 26, 2024

Hi, you are on the right track. After training, loop over all the models and then print the metics for each to find the best snapshot. As GAN doesn't converge like regular model, the loss values fluctuate a lot, so the last saved model won't be the best one.

You can also try to reload the best snapshot and train again. I believe I did it for some of my similar work, as the discriminator might suffer from mode collapse and only print loss=0.00 . This is a common phenomenon with GAN training.

Also, while testing, try to use a smaller stride ( stride=3) to do the patch-wise prediction on the whole test image. This is slow but will you give you the best auc and F1 score.

Hope this helps!

from rvgan.

AdamZHAOZhou avatar AdamZHAOZhou commented on July 26, 2024

I tested each epoch, but the F1 score was still less than 0.80.
I also tried a smaller stride (stride=3), but not much improvement.
Could you tell me about your training process?

from rvgan.

SharifAmit avatar SharifAmit commented on July 26, 2024

I have trained the model for 100 epochs. After training, I loaded the weights of the best performing Coarse and Fine Generator ( For the same epoch) and then trained again for 100 epochs. I did not load the weights of the discriminators while retraining. So the discriminators were trained from scratch. I think I did this procedure 2-3 times. And also looped over all 100 saved weights to find the best performing coarse and fine generator pairs.

Thanks !

from rvgan.

AdamZHAOZhou avatar AdamZHAOZhou commented on July 26, 2024

TABLE1
For table 1 in your paper, I used sensitivity,specificity and accuracy to calculate the F1 score on CHASE-DB1, and I got 0.7858 F1 score, but your result is 0.8957. M-GAN's sensitivity,specificity and accuracy better than your RV-GAN, however, F1 score is 0.08 lower than yours. Could you explain this?

from rvgan.

SharifAmit avatar SharifAmit commented on July 26, 2024

ChaseDB doesnt come with training and test splits. Which images are you using for Chase-DB for testing ? Maybe the evaluation technique + test images you are using is giving you the bad results?

Also the table results are correct, as we have experimented and validated the weights extensively with different stride values, and found stride=3 to give us the best results. The only typo is the M-GAN sensitivity result will be in BOLD text rather than ours.

from rvgan.

AdamZHAOZhou avatar AdamZHAOZhou commented on July 26, 2024

I used sensitivity=0.8199, specificity=0.9806 and accuracy= 0.9697 to calculate F1 score, as shown in table 1, however, the value of F1 score I calculated by hand is too far from the value of F1 score in the table 1.

from rvgan.

SharifAmit avatar SharifAmit commented on July 26, 2024

F1-scrore is calculated using Precision and Sensitivity. We used pycm library.

import pycm

cm = ConfusionMatrix(actual_vector=y_true, predict_vector=y_pred)

print("Specificity: " + str(cm.TNR[1]))
print("Sensitivity: " + str(cm.TPR[1]))
print("Accuracy : " + str(cm.ACC[0]))
print("F1 Score: " + str((2*cm.PPV[0]*cm.TPR[1])/(cm.PPV[0]+cm.TPR[1])))

from rvgan.

AdamZHAOZhou avatar AdamZHAOZhou commented on July 26, 2024

I think you should check the calculation again instead of the program. Because I also tested M-GAN by sensitivity=0.8234, specificity=0.9938 and accuracy= 0.9736 to calculate F1 score, which is right.
755260526

from rvgan.

smridhi29 avatar smridhi29 commented on July 26, 2024

I downloaded your weight and test, the results was right, so I did not whether I need to pay attention to some details during training.

Where did you test the weights and biases? Could you please help me with the procedure?

from rvgan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.