mirror of
https://github.com/Kagami/go-face.git
synced 2025-10-06 16:18:02 +08:00
Fix example
GoDoc displays it wrong currently.
This commit is contained in:
@@ -8,13 +8,14 @@ import (
|
|||||||
"github.com/Kagami/go-face"
|
"github.com/Kagami/go-face"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Path to directory with models and test images. Here it's assumed it
|
||||||
|
// points to the <https://github.com/Kagami/go-face-testdata> clone.
|
||||||
|
const dataDir = "testdata"
|
||||||
|
|
||||||
// This example shows the basic usage of the package: create an
|
// This example shows the basic usage of the package: create an
|
||||||
// recognizer, recognize faces, classify them using few known ones.
|
// recognizer, recognize faces, classify them using few known ones.
|
||||||
func Example_basic() {
|
func Example_basic() {
|
||||||
// Path to directory with models and test images. Here it's assumed it
|
// Init the recognizer.
|
||||||
// points to the <https://github.com/Kagami/go-face-testdata> clone.
|
|
||||||
dataDir := "testdata"
|
|
||||||
// Now init the recognizer.
|
|
||||||
rec, err := face.NewRecognizer(dataDir)
|
rec, err := face.NewRecognizer(dataDir)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("Can't init face recognizer: %v", err)
|
log.Fatalf("Can't init face recognizer: %v", err)
|
||||||
|
Reference in New Issue
Block a user