esimov / pigo

Fast face detection, pupil/eyes localization and facial landmark points detection library in pure Go.
MIT License
4.39k stars 310 forks source link

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

Closed sujit-baniya closed 6 months ago

sujit-baniya commented 1 year ago

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

esimov commented 1 year ago

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