Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

a Pytorch reimplementation of SSRNet.

NotificationsYou must be signed in to change notification settings

oukohou/SSR_Net_Pytorch

Repository files navigation

author : oukohou
time : 2019-09-26 16:44:48
email :
oukohou@outlook.com

A pytorch reimplementation ofSSR-Net.

the official keras version is here:SSR-Net

results onMegaAge_Asian datasets:

-trainvalidtest
version_v1^[1]train Loss: 22.0870 CA_3: 0.5108, CA_5: 0.7329val Loss: 44.7439 CA_3: 0.4268, CA_5: 0.6225test Loss: 35.6759 CA_3: 0.4935, CA_5: 0.6902
original paper****CA_3: 0.549, CA_5: 0.741
version_v2^[2]train Loss: 2.9401 CA_3: 0.6326, CA_5: 0.8123val Loss: 4.7221 CA_3: 0.4438, CA_5: 0.6295test Loss: 3.9311 CA_3: 0.5151, CA_5: 0.7163

Note:

  • This SSR-Net model can't fit big learning rate, learning rate should be smaller than 0.002.otherwise the model will very likely always output 0, me myself suspects this is because of theutilizing Tanh as activation function.
  • And also: Batchsizecould severely affect the results. A set of tested params can be :
    batch_size = 50input_size = 64num_epochs = 90learning_rate = 0.001 # originally 0.001weight_decay = 1e-4 # originally 1e-4augment = Falseoptimizer_ft = optim.Adam(params_to_update, lr=learning_rate, weight_decay=weight_decay)criterion = nn.L1Loss()lr_scheduler = optim.lr_scheduler.StepLR(optimizer_ft, step_size=30, gamma=0.1)
  • The dataset preprocess is quite easy. For MegaAsian datasets, you can use the./datasets/read_megaasina_data.py directly;for other datasets, just generate a pandas csv file in format like:
    filename,age1.jpg,23...

is OK. But also, remember to change the./datasets/read_imdb_data.py accordingly.

onnxruntime C++ implementation

thanks toDefTruth 's implementation here:How to convert SSRNet to ONNX and implements with onnxruntime c++.

another small note:

my reading understanding of SSRNet can be found:

which was written in Chinese.

About

a Pytorch reimplementation of SSRNet.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp