windosx / face-engine Goto Github PK
View Code? Open in Web Editor NEWArcsoft ArcFace for Go 虹软人脸检测SDK Go语言版
License: MIT License
Arcsoft ArcFace for Go 虹软人脸检测SDK Go语言版
License: MIT License
怎么将go struct 转为 C struct? 提取人脸特征的时候,咋感觉arr没有赋值呢?
i use go mod. this is some wrong below when i go get github.com/windosx/face-engine/v2:
go: downloading github.com/windosx/face-engine/v2 v2.2.0
verifying github.com/windosx/face-engine/[email protected]: checksum mismatch
downloaded: h1:jlpz+XzYZVuc+zIBhJ7T7ed/T7ldsz+prZEXRfg2Q1k=
sum.golang.org: h1:TxPBwZUWnG6PsR+cxfELUsrjp6rWSN83Uqvk7XndEQY=
SECURITY ERROR
This download does NOT match the one reported by the checksum server.
The bits may have been replaced on the origin server, or an attacker may
have intercepted the download attempt.
For more information, see 'go help module-auth'.
wish to know how to solve ,thank u
H:\project\src\ai\windosx\face-engine\cmd>go build -o test github.com/windosx/face-engine/cmd
C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -larcsoft_face_engine
collect2.exe: error: ld returned 1 exit status
在 Mac 上按 Linux 将 libarcsoft_face.so、libarcsoft_face_engine.so 放入 /usr/lib 目录后运行报错。
github.com/windosx/face-engine/v4
ld: library not found for -larcsoft_face_engine
clang: error: linker command failed with exit code 1 (use -v to see invocation)
请问此库支持 Mac 平台吗?
需要你帮助,怎么样可以联系到你
如题
求问
1、linux centos7.6
2、sdk包,Linux_x64_V3.0 (https://arcfacepackages.blob.core.chinacloudapi.cn/arcface-packages/sdk/arcface/linux/ArcSoft_ArcFace_Linux_x64_V3.0.zip)
3、代码,如readme
错误信息
`
[root@k8s-master face]# go run test.go
/tmp/go-build3806936039/b035/_x002.o: In function _cgo_a391bd3f5a30_Cfunc_ASFGetActiveDeviceInfo': /tmp/go-build/cgo-gcc-prolog:173: undefined reference to
ASFGetActiveDeviceInfo'
/tmp/go-build3806936039/b035/_x002.o: In function _cgo_a391bd3f5a30_Cfunc_ASFGetFaceLandMark': /tmp/go-build/cgo-gcc-prolog:248: undefined reference to
ASFGetFaceLandMark'
/tmp/go-build3806936039/b035/_x002.o: In function _cgo_a391bd3f5a30_Cfunc_ASFGetMask': /tmp/go-build/cgo-gcc-prolog:324: undefined reference to
ASFGetMask'
/tmp/go-build3806936039/b035/_x002.o: In function _cgo_a391bd3f5a30_Cfunc_ASFImageQualityDetect': /tmp/go-build/cgo-gcc-prolog:370: undefined reference to
ASFImageQualityDetect'
/tmp/go-build3806936039/b035/_x002.o: In function _cgo_a391bd3f5a30_Cfunc_ASFOfflineActivation': /tmp/go-build/cgo-gcc-prolog:410: undefined reference to
ASFOfflineActivation'
/tmp/go-build3806936039/b035/_x002.o: In function _cgo_a391bd3f5a30_Cfunc_ASFSetFaceShelterParam': /tmp/go-build/cgo-gcc-prolog:520: undefined reference to
ASFSetFaceShelterParam'
/tmp/go-build3806936039/b035/_x002.o: In function _cgo_a391bd3f5a30_Cfunc_ASFUpdateFaceData': /tmp/go-build/cgo-gcc-prolog:581: undefined reference to
ASFUpdateFaceData'
collect2: error: ld returned 1 exit status`
C:\Users\�º���\AppData\Local\Temp\go-build647411330\b036_x002.o: In function _cgo_a391bd3f5a30_Cfunc_ASFGetActiveDeviceInfo': /tmp/go-build/cgo-gcc-prolog:179: undefined reference to
ASFGetActiveDeviceInfo'
C:\Users\�º���\AppData\Local\Temp\go-build647411330\b036_x002.o: In function _cgo_a391bd3f5a30_Cfunc_ASFGetFaceLandMark': /tmp/go-build/cgo-gcc-prolog:258: undefined reference to
ASFGetFaceLandMark'
C:\Users\�º���\AppData\Local\Temp\go-build647411330\b036_x002.o: In function _cgo_a391bd3f5a30_Cfunc_ASFGetMask': /tmp/go-build/cgo-gcc-prolog:338: undefined reference to
ASFGetMask'
C:\Users\�º���\AppData\Local\Temp\go-build647411330\b036_x002.o: In function _cgo_a391bd3f5a30_Cfunc_ASFImageQualityDetect': /tmp/go-build/cgo-gcc-prolog:385: undefined reference to
ASFImageQualityDetect'
C:\Users\�º���\AppData\Local\Temp\go-build647411330\b036_x002.o: In function _cgo_a391bd3f5a30_Cfunc_ASFOfflineActivation': /tmp/go-build/cgo-gcc-prolog:427: undefined reference to
ASFOfflineActivation'
C:\Users\�º���\AppData\Local\Temp\go-build647411330\b036_x002.o: In function _cgo_a391bd3f5a30_Cfunc_ASFSetFaceShelterParam': /tmp/go-build/cgo-gcc-prolog:542: undefined reference to
ASFSetFaceShelterParam'
C:\Users\�º���\AppData\Local\Temp\go-build647411330\b036_x002.o: In function _cgo_a391bd3f5a30_Cfunc_ASFUpdateFaceData': /tmp/go-build/cgo-gcc-prolog:606: undefined reference to
ASFUpdateFaceData'
collect2.exe: error: ld returned 1 exit status
首先感谢作者将虹软的sdk绑定到go,在今天偶发的一个bug,在engine.go的第296行
byteArr := (*[1 << 28]byte)(unsafe.Pointer(asfFaceFeature.feature))[:height:height] //如果图片中的人脸特征提取失败会导致asfFaceFeature.feature为nil,从而导致这里抛出panic,对应虹软sdk的错误代码为:81925
可通过修改为以下代码,或在提取特征逻辑中加入判断是否为nil的逻辑来解决
byteArr := (*[1 << 28]byte)(unsafe.Pointer(asfFaceFeature.feature)) //删除[:height:height]
如题,windows或linux都行
//#cgo LDFLAGS : -L${SRCDIR} -larcsoft_face_engine
你好,我在linux下使用,这个库文件必须放/usr/lib下,怎么进行调整到项目目录下。
找了很多的,没有找到相关的内容,特来请教下
拜读了你的代码,非常不错的工作,看到你的Util,有几个小建议
for starty := 0; starty < height; starty++ {
for startx := 0; startx < newWidth; startx++ { <---- 这里直接读到4 的倍数即可
R := imgMatrix[starty][startx][0]
G := imgMatrix[starty][startx][1]
B := imgMatrix[starty][startx][2]
bgrData = append(bgrData, B, G, R)
}
}
util 的接口都是 文件 filename ,可以改一下,有时候是从网络上读取的字节流
image 转换 nrgba 可以直接 用
"golang.org/x/image/draw"
b := src.Bounds()
m := image.NewNRGBA(image.Rect(0, 0, b.Dx(), b.Dy()))
draw.Draw(m, m.Bounds(), src, b.Min, draw.Src)
最近按照您的方法去做3.0版的SDK,问题太多了,做不下去
在多协程抽取图片特征的时候,会间歇性的报错,导致项目退出,但是使用虹软其他功能就从来没出现过问题
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.