GithubHelp home page GithubHelp logo

qidiso / mobilefacenet-v2 Goto Github PK

View Code? Open in Web Editor NEW
385.0 71.0 148.0 481 KB

🔥improve the accuracy of mobilefacenet(insight face) reached 99.733 in the cfp-ff、 the 99.68+ in lfw,96.71+ in agedb30.🔥

Shell 24.94% Python 75.06%
face insightface mobilenet fast mobile

mobilefacenet-v2's Introduction

mobilefacenet-V2

now we get more higher accuray:

[lfw][12000]Accuracy-Flip: 0.99667+-0.00358
[agedb_30][12000]Accuracy-Flip: 0.96667+-0.00167 use my modified mobilenet network.

lr-batch-epoch: 0.01 11738 1 testing verification.. (12000, 512) infer time 39.129495 [lfw][36000]XNorm: 22.729305 [lfw][36000]Accuracy-Flip: 0.99667+-0.00358

improve the accuracy of mobilefacenet in paper mobilefacenet论文(https://arxiv.org/abs/1804.07573)

First step training (use softmax to pretrain): train softmax(facenet):

[lfw][62000]XNorm: 23.029881 [lfw][62000]Accuracy-Flip: 0.99383+-0.00308 testing verification.. (14000, 512) infer time 20.121058 [cfp_fp][62000]XNorm: 24.043967 [cfp_fp][62000]Accuracy-Flip: 0.89343+-0.01705 testing verification.. (12000, 512) infer time 16.860138 [agedb_30][62000]XNorm: 23.566453 [agedb_30][62000]Accuracy-Flip: 0.93883+-0.01675 saving 31 INFO:root:Saved checkpoint to "../models/MF/model-y1-softmax12-0031.params"

pretrained models: https://pan.baidu.com/s/1xBq9FoL79z7K892aFWkmFw

Second step: CUDA_VISIBLE_DEVICES='0,1' python -u train_softmax.py --network y1 --ckpt 2 --loss-type 4 --margin-s [128] --lr-steps 120000,180000,210000,230000 --emb-size [512] --per-batch-size 150 --data-dir ../data/faces_ms1m_112x112 --pretrained ../models/MobileFaceNet/model-y1-softmax,20 --prefix ../models/MF/model-y1-arcface

Third step: CUDA_VISIBLE_DEVICES='0,1' python -u train_softmax.py --network y1 --ckpt 2 --loss-type 4 --lr 0.001 --lr-steps 40000,60000,70000 --wd 0.00004 --fc7-wd-mult 10 --emb-size 512 --per-batch-size 150 --margin-s 64 --data-dir ../data/faces_ms1m_112x112 --pretrained ../models/MF/model-y1-arcface,46 --prefix ../models/MF/model-y1-arcface

Update wd=0.00001 , --fc7-wd-mult 10 --emb-size 512 i get new Accuracy:

Accuracy
dbname accuracy
lfw 0.996233
cfp_fp 0.94300
age_db30 0.96383

##########first #CUDA_VISIBLE_DEVICES='0' python -u train_softmax.py --network y1 --ckpt 2 --loss-type 4 --lr 0.1 --emb-size 512 --per-batch-size 240 --margin-s 64 --wd 0.00001 --fc7-wd-mult 10 --data-dir /Users/sunyimac/faces_emore --pretrained ../models/MobileFaceNet/model-y1-arcfaced,18 --prefix ../models/MobileFaceNet/model-y1-arcface

#CUDA_VISIBLE_DEVICES='0' python -u train_softmax.py --network y1 --ckpt 2 --loss-type 4 --lr 0.01 --emb-size 512 --per-batch-size 240 --margin-s 64 --wd 0.00001 --fc7-wd-mult 10 --data-dir /Users/sunyimac/faces_emore --pretrained ../models/MobileFaceNet/model-y1-arcface,62 --prefix ../models/MobileFaceNet/model-y1-arcfaced

CUDA_VISIBLE_DEVICES='0' python -u train_softmax.py --network y1 --ckpt 2 --loss-type 4 --lr 0.00001 --emb-size 512 --per-batch-size 240 --wd 0.00001 --fc7-wd-mult 10 --data-dir /Users/sunyimac/faces_emore --pretrained ../models/MobileFaceNet/model-y1-arcface,75 --prefix ../models/MobileFaceNet/model-y1-arcfaced

Update wd=0.000001 trainning is not end. now is the new Accuracy: i get new higher Accuracy:

Accuracy
dbname accuracy
lfw 0.99667
cfp_fp 0.94300
age_db30 0.96700

Update wd=0.0000001 trainning is not end. now is the new Accuracy: i get new higher Accuracy:

Accuracy🔥
dbname accuracy
lfw 0.99683
cfp_ff 0.99733
cfp_fp 0.94500
age_db30 0.96717
you can visit my log file:
https://github.com/qidiso/mobilefacenet-V2/blob/master/retrain0.001.log

Now Release the models:

[models:]https://github.com/aidlearning/AidLearning-FrameWork/tree/master/src/facencnn/models (reached 99.733 in the cfp-ff、 the 99.68+ in lfw,96.71+ in agedb30)

mobilefacenet-v2's People

Contributors

qidiso avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mobilefacenet-v2's Issues

for evaluate code

Thanks for your great work! Could you share me the code to evaluate the accuracy with my model for dataset LFW,CFP and AgeDB! .Thanks a million.

Model Size 180 MB?

You have suggested three steps of training rght?, for the first step, what should be the expected model size? I am getting 180 MB, but you final model is 5 MB.
I keyed in the command you provided in the README. Is 180 MB expected or am I doing anything wrong?

Resume Training?

Hi, how do you resume the training with the last saved checkpoint after the training was stopped?

Why is acc always zero

I used train_softmax,py in https://github.com/deepinsight/insightface/blob/master/src/train_softmax.py
The parameters are set like this:
CUDA_VISIBLE_DEVICES='0' python -u train_softmax.py --network y1 --ckpt 2 --loss-type 4 --lr 0.00001 --emb-size 512 --per-batch-size 80 --wd 0.0000001 --data-dir /home/mi5/insightface/src/data/faces_vgg --pretrained /home/mi5/insightface/models/model-y1/model,00 --prefix ../models/MobileFaceNet/model-y1
Why is acc always zero?Can you help me?
image

Pretrained Model Confusion...

I was looking at the models repo and was confused. What is the difference between det1, det2, and det3 as I am trying to use caffe and are they all for mobilefacenet V2.

emb-size

why your emb size is 512? the result is unfair compared to the orginal paper.and the model size is too large

why the pretrained model with low accuracy

Why I use your training model with low initial accuracy? Am I wrong?

cmd:CUDA_VISIBLE_DEVICES='0' python -u train_softmax.py --network y1 --ckpt 2 --loss-type 4 --lr 0.01 --lr-steps 40000,60000,70000 --wd 0.00004 --fc7-wd-mult 10 --emb-size 512 --per-batch-size 90 --margin-s 128 --data-dir ../datasets/faces_ms1m_112x112 --pretrained ../models/MF/model-y1-softmax12,31 --prefix ../models/MF/model-y1-arcface >>& file.txt &

first test:
testing verification..
(12000, 512)
infer time 154.665504
[lfw][2000]XNorm: 22.648476
[lfw][2000]Accuracy-Flip: 0.98717+-0.00563
testing verification..
(14000, 512)
infer time 175.866512
[cfp_fp][2000]XNorm: 19.110292
[cfp_fp][2000]Accuracy-Flip: 0.83271+-0.01969
testing verification..
(12000, 512)
infer time 157.715533
[agedb_30][2000]XNorm: 22.118053
[agedb_30][2000]Accuracy-Flip: 0.90683+-0.01981
saving 1
INFO:root:Saved checkpoint to "../models/MF/model-y1-arcface-0001.params"

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.