Giter Site home page Giter Site logo

tkianai / retinaface.detectron2 Goto Github PK

View Code? Open in Web Editor NEW
7.0 1.0 2.0 782 KB

Implement RetinaFace based on detectron2/使用detectron2框架实现retinaface

License: MIT License

Python 97.47% Jupyter Notebook 2.53%
detectron2 retinaface object-detection

retinaface.detectron2's Introduction

RetinaFace.detectron2

RetinaFace detector based on detectron2.

visual sample

TODO

  • Baseline R-50
  • Baseline mnet[v1, v2]
  • Update the Conv and Norm Used
  • Update to suitable for latest detectron2 version: remove duplicate anchors
  • Add DFConv
  • Add BiFPN
  • Add other backbones
  • Add visual samples

Usage

Train a new model with this project

  • Stylize the original widerface dataset to coco-style
python tools/widerface_stylized_coco.py 
  • Train
python train_net.py --num-gpus <number of gpus> --config-file <your config file>

For example, train with a baseline with backbone(resnet50), you can use this codes:

python train_net.py --num-gpus 4 --config-file configs/retinaface/retinaface_R_50_FPN.yaml

Test a trained model with this project

When testing model, you only need to specify the following essential arguments:

  • config-file: the same with the config file when you training the model
  • input: video path or regular match file path
  • output: specify the output folder to save the result
  • opts: loading the latest trained checkpoint

For example,

python demo.py --config-file configs/retinaface/retinaface_R50_FPN.yaml --input datasets/widerface/val/images/*/*.jpg --output work_dirs/retinaface_R_50_FPN/val  --opts MODEL.WEIGHTS work_dirs/retinaface_R_50_FPN/model_final.pth

Evaluate a trained model using the widerface toolsets

After generated the result(Test part),

  • Change the results format into widerface style
python tools/predictions_to_widerface_val.py --res work_dirs/retinaface_R_50_FPN/val/results.pkl --save work_dirs/retinaface_R_50_FPN/widerface
  • Use widerface_evaluate to visual the performance
cd tools/widerface_evaluate
python evaluation.py --p ../../work_dirs/retinaface_R_50_FPN/widerface

retinaface.detectron2's People

Contributors

tkianai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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.