基于Paddle框架的arcface复现

Overview

arcface-Paddle

基于Paddle框架的arcface复现

ArcFace-Paddle

本项目基于paddlepaddle框架复现ArcFace,并参加百度第三届论文复现赛,将在2021年5月15日比赛完后提供AIStudio链接~敬请期待

参考项目:

InsightFace

Paddle版本:

paddlepaddle-gpu==2.0.2

数据集

MS1M-ArcFace 解压数据集,你应该得到以下目录结构

faces_more
|───property
└───cplfw.bin
└───agedb_30.bin
└───vgg2_fp.bin
└───lfw.bin
└───cfp_ff.bin
└───cfp_fp.bin
└───calfw.bin
└───train.rec
└───train.idx

其中train.rec包含训练的图像,train.idx包含训练的标签,其均为mxnet数据格式,其余.bin文件均为二进制bytes文件

训练

整个工程文件具有以下目录结构

|───faces_more
└───eval
└───mxnet_reader
└───mxnet_reader_win10
└───backbones
└───paddle_pretrainedmodel
└───utils
└───dataset.py
└───losses.py
└───partial_fc.py
└───config.py
└───train.py

注意:mxnet_reader用于Linux系统部署训练,mxnet_reader_win10用于win10系统部署训练,两者均为重构mxnet数据读取后的代码

配置说明

config.py里面包含训练的超参数,学习率衰减函数,训练文件路径以及验证文件列表

backbones里面包含提供的训练模型,iresnet18iresnet34iresnet50iresnet100iresnet200

partial_fc来源于论文《Partial FC: Training 10 Million Identities on a Single Machine》,其目的是加速训练超大规模数据集

paddle_pretrainedmodel包含网络的预训练文件,其均为由torch模型转换而来,里面包含测试代码model_test.py以及精度文件results.txt

启动训练

python train.py [--network XXX]

这将会在log文件夹下产生训练的日志文件,其包括损失值以及所需训练的的时间,工程中的training.log包含了部分训练过程中的打印信息

训练过程中的权重文件将保存在emore_arcface_r50文件夹下,保存路径源于你的config文件设置,你应具有以下类似目录

|───emore_arcface_r50
└───backbone.pdparams
└───rank:0_softmax_weight.pkl
└───rank:0_softmax_weight_mom.pkl

本次利用aistudio训练的iresnet50得到的backbone.pdparams精度如下,其中lfw=0.99750cplfw=0.92117calfw=0.96017,你可以通过修改/home/aistudio/paddle_pretrainedmodel/ model_test.py权重路径model_params=/home/aistudio/emore_arcface_r50/backbone.pdparams来测试自己的模型

由于aistudio对保存版本文件的限制,我将保存的文件已上传至我的服务器,你可以通过wget ftp://207.246.98.85/emore_arcface_r50.zip下载获取

启动测试

模型和数据集读取代码下载

提取码:dzc0

AIStudio链接

cd /home/aistudio/paddle_pretrainedmodel
python model_test.py [--network XXX]

注意到model_test.py测试的官方提供的预训练模型,测试自己的训练模型,你需要修改读取文件的路径以及网络结构

关于作者

姓名 郭权浩
学校 电子科技大学研2020级
研究方向 计算机视觉
主页 Deep Hao的主页
如有错误,请及时留言纠正,非常蟹蟹!
后续会有更多论文复现系列推出,欢迎大家有问题留言交流学习,共同进步成长!
Owner
QuanHao Guo
master at UESTC
QuanHao Guo
Local Similarity Pattern and Cost Self-Reassembling for Deep Stereo Matching Networks

Local Similarity Pattern and Cost Self-Reassembling for Deep Stereo Matching Networks Contributions A novel pairwise feature LSP to extract structural

31 Dec 06, 2022
🦕 NanoSaur is a little tracked robot ROS2 enabled, made for an NVIDIA Jetson Nano

🦕 nanosaur NanoSaur is a little tracked robot ROS2 enabled, made for an NVIDIA Jetson Nano Website: nanosaur.ai Do you need an help? Discord For tech

NanoSaur 162 Dec 09, 2022
ML-Ensemble – high performance ensemble learning

A Python library for high performance ensemble learning ML-Ensemble combines a Scikit-learn high-level API with a low-level computational graph framew

Sebastian Flennerhag 764 Dec 31, 2022
Neural network for digit classification powered by cuda

cuda_nn_mnist Neural network library for digit classification powered by cuda Resources The library was built to work with MNIST dataset. python-mnist

Nikita Ardashev 1 Dec 20, 2021
This repository focus on Image Captioning & Video Captioning & Seq-to-Seq Learning & NLP

