Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Kagami/go-face
/ functions
Functions
53 in github.com/Kagami/go-face
⨍
Functions
53
◇
Types & classes
14
↓ 5 callers
Method
recognize
(type_ int, imgData []byte, maxFaces int)
face.go:93
↓ 4 callers
Function
getTPath
(fname string)
face_test.go:60
↓ 4 callers
Method
recognizeFile
(type_ int, imgPath string, maxFaces int)
face.go:156
↓ 3 callers
Method
Classify
Classify returns class ID for the given descriptor. Negative index is returned if no match. Thread-safe.
face.go:243
↓ 3 callers
Method
Close
Close frees resources taken by the Recognizer. Safe to call multiple times. Don't use Recognizer after close call.
face.go:258
↓ 3 callers
Function
recognizeAndClassify
(fpath string, tolerance float32)
face_test.go:118
↓ 2 callers
Method
RecognizeFile
Same as Recognize but accepts image path instead.
face.go:202
↓ 2 callers
Method
RecognizeSingleFile
Same as RecognizeSingle but accepts image path instead.
face.go:211
↓ 2 callers
Method
SetSamples
SetSamples sets known descriptors so you can classify the new ones. Thread-safe.
face.go:231
↓ 2 callers
Function
makeError
makeError constructs Go error for passed error info.
error.go:29
↓ 1 callers
Method
Classify
facerec.cc:124
↓ 1 callers
Method
ClassifyThreshold
Same as Classify but allows to specify max distance between faces to consider it a match. Start with 0.6 if not sure.
face.go:250
↓ 1 callers
Method
Config
facerec.cc:129
↓ 1 callers
Function
NewRecognizer
NewRecognizer returns a new recognizer interface. modelDir points to directory with shape_predictor_5_face_landmarks.dat and dlib_face_recognition_res
face.go:65
↓ 1 callers
Method
Recognize
Recognize returns all faces found on the provided image, sorted from left to right. Empty list is returned if there are no faces, error is returned if
face.go:173
↓ 1 callers
Method
Recognize
facerec.cc:79
↓ 1 callers
Method
SetSamples
facerec.cc:118
↓ 1 callers
Function
classify
classify.cc:5
↓ 1 callers
Function
getIdolData
()
face_test.go:64
↓ 1 callers
Function
getTrainData
(idata *IdolData)
face_test.go:90
↓ 1 callers
Function
jitter_image
facerec.cc:257
↓ 1 callers
Function
jpeg_loader_error_exit
jpeg_mem_loader.cc:13
↓ 1 callers
Function
load_mem_jpeg
From memory JPEG loader because dlib lacks one.
jpeg_mem_loader.cc:27
↓ 1 callers
Function
str2descr
(s string)
face_test.go:82
Method
Error
()
error.go:10
Method
Error
()
error.go:17
Method
Error
()
error.go:24
Function
Example_basic
This example shows the basic usage of the package: create an recognizer, recognize faces, classify them using few known ones.
example_test.go:17
Method
FaceRec
facerec.cc:62
Function
New
New creates new face with the provided parameters.
face.go:54
Function
NewRecognizerWithConfig
(modelDir string, size int, padding float32, jittering int)
face.go:81
Function
NewWithShape
(r image.Rectangle, s []image.Point, d Descriptor)
face.go:58
Method
RecognizeCNN
(imgData []byte)
face.go:177
Method
RecognizeFileCNN
(imgPath string)
face.go:206
Method
RecognizeSingle
RecognizeSingle returns face if it's the only face on the image or nil otherwise. Only JPEG format is currently supported. Thread-safe.
face.go:183
Method
RecognizeSingleCNN
(imgData []byte)
face.go:192
Method
RecognizeSingleFileCNN
(imgPath string)
face.go:220
Function
SquaredEuclideanDistance
(d1 Descriptor, d2 Descriptor)
face.go:45
Function
TestClassifyThreshold
(t *testing.T)
face_test.go:214
Function
TestClose
(t *testing.T)
face_test.go:231
Function
TestEmptyClassify
(t *testing.T)
face_test.go:171
Function
TestIdols
(t *testing.T)
face_test.go:179
Function
TestImageLoadError
(t *testing.T)
face_test.go:150
Function
TestInit
(t *testing.T)
face_test.go:142
Function
TestNumFaces
(t *testing.T)
face_test.go:160
Function
TestSerializationError
(t *testing.T)
face_test.go:132
Function
facerec_classify
facerec.cc:240
Function
facerec_config
facerec.cc:166
Function
facerec_free
facerec.cc:246
Function
facerec_init
facerec.cc:152
Function
facerec_recognize
facerec.cc:171
Function
facerec_set_samples
facerec.cc:223
Function
jpeg_loader_emit_message
jpeg_mem_loader.cc:20