esimov / pigo

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

encountered some problems when i try write a demo by myself #48

Closed Taoja closed 2 years ago

Taoja commented 3 years ago

my demo is : https://github.com/Taoja/web-wasm-faceDetector

there have two problems:

esimov commented 3 years ago

Did you have a chance to look into https://github.com/esimov/pigo/tree/master/wasm or https://github.com/esimov/pigo-wasm-demos. There are a lot of examples how you can use Pigo on Webassembly. Regarding the aforementioned project of yours, I've tried to run the demo, but I have encountered a few errors.

Now about your question of using the rgbaToGrayscale method, there is no need to define a custom grayscale method, since Pigo automatically converts the image to grayscale mode prior detection.

Taoja commented 3 years ago

Did you have a chance to look into https://github.com/esimov/pigo/tree/master/wasm or https://github.com/esimov/pigo-wasm-demos. There are a lot of examples how you can use Pigo on Webassembly. Regarding the aforementioned project of yours, I've tried to run the demo, but I have encountered a few errors.

Now about your question of using the rgbaToGrayscale method, there is no need to define a custom grayscale method, since Pigo automatically converts the image to grayscale mode prior detection.

thx for your reply, i saw the demo what your suggest before i write my demo. but your demo is hardly to learn the pigo(plase forgive me for talking your demo)because js methods and pigo api are mixed together. so it is why i try to use html script to do js methods and use wasm to achieve pigo api。 i m a noob about makefile, so sry about u cannot run the demo。

esimov commented 3 years ago

Sorry, but this is working for you? Because for me is not working. I'm receiving too much errors. Could you give me a working copy and I can look into it.

Taoja commented 3 years ago

Sorry, but this is working for you? Because for me is not working. I'm receiving too much errors. Could you give me a working copy and I can look into it.

now my demo is easy to use

GOOS=js GOARCH=wasm go build -o ./pkg/lib.wasm main.go

and open the html in pkg dir

esimov commented 2 years ago

Closing this issue since it's not related to the Pigo API.