| | |
| | | #cgo CFLAGS: -I${SRCDIR}/sdk/include -w -g |
| | | #cgo CXXFLAGS: -I${SRCDIR}/sdk/include -w -g -std=c++11 |
| | | #cgo LDFLAGS: -L/usr/local/cuda-8.0/lib64 -L${SRCDIR}/sdk/lib |
| | | #cgo LDFLAGS: -Wl,-rpath,${SRCDIR}/sdk/lib |
| | | //#cgo LDFLAGS: -Wl,-rpath,${SRCDIR}/sdk/lib |
| | | #cgo LDFLAGS: -lTHFaceImage -lTHFeature -lTHFaceProperty -lTHFaceTracking |
| | | #cgo LDFLAGS: -lcudart -lcublas -lcurand -lrt -ldl -lpthread |
| | | #include <stdlib.h> |
| | |
| | | } |
| | | ret := C.init_detector(s.handle, C.int(minFaces), C.int(rollAngles), C.int(threadMax), C.int(gpu)) |
| | | if ret <= 0 { |
| | | s.printLog("->face--> CREATE Detector ERROR") |
| | | s.printLog("->face--> CREATE Detector ERROR: ", ret) |
| | | return false |
| | | } |
| | | s.detector = true |
| | |
| | | } |
| | | ret := C.init_extractor(s.handle, C.int(threadMax), C.int(gpu)) |
| | | if ret <= 0 { |
| | | s.printLog("->face--> CREATE Extractor ERROR") |
| | | s.printLog("->face--> CREATE Extractor ERROR: ", ret) |
| | | return false |
| | | } |
| | | s.extractor = true |
| | |
| | | } |
| | | ret := C.init_propertizer(s.handle, C.int(threadMax)) |
| | | if ret <= 0 { |
| | | s.printLog("->face--> CREATE Propertizer ERROR") |
| | | s.printLog("->face--> CREATE Propertizer ERROR: ", ret) |
| | | return false |
| | | } |
| | | s.propertizer = true |
| | |
| | | ret := C.init_tracker(s.handle, C.int(w), C.int(h), C.int(maxFaces), C.int(interval), C.int(sampleSize), C.int(threadMax), C.int(gpu)) |
| | | |
| | | if ret <= 0 { |
| | | s.printLog("->face--> CREATE Tracker ERROR") |
| | | s.printLog("->face--> CREATE Tracker ERROR: ", ret) |
| | | return false |
| | | } |
| | | s.tracker = true |