Skip to content

Latest commit

 

History

History
29 lines (15 loc) · 1.09 KB

README.md

File metadata and controls

29 lines (15 loc) · 1.09 KB

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