ONNX Model Zoo

kellempxt/cv_resnet50_face-detection_retinaface

By kellempxt · ↓ 0 · ♥ 0 · Updated 2024-12-20

What's in this repo

This page lists the files in kellempxt/cv_resnet50_face-detection_retinaface, including model.onnx.

  • 1 ONNX models (.onnx files)
  • 6 files, including 1 .md, 1 .safetensors, 1 .json, 1 .onnx, 1 .bin
  • Last updated 2024-12-20

ONNX files

File Size Download
cv_resnet50_onnx/model.onnx — Download

How to use

These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.

README

RetinaFace 人脸检测器

简介

RetinaFace 是一个实用的单阶段 SOTA 人脸检测器,最初在 arXiv 技术报告中提出,随后被 CVPR 2020接收。

demoimg1

demoimg2

数据

  1. 从百度云或Google云盘下载我们的标注文件(人脸边界框和五个面部关键点)

  2. 下载WIDERFACE数据集。

  3. 在 insightface/RetinaFace/ 目录下按以下结构组织数据集:

data/retinaface/
  train/
    images/
    label.txt
  val/
    images/
    label.txt
  test/
    images/
    label.txt

安装

  1. 安装支持 GPU 的 MXNet。
  2. 如果使用基于 DCN 的骨干网络,请从 Deformable-ConvNets 安装可变形卷积 V2 算子。
  3. 输入 make 构建 cxx 工具。

训练

请查看 train.py 进行训练。

  1. 复制 rcnn/sample_config.py 到 rcnn/config.py

  2. 下载 ImageNet 预训练模型并放入 model/ 目录(这些模型用于训练和参数初始化,而非检测测试/推理)。

    ImageNet ResNet50(百度云和Google云盘)。

    ImageNet ResNet152(百度云和Google云盘)。

  3. 使用以下命令开始训练 CUDA_VISIBLE_DEVICES='0,1,2,3' python -u train.py --prefix ./model/retina --network resnet。
    训练前,您可以在 rcnn/config.py 中检查 resnet 网络配置(例如预训练模型路径、锚点设置和学习率策略等)。

  4. 我们有两个预定义的网络设置:resnet(用于中型和大型模型)和 mnet(用于轻量级模型)。

测试

请查看 test.py 进行测试。

RetinaFace 预训练模型

预训练模型:RetinaFace-R50(百度云或Google云盘)是一个使用 ResNet50 骨干网络的中型模型。它可以在单次前向传播中输出人脸边界框和五个面部关键点。

WiderFace 验证集 mAP:Easy 96.5,Medium 95.6,Hard 90.4。

为避免与 WiderFace 挑战赛(ICCV 2019)冲突,我们推迟了最佳模型的发布时间。

第三方

yangfly: RetinaFace-MobileNet0.25(百度云:nzof)。WiderFace 验证集 mAP:Hard 82.5。(模型大小:1.68Mb)

clancylian: C++ 版本

RetinaFace modelscope 版本

参考文献

@inproceedings{Deng2020CVPR,
title = {RetinaFace: Single-Shot Multi-Level Face Localisation in the Wild},
author = {Deng, Jiankang and Guo, Jia and Ververas, Evangelos and Kotsia, Irene and Zafeiriou, Stefanos},
booktitle = {CVPR},
year = {2020}
}

Model info

pytorch onnx license:unknown region:us
↓ 0 ♥ 0

Created: 2024-12-20

Updated: 2024-12-20

View on Hugging Face

Files (6)

.gitattributes
README.md
cv_resnet50_face-detection_retinaface.safetensors
cv_resnet50_onnx/config.json
cv_resnet50_onnx/model.onnx ONNX
pytorch_model.bin

Related models