diff --git a/README.md b/README.md index a5cbcfb..1299d34 100644 --- a/README.md +++ b/README.md @@ -174,7 +174,7 @@ $ python2 demo.py To run the web version: ```bash -$ go run main.go -cf "../../data/facefinder" +$ go run main.go -cf "../../cascade/facefinder" ``` Then access the `http://localhost:8081/cam` url from a web browser. diff --git a/data/facefinder b/cascade/facefinder similarity index 100% rename from data/facefinder rename to cascade/facefinder diff --git a/data/puploc b/cascade/puploc similarity index 100% rename from data/puploc rename to cascade/puploc diff --git a/core/pigo_test.go b/core/pigo_test.go index 2118868..d3d7210 100644 --- a/core/pigo_test.go +++ b/core/pigo_test.go @@ -13,7 +13,7 @@ var pigoCascadeFile []byte func init() { var err error - pigoCascadeFile, err = ioutil.ReadFile("../data/facefinder") + pigoCascadeFile, err = ioutil.ReadFile("../cascade/facefinder") if err != nil { log.Fatalf("Error reading the cascade file: %v", err) } diff --git a/examples/delaunay/pigo.go b/examples/delaunay/pigo.go index 9324be1..efd9818 100644 --- a/examples/delaunay/pigo.go +++ b/examples/delaunay/pigo.go @@ -10,7 +10,7 @@ import ( "runtime" "unsafe" - "github.com/esimov/pigo/core" + pigo "github.com/esimov/pigo/core" "github.com/esimov/triangle" ) @@ -137,7 +137,7 @@ func (px pixs) clusterDetection(pixels []uint8) []pigo.Detection { } if len(cascade) == 0 { - cascade, err = ioutil.ReadFile("../../data/facefinder") + cascade, err = ioutil.ReadFile("../../cascade/facefinder") if err != nil { log.Fatalf("Error reading the cascade file: %v", err) } diff --git a/examples/puploc/puploc.go b/examples/puploc/puploc.go index 6891d81..1e07973 100644 --- a/examples/puploc/puploc.go +++ b/examples/puploc/puploc.go @@ -101,7 +101,7 @@ func clusterDetection(pixels []uint8, rows, cols int) []pigo.Detection { // Ensure that the face detection classifier is loaded only once. if len(cascade) == 0 { - cascade, err = ioutil.ReadFile("../../data/facefinder") + cascade, err = ioutil.ReadFile("../../cascade/facefinder") if err != nil { log.Fatalf("Error reading the cascade file: %v", err) } @@ -117,7 +117,7 @@ func clusterDetection(pixels []uint8, rows, cols int) []pigo.Detection { // Ensure that we load the pupil localization cascade only once if len(puplocCascade) == 0 { - puplocCascade, err := ioutil.ReadFile("../../data/puploc") + puplocCascade, err := ioutil.ReadFile("../../cascade/puploc") if err != nil { log.Fatalf("Error reading the puploc cascade file: %s", err) } diff --git a/examples/python/pigo.go b/examples/python/pigo.go index 247c917..87eaa66 100644 --- a/examples/python/pigo.go +++ b/examples/python/pigo.go @@ -73,7 +73,7 @@ func clusterDetection(pixels []uint8, rows, cols int) []pigo.Detection { } if len(cascade) == 0 { - cascade, err = ioutil.ReadFile("../../data/facefinder") + cascade, err = ioutil.ReadFile("../../cascade/facefinder") if err != nil { log.Fatalf("Error reading the cascade file: %s", err) } diff --git a/examples/web/main.go b/examples/web/main.go index 49f12bd..4cab508 100644 --- a/examples/web/main.go +++ b/examples/web/main.go @@ -16,7 +16,7 @@ import ( "os" "os/exec" - "github.com/esimov/pigo/core" + pigo "github.com/esimov/pigo/core" "github.com/fogleman/gg" ) @@ -57,7 +57,7 @@ func main() { flag.Parse() if len(*cascadeFile) == 0 { - log.Fatal("Usage: go run main.go -cf ../../data/facefinder") + log.Fatal("Usage: go run main.go -cf ../../cascade/facefinder") } if *scaleFactor < 1 {