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

训练结果acc 为什么一直这么低,但是lfw face verification accuracy: 0.9095 threshold: 0.37753257 结果是这样的 #115

Open
cqray1990 opened this issue Dec 23, 2023 · 3 comments

Comments

@cqray1990
Copy link

cqray1990 commented Dec 23, 2023

total time is 254.24768543243408, average time is 0.9892906047954634
lfw face verification accuracy: 0.9095 threshold: 0.37753257
Sat Dec 23 08:19:27 2023 train epoch 2 iter 10 0.08301005559180279 iters/s loss 12.163952827453613 acc 0.0234375
Sat Dec 23 08:35:10 2023 train epoch 2 iter 110 0.10600735235136766 iters/s loss 11.601116180419922 acc 0.02734375
Sat Dec 23 08:51:06 2023 train epoch 2 iter 210 0.10467295813176283 iters/s loss 11.698826789855957 acc 0.02734375
Sat Dec 23 09:07:12 2023 train epoch 2 iter 310 0.10353925427018165 iters/s loss 11.612323760986328 acc 0.0390625
Sat Dec 23 09:23:40 2023 train epoch 2 iter 410 0.10121389428942351 iters/s loss 11.697545051574707 acc 0.04296875
Sat Dec 23 09:39:57 2023 train epoch 2 iter 510 0.10231825089000418 iters/s loss 11.737585067749023 acc 0.046875
Sat Dec 23 09:57:14 2023 train epoch 2 iter 610 0.09639180206759532 iters/s loss 11.6640625 acc 0.03515625

训练数据是CASIA-WebFace 10575的那份数据

以下是配置文件:
class Config(object):
env = 'default'
backbone = 'resnet18'
classify = 'softmax'
num_classes = 13938 #10575
metric = 'arc_margin'
easy_margin = False
use_se = False
loss = 'focal_loss'

display = False
finetune = False

train_root = /facedata/CASIA-WebFace_align/'
train_list = '/img_train.txt'
#val_list = '/data/Datasets/webface/val_data_13938.txt'

#test_root = '/data1/Datasets/anti-spoofing/test/data_align_256'
#test_list = 'test.txt'

lfw_root = ‘/facedata/lfw-align-128'
lfw_test_list = './lfw_test_pair.txt'

checkpoints_path = 'checkpoint'
load_model_path = 'models/resnet18.pth'
test_model_path = 'checkpoint/resnet18_110.pth'
save_interval = 5

train_batch_size = 256  # batch size
test_batch_size = 60

input_shape = (1, 128, 128)

optimizer = 'sgd'

use_gpu = True  # use GPU or not
gpu_id = '0, 1'
num_workers = 4  # how many workers for loading data
print_freq = 100  # print info every N batch

debug_file = '/tmp/debug'  # if os.path.exists(debug_file): enter ipdb
result_file = 'result.csv'

max_epoch = 50
lr = 1e-1  # initial learning rate
lr_step = 10
lr_decay = 0.95  # when val_loss increase, lr = lr*lr_decay
weight_decay = 5e-4
@lypliuyouping
Copy link

total time is 254.24768543243408, average time is 0.9892906047954634 lfw face verification accuracy: 0.9095 threshold: 0.37753257 Sat Dec 23 08:19:27 2023 train epoch 2 iter 10 0.08301005559180279 iters/s loss 12.163952827453613 acc 0.0234375 Sat Dec 23 08:35:10 2023 train epoch 2 iter 110 0.10600735235136766 iters/s loss 11.601116180419922 acc 0.02734375 Sat Dec 23 08:51:06 2023 train epoch 2 iter 210 0.10467295813176283 iters/s loss 11.698826789855957 acc 0.02734375 Sat Dec 23 09:07:12 2023 train epoch 2 iter 310 0.10353925427018165 iters/s loss 11.612323760986328 acc 0.0390625 Sat Dec 23 09:23:40 2023 train epoch 2 iter 410 0.10121389428942351 iters/s loss 11.697545051574707 acc 0.04296875 Sat Dec 23 09:39:57 2023 train epoch 2 iter 510 0.10231825089000418 iters/s loss 11.737585067749023 acc 0.046875 Sat Dec 23 09:57:14 2023 train epoch 2 iter 610 0.09639180206759532 iters/s loss 11.6640625 acc 0.03515625

训练数据是CASIA-WebFace 10575的那份数据

以下是配置文件: class Config(object): env = 'default' backbone = 'resnet18' classify = 'softmax' num_classes = 13938 #10575 metric = 'arc_margin' easy_margin = False use_se = False loss = 'focal_loss'

display = False
finetune = False

train_root = /facedata/CASIA-WebFace_align/'
train_list = '/img_train.txt'
#val_list = '/data/Datasets/webface/val_data_13938.txt'

#test_root = '/data1/Datasets/anti-spoofing/test/data_align_256'
#test_list = 'test.txt'

lfw_root = ‘/facedata/lfw-align-128'
lfw_test_list = './lfw_test_pair.txt'

checkpoints_path = 'checkpoint'
load_model_path = 'models/resnet18.pth'
test_model_path = 'checkpoint/resnet18_110.pth'
save_interval = 5

train_batch_size = 256  # batch size
test_batch_size = 60

input_shape = (1, 128, 128)

optimizer = 'sgd'

use_gpu = True  # use GPU or not
gpu_id = '0, 1'
num_workers = 4  # how many workers for loading data
print_freq = 100  # print info every N batch

debug_file = '/tmp/debug'  # if os.path.exists(debug_file): enter ipdb
result_file = 'result.csv'

max_epoch = 50
lr = 1e-1  # initial learning rate
lr_step = 10
lr_decay = 0.95  # when val_loss increase, lr = lr*lr_decay
weight_decay = 5e-4

你好,请问这个问题解决了吗

@hwd-code
Copy link

请问你们的训练数据集和list文件是哪里获取的,我网上下载的webface只有图片

@15380831711
Copy link

15380831711 commented Nov 23, 2024

请问你们的训练数据集和list文件是哪里获取的,我网上下载的webface只有图片

稍微改下清洗脚本

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

4 participants