Tripletloss(Facenet) for few shot learning
See original GitHub issueFor few-shot learning tasks like IDCard<->Camera face verification(identification), we only have two face images for each person in most cases for training. Under such situation, metric learning approaches can be tried such as tripletloss.
STEPS:
- Prepare insightface ‘.rec’ dataset from your IDCard/camera face images.
- Finetuning pretrained models with tripletloss, for example:
CUDA_VISIBLE_DEVICES='0,1,2,3' python -u train_triplet.py --data-dir $DATA_DIR \
--network "$NETWORK" --lr 0.005 --pretrained "$PRETRAINED" --per-batch-size 60
We use GPU to do the semi-hard mining so training will be fast.
RESULTS:
We have a private IDCard/Camera face image dataset with 220K identities. Each person has two or more photos, one from IDCard and the others from camera. Split it as 8-2 for training(176K IDs) and testing(45K IDs). We report top1 accuracy and TAR vs FAR for 1:N identification task(N=45K). (Note that we do not use idcard training data in Model-A and Model-B)
DESC. | Rank-1 | TAR@FAR=1e-3 | TAR@FAR=1e-4 | |
---|---|---|---|---|
Model-A1 | LResNet100E trained on ms1m-v1 with Softmax loss | 26.9% | 0.3% | 0.06% |
Model-A2 | LResNet100E trained on ms1m-v1 with ArcFace loss | 70.7% | 17% | 8% |
Model-A3 | LResNet100E trained on ms1m-v2 with ArcFace loss | 76.8% | 21% | 9% |
Model-B | LResNet100E trained on (ms1m-v2+Glint-Asia) with ArcFace loss | 82.4% | 33% | 16% |
Model-C | Triplet-loss finetuning on Model-B | 95.2%(still ongoing) | 78% | 26% |
Issue Analytics
- State:
- Created 5 years ago
- Reactions:32
- Comments:7
Top Results From Across the Web
One-Shot Learning for Face Recognition
The approach of directly training face embeddings, such as via triplet loss, and using the embeddings as the basis for face identification and ......
Read more >A Few-shot Learning Model based on a Triplet Network for the ...
We present a few- shot learning model to classify a day as a 5CP day or a non-. 5CP day 24-hours ahead. A...
Read more >Train FaceNet with triplet loss for real time face recognition on ...
Last year I completed the coursera's Deep Learning Specialization. ... FaceNet is a one-shot model, that directly learns a mapping from face ...
Read more >A conditional Triplet loss for few-shot learning and its ...
In this paper we present a novel conditional Triplet loss for solving few-shot problems using deep metric learning. While the conventional Triplet loss...
Read more >arXiv:1907.03123v2 [cs.CV] 16 Apr 2020
The goal of few-shot learning is to recognize new visual concepts with just ... Compared with the traditional triplet loss, more inter-class ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Will you release the emore + Glin-Asia data, or show how to combine the two?
where is
train_triplet.py
file located ?