Git Product home page Git Product logo

triton-face-recognition's Introduction

Triton face recogition

End-to-end deploy face detection, face align, face recogition in triton inference server

Prerequisites

  • Docker
  • Nvidia-driver
  • Nvidia-docker2

Export .engine

Face detection model

  • Export checkpoint to onnx model:
    • Clone yolov7-face-detection and cd into yolov7-face-detection folder
    • Download weight and save into weights/yolov7-tiny33.pt
    • Export to onnx: python3 export.py --weights ./weights/yolov7-tiny33.pt --img-size 640 --batch-size 1 --dynamic-batch --grid --end2end --max-wh 640 --topk-all 100 --iou-thres 0.5 --conf-thres 0.2 --device 1 --simplify --cleanup --trt
  • Or download onnx file from from github.com/hiennguyen9874/yolov7-face-detection/releases/tag/v0.1 and save as models/FaceDetection/1/yolov7-tiny41-nms-trt.onnx
  • Export to TensorRT: docker-compose run --rm triton /usr/src/tensorrt/bin/trtexec --onnx=/models/FaceDetection/1/yolov7-tiny41-nms-trt.onnx --saveEngine=/models/FaceDetection/1/model.plan --fp16 --minShapes=images:1x3x640x640 --optShapes=images:1x3x640x640 --maxShapes=images:4x3x640x640 --shapes=images:1x3x640x640 --workspace=12288

Face recognition model

  • Download webface_r50.onnx from deepinsight/insightface and cleaning onnx file: python3 scripts/onnx_clean.py --onnx-path samples/models/Secondary_Recognition/ms1mv3_r50_pfc.onnx --image-size 112,112 --batch-size 1 --simplify --dynamic --cleanup
  • Or download onnx file from from: github.com/hiennguyen9874/deepstream-face-recognition/releases/tag/v0.1 and save as models/FaceRecognition/1/webface_r50_dynamic_simplify_cleanup.onnx
  • Export to TensorRT: docker-compose run --rm triton /usr/src/tensorrt/bin/trtexec --onnx=/models/FaceRecognition/1/webface_r50_dynamic_simplify_cleanup.onnx --saveEngine=/models/FaceRecognition/1/model.plan --fp16 --minShapes=input.1:1x3x112x112 --optShapes=input.1:1x3x112x112 --maxShapes=input.1:16x3x112x112 --shapes=input.1:1x3x112x112 --workspace=12288

Run demo

triton-face-recognition's People

Contributors

hiennguyen9874 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.