shamangary/SSR-Net

about the results of MegaAgeAsian

oukohou opened this issue · 2 comments

image
In your paper, you got this result, is that on the training datasets or validation datasets? Cause I reimplement the SSRNet in pytorch, but the best results of 90 epochs is like :

train Loss: 22.0870 CA_3: 0.5108, CA_5: 0.7329
val Loss: 44.7439 CA_3: 0.4268, CA_5: 0.6225

the parameters are like:

batch_size = 50
input_size = 64
num_epochs = 90
learning_rate = 0.001 # originally 0.001
weight_decay = 1e-4 # originally 1e-4
augment = False
optimizer_ft = optim.Adam(params_to_update, lr=learning_rate, weight_decay=weight_decay)
criterion = nn.MSELoss()
lr_scheduler = optim.lr_scheduler.StepLR(optimizer_ft, step_size=30, gamma=0.1)

Thanks in advance~

Hello @oukohou, considering I hand it over to my colleague I am not familiar with that one. Please also consider asking https://github.com/b02901145/SSR-Net_megaage-asian

[[There is a testing set in megaage-asian. Please check the dataset.]]

I didn't see your pytorch code so I can only make some speculations.

  1. I use MAE but not MSE loss in the training.
  2. I use the default Adam param in keras.
  3. The batchsize could severely affect the results. Sometimes I try batchsize=8 or 16 is much better than the big batchsize.
  4. In the paper, I wrote the face region should be enlarge to (1+0.4) for the input image. However, for a 64x64 image the face would be too small in some cases. Please consider print out the image before the training to see whether the face region is large enough. If it is not large enough, please use no extra margin detection face as input.

@shamangary Thanks for your timely reply. I just pushed my pytorch code here: SSR_Net_model.py, if you have the time, a glimpse would be appreciated, but as the model is rather complex, if you don't have the time, I suggest not to read the codes😂.

I tested the test datasets, and got results as:
image
so seems it's my implementation is not so well as the paper's.

  1. I will try the MAE later.
  2. I also used the Adam, but mayer a little different params.
  3. Yeah I noticed this problem, as my first try of batchsize was 1248 as this model is quite small, but got nan...
  4. This may be a big issue, I will try a different face region later as well.

And aslo, I will ask SSR-Net_megaage-asian for more training details.
Thanks again!