nenadmarkus / picojs Goto Github PK
View Code? Open in Web Editor NEWThis project forked from ringcentral/picojs
A face detection library in 200 lines of JavaScript
This project forked from ringcentral/picojs
A face detection library in 200 lines of JavaScript
Hi, I want to use pico to find faces on images of arbitrary width/height. I am hoping there is some sort of general rule I can uses for setting the ldim
parameter based on image width & height. I have read over the explanation doc https://nenadmarkus.com/p/picojs-intro/
The parameter ldim tells us how to move from one row of the image to the next (known as stride in some other libraries, such as OpenCV).
From what I gather from the examples, it is usually set to the ncols
parameter (a.k.a image width). However, I have an example image that is 400x400 pixels. Setting these params:
// where image.width === 400 and image.height === 400
const image = {
pixels: rgba_to_grayscale(image_data, image_data.height, image_data.width),
nrows: image_data.height,
ncols: image_data.width,
ldim: image_data.width
}
This results in zero detections. Setting ldim
to the seemingly arbitrary value of 419
results in one detection (which is the desired result). Setting ldim
to anything higher results in several detections all correspoding to the same face.
All the other parameters have values taken from examples/image.html
ldim: 400
(the image width):
ldim: 419
(the desired result):
ldim: 420
:
ldim: 480
:
Thanks to your awesome library! Is there a documentation how to save a recognized pattern from an image or video?
Does this library support NodeJS? If yes, including simple example in documentation will help a lot.
Hi,
I need whether the user's head is tilted to the left, the right, or is more-or-less balanced. I'm using a simple algorithm that checks the angle between the a line that connects between the eyes to the x-axis (thinking in 2d only - I'm not looking for the 3d head-pose).
I noticed that the face detection is not so good when the face is tilted. I need to support a tilt of up to ~45 degrees. Do you have any suggestion for how to support that? Maybe I could run the the algorithm multiple times, on several rotation angles of the image?
I hope there is a simple solution because this library is very light and I don't want to switch to the heavier face-api.
Hello, this is fantastic, can you provide some contact information here please or on your website? I couldn't find any anywhere. I'd like to discuss a contract work opportunity for our company for mouth movement (speaking) detection.
how to change the circle to square and take the photo by its coordinate?
Hello.
Your example https://tehnokv.com/posts/puploc-with-trees/demo/ print error:
[Error] Failed to load resource: https://f002.backblazeb2.com/file/tehnokv-www/posts/puploc-with-trees/demo/puploc.bin
Have you this file in another place? Can you write new place of this file?
Thank you for sharing you work, pigo extended the work on pico adding few more landmarks,
esimov/pigo@29b2527
Would be nice to see more landmarks
I replaced the image in the example with an image of myself and my face was not detected. The program did not draw a circle around my face on the screen.
Is the program able to have data about faces and let you know about the confidence level of a matching face?
What available events can I listen for?
Am hoping for something like "ondetect"; would like to do some work the instant a face is detected.
uncaught rangeerror webassembly.memory() could not allocate memory at wasm pico.js, how to solve it
Hey I have a question if I want to do hand detection using is it possible to do it?
How is it used?Some files will report an error when running on my laptop
当我带着一个有边框的眼镜时,精确度明显下降啦
Hi,
Thanks for this utility, but your expaination is a hight level one, at the end we don't know where or wh to use it for, can you provide some sample simple examples ?
Thanks.
I compile the webassebly's version of pico, but in practice, it can't detect the face when the in the left of video , while in the right video , it cat detect the face . why ?
Hi, I want to use pico to find faces on images of arbitrary width/height. I am hoping there is some sort of general rule I can uses for setting the ldim
parameter based on image width & height. I have read over the explanation doc https://nenadmarkus.com/p/picojs-intro/
The parameter ldim tells us how to move from one row of the image to the next (known as stride in some other libraries, such as OpenCV).
From what I gather from the examples, it is usually set to the ncols
parameter (a.k.a image width). However, I have an example image that is 400x400 pixels. Setting these params:
// where image.width === 400 and image.height === 400
const image = {
pixels: rgba_to_grayscale(image_data, image_data.height, image_data.width),
nrows: image_data.height,
ncols: image_data.width,
ldim: image_data.width
}
This results in zero detections. Setting ldim
to the seemingly arbitrary value of 419
results in one detection (which is the desired result). Setting ldim
to anything higher results in several detections all correspoding to the same face.
All the other parameters have values taken from examples/image.html
ldim: 400
(the image width):
ldim: 419
(the desired result):
ldim: 420
:
ldim: 480
:
Does this pico already react-native support ?
this is cool but it does not work in low light condition... and it requires 15mp + camera....
Come on! , you can do it 🍻
Hi, the url that contain "puploc.bin" not response for initialize the library.
"https://drone.nenadmarkus.com/data/blog-stuff/puploc.bin"
Thanks for your attention
Hello,
Could you please guide me how to train custom datasets, if possible can you give me architecture and its code to understand and then train with custom datasets. (I red your paper and details, yo said it uses ensemble decision tree to achieve this, could you give some code or overview on this).
Are you using face-detection techniques or face landmark/key-points technique here?.
Please let me know does this library gives headpose values?
TypeError: picojs__WEBPACK_IMPORTED_MODULE_2___default(...).FaceDetector is not a constructor
Great project and good to see you already had a wasm version in C.
I also write a Rust wasm version and here is the code: picojs-rust-wasm
Maybe we can do more comparative experiment to find the performance difference between each version :)
How can I stop tracking if the same face is in the frame and start tracking again when new face come in the frame?
https://github.com/tehnokv/picojs/blob/master/lploc.js#L110-L111
Classic "javascript gotcha". The default sort compares the string values, not number values.
[1, 10, 2].sort()
will result in [1,10,2]
.
I'm almost sure this was not the purpose...
Please use sort((a,b) => a-b)
Thank you for creating and maintaining this project! 🙏
I would like to install and use the library via npm. I would appreciate to see this solution distributed as a downloadable package, so it could get the attention it deserves.
How can I stop tracking if the same face is in the frame and start tracking again when new face come in the frame?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.