$ sudo apt install build-essential
$ go env
It is essential your device-sdk-go folder is inside your GOPATH directory.
Create folders to download SDK to:
$ mkdir -p ~/go/src/github.com/edgexfoundry
$ cd ~/go/src/github.com/edgexfoundry
$ git clone https://github.com/edgexfoundry/device-sdk-go.git
Clone the device-goface files from the project repo:
$ git clone https://github.com/oliviakumar/vmware_edgewalk
Change your directory in terminal to the device-goface folder (containig the makefile) and build the service
$ make build
If there are no error, your service should be ready to run. Change directories to cmd/device-goface and see if there's an executable "device-goface". If yes, execute it, if no, try to build again (in the higher device-goface), using
$ go build
Execute the built file:
$ ./device-goface
Watch the logs in the terminal to see if it works and check in Postman or browser: http://localhost:48080/api/v1/event/device/RandNum-Device-01/100
For any more help, consider the tutorial at: https://docs.edgexfoundry.org/Ch-GettingStartedSDK-Go.html
To be able to run go-face, or programs that use go-face, on your local machine, follow
these steps on:
To use go-face in your go program:
import "github.com/Kagami/go-face"
Train()
Infer()
Parameters:
edgexcontext - edgex event instance
params - parameters of the data interface that will be populated
Returns:
boolean - true or false depending on whether the face matches
interface - contains the data of matched person, or default values for anonymous
TestForFace()
Parameters:
imgPath - name of the image to check
Returns:
boolean - true if given image path contains a face, false otherwise