esimov / pigo

Fast face detection, pupil/eyes localization and facial landmark points detection library in pure Go.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[QUESTION] - How to run examples on local MacOS?

sujit-baniya opened this issue · comments

All of the examples have empty main functions and I tried to run examples from web folder. It gave me error whenever I try to visit http://localhost:8081/cam:

web git:(master) ✗ go run main.go -cf "../../cascade/facefinder"
2023/10/10 21:50:05 [ERROR] reading next part multipart: NextPart: EOF
2023/10/10 21:50:09 [ERROR] reading next part multipart: NextPart: EOF

Please suggest how could I run examples

In order to run the examples from the https://github.com/esimov/pigo/tree/master/examples folder, as it's stated in the readme file, you need to have Python2 (3) and OpenCV2 installed on your machine. These examples were created only as PoC attempts to test the library real time running capabilities, since Go was and is still missing a cross platform library for accessing the webcam.

In the next iteration of the library's development, Pigo has been ported to WASM, so Python and OpenCV wasn't anymore required as third party dependencies, you could just run it straight with Go as a bare minimum dependency. For this you can check the https://github.com/esimov/pigo/tree/master/wasm folder or even better there is a separate repo with a few WASM demos here: https://github.com/esimov/pigo-wasm-demos