Awesome-Visual-Captioning Table of Contents ACL-2021 CVPR-2021 AAAI-2021 ACMMM-2020 NeurIPS-2020 ECCV-2020 CVPR-2020 ACL-2020 AAAI-2020 ACL-2019 NeurI

Ziqi Zhang 362 Jan 03, 2023
Automatic self-diagnosis program (python required)Automatic self-diagnosis program (python required)

auto-self-checker 자동으로 자가진단 해주는 프로그램(python 필요) 중요 이 프로그램이 실행될때에는 절대로 마우스포인터를 움직이거나 키보드를 건드리면 안된다(화면인식, 마우스포인터로 직접 클릭) 사용법 프로그램을 구동할 폴더 내의 cmd창에서 pip

1 Dec 30, 2021
This repository is for DSA and CP scripts for reference.

dsa-script-collections This Repo is the collection of DSA and CP scripts for reference. Contents Python Bubble Sort Insertion Sort Merge Sort Quick So

Aditya Kumar Pandey 9 Nov 22, 2022
Official repository of the paper "A Variational Approximation for Analyzing the Dynamics of Panel Data". Mixed Effect Neural ODE. UAI 2021.

Official repository of the paper (UAI 2021) "A Variational Approximation for Analyzing the Dynamics of Panel Data", Mixed Effect Neural ODE. Panel dat

Jurijs Nazarovs 7 Nov 26, 2022
Multi-View Consistent Generative Adversarial Networks for 3D-aware Image Synthesis (CVPR2022)

Multi-View Consistent Generative Adversarial Networks for 3D-aware Image Synthesis Multi-View Consistent Generative Adversarial Networks for 3D-aware

Xuanmeng Zhang 78 Dec 10, 2022
Accurate identification of bacteriophages from metagenomic data using Transformer

PhaMer is a python library for identifying bacteriophages from metagenomic data. PhaMer is based on a Transorfer model and rely on protein-based vocab

Kenneth Shang 9 Nov 30, 2022
Fast and Simple Neural Vocoder, the Multiband RNNMS

Multiband RNN_MS Fast and Simple vocoder, Multiband RNN_MS. Demo Quick training How to Use System Details Results References Demo ToDO: Link super gre

tarepan 5 Jan 11, 2022
Official PyTorch Implementation of paper "Deep 3D Mask Volume for View Synthesis of Dynamic Scenes", ICCV 2021.

Deep 3D Mask Volume for View Synthesis of Dynamic Scenes Official PyTorch Implementation of paper "Deep 3D Mask Volume for View Synthesis of Dynamic S

Ken Lin 17 Oct 12, 2022
MolRep: A Deep Representation Learning Library for Molecular Property Prediction

MolRep: A Deep Representation Learning Library for Molecular Property Prediction Summary MolRep is a Python package for fairly measuring algorithmic p

AI-Health @NSCC-gz 83 Dec 24, 2022
Cooperative multi-agent reinforcement learning for high-dimensional nonequilibrium control

Cooperative multi-agent reinforcement learning for high-dimensional nonequilibrium control Official implementation of: Cooperative multi-agent reinfor

0 Nov 16, 2021
TensorFlow implementation of ENet, trained on the Cityscapes dataset.

segmentation TensorFlow implementation of ENet (https://arxiv.org/pdf/1606.02147.pdf) based on the official Torch implementation (https://github.com/e

Fredrik Gustafsson 248 Dec 16, 2022
AdamW optimizer and cosine learning rate annealing with restarts

AdamW optimizer and cosine learning rate annealing with restarts This repository contains an implementation of AdamW optimization algorithm and cosine

Maksym Pyrozhok 133 Dec 20, 2022
Code basis for the paper "Camera Condition Monitoring and Readjustment by means of Noise and Blur" (2021)

Camera Condition Monitoring and Readjustment by means of Noise and Blur This repository contains the source code of the paper: Wischow, M., Gallego, G

7 Dec 22, 2022
Unsupervised Foreground Extraction via Deep Region Competition

Unsupervised Foreground Extraction via Deep Region Competition [Paper] [Code] The official code repository for NeurIPS 2021 paper "Unsupervised Foregr

28 Nov 06, 2022
ComputerVision - This repository aims at realized easy network architecture

ComputerVision This repository aims at realized easy network architecture Colori

DongDong 4 Dec 14, 2022
Self-Supervised CNN-GCN Autoencoder

GCNDepth Self-Supervised CNN-GCN Autoencoder GCNDepth: Self-supervised monocular depth estimation based on graph convolutional network To be published

53 Dec 14, 2022