DanJun6737 / TopoFR

[NeurIPS 2024] TopoFR: A Closer Look at Topology Alignment on Face Recognition
8 stars 0 forks source link

TopoFR: A Closer Look at Topology Alignment on Face Recognition

If you like TopoFR, please give us a star ⭐ on GitHub for the latest update~

This is the official PyTorch implementation of "[NeurIPS 2024] TopoFR: A Closer Look at Topology Alignment on Face Recognition".

image

Requirements

Datasets

You can download the training datasets, including MS1MV2 and Glint360K:

You can download the test dataset IJB-C as follows:

How to Train Models

  1. You need to modify the path of training dataset in every configuration file in folder configs.

  2. To run on a machine with 4 GPUs:

    python -m torch.distributed.launch --nproc_per_node=4 --nnodes=1 --node_rank=0 --master_addr="127.0.0.1" --master_port=12581 train.py 

How to Test Models

  1. You need to modify the path of IJB-C dataset in eval_ijbc_ms1mv2.py and eval_ijbc_glint360k.py.

  2. Run:

    python eval_ijbc_ms1mv2.py --model-prefix work_dirs/ms1mv2_r50/model.pt --result-dir work_dirs/ms1mv2_r50 --network r50 > ijbc_ms1mv2_R50_TopoFR.log 2>&1 &
    python eval_ijbc_glint360k.py --model-prefix work_dirs/glint360k_r50/model.pt --result-dir work_dirs/glint360k_r50 --network r50 > ijbc_glint360k_R50_TopoFR.log 2>&1 &

TopoFR Pretrained Models

Verification accuracy (%) on IJB-C benchmark. † denotes TopoFR trained by CosFace. Training Data Model IJB-C(1e-5) IJB-C(1e-4)
MS1MV2 R50 TopoFR† 94.79 96.42
MS1MV2 R50 TopoFR 94.71 96.49
MS1MV2 R100 TopoFR† 95.28 96.96
MS1MV2 R100 TopoFR 95.23 96.95
MS1MV2 R200 TopoFR† 95.19 97.12
MS1MV2 R200 TopoFR 95.15 97.08
Training Data Model IJB-C(1e-5) IJB-C(1e-4)
Glint360K R50 TopoFR 95.99 97.27
Glint360K R100 TopoFR 96.57 97.60
Glint360K R200 TopoFR 96.71 97.84

Citation

Acknowledgments

We thank Insighface for the excellent code base.