jack139 / arcface-go

Go implementation of Arcface inference

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Arcface-go

Go implementation of Arcface inference

Prerequisites

  • The onnx-format models used in the code is "buffalo_l" from insightface.
  • ONNX Runtime (v1.12.1 in my environment) is required.
  • OpenCV (v4.5.5 in my environment) is required, because some codes borrowed from gocv to implement EstimateAffinePartial2DWithParams().

Run example

The example is too simple, detect faces in the input image and retrieve features of the first face.

go run example.go
  • If your onnxruntime and opencv is not installed in /usr/local, some paths in CGO flags and LD_LIARARY_PATH should be corrected (CGO_CPPFLAGS="-I/path/to/include/opencv4" LD_LIBRARY_PATH=/path/to/lib ).
  • path to "buffalo_l" should be corrected in example.go .

Sample API

arcface-go-api

About

Go implementation of Arcface inference

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Go 68.9%Language:C++ 30.8%Language:C 0.3%