Coder Social home page Coder Social logo

retinaface-with-gender's Introduction

RetinaFace with Gender


The demo of retinaface with gender.

Description

  • backbone: mobilenet-v2 | resnet50
  • datasets: widerface
  • addition: 在原始网络中加入性别判断,目前仅在resnet50中支持,cfg_re50.gender=True
  • tensorboard:

logs

  • FDDB ROC:

    ROC

  • demo:

    girls

    nba

    stars

Pretrained Models

I provide all of the model to test. 链接: https://pan.baidu.com/s/1MYylkAeOW-5Uk3LnwdfgwA 密码: w8uw

Path Description
torch weight of pytorch
onnx weight of onnx
openvino weight of openvino
tensorrt weight of tensorrt

Comparison

All test on ubuntu 18.04 | 8 Intel(R) Core(TM) i5-8300H CPU @ 2.30GHz | GeForce GTX 1060 6G

Resnet50 with Gender

Name Time(s)
torch gpu 0.0159
torch cpu 0.1233
onnx 0.0661
openvino 0.0595
tensorrt 0.0084

MobileNetV2

Name Time(s)
torch gpu 0.0106
torch cpu 0.0522
onnx 0.0192
openvino 0.0166
tensorrt 0.0030

Test

torch

python scripts/test_images.py \
--ckpt ./ckpt/torch/Resnet50_Gender_Final.pth \
--cfg config/res50_gender.yaml \
--device cpu \
--images_path test_images \
--save results

onnx

python scripts/test_onnx.py \
--ckpt ./ckpt/onnx/retinaface-res50-gender-320.onnx \
--cfg config/res50_gender.yaml \
--images_path test_images \
--save results

openvino

python scripts/test_openvino.py \
--xml ./ckpt/openvino/res50/retinaface-res50-gender-320.xml \
--bin ./ckpt/openvino/res50/retinaface-res50-gender-320.bin \
--cfg config/res50_gender.yaml \
--images_path test_images \
--save results

tensorrt

recommend use docker:

docker pull nvcr.io/nvidia/pytorch:20.09-py3

then:

docker run -it --rm --runtime nvidia  --network host -v $PWD:/home  --name tensorrt nvcr.io/nvidia/pytorch:20.09-py3

run:

python scripts/test_tensorrt.py \
--ckpt ./ckpt/tensorrt/Resnet50_Gender_Final_Trt.pth \
--cfg config/res50_gender.yaml \
--images_path test_images \
--save results

Citation

This code is heavily based on Pytorch_Retinaface 🙏🙏🙏

retinaface-with-gender's People

Contributors

talkuhulk avatar

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.