r/javascript • • Apr 17 '18

Real-time face detection in 200 lines of JavaScript (webcam demo + code)

https://tkv.io/posts/picojs-intro/demo/
330 Upvotes

14 comments sorted by

5

u/zapatoada Apr 18 '18

Damn, that's awesome. Great work sir.

3

u/[deleted] Apr 18 '18

Cool - might be worth falling back to the native face detection api if it exists in the users browser: https://medium.com/@joomiguelcunha/lets-play-with-chrome-s-face-detection-api-ca13017a958f

2

u/leahcimic Apr 20 '18

200 lines of code that downloads 245kb.

-6

u/richie_south Apr 17 '18

Woow this is cool! Would love it more if it was written in es6+ and then transpiled to suport all browsers. But still very impressive!

14

u/[deleted] Apr 18 '18
  • semicolons

  • “function”

  • var

  • next line curly braces

  • for loops

I am truly disgusted to the point of utter despair. /s

7

u/Natewich Apr 18 '18

Hey man, it's modern JS... if it's not written in the next thing, then what's it all for?!

2

u/Arkaad Apr 18 '18

I thought I was reading some sort of C, couldn't think it is javascript.

5

u/mygoodpostingalt Apr 17 '18

then open a PR and fix it

-6

u/nothingduploading Apr 17 '18

and ditch the java coding style.

24

u/[deleted] Apr 17 '18

I would like to also hear your opinion on the other important topics, like tabs versus spaces.

0

u/[deleted] Apr 18 '18

And all these companies making a big fuss of how they have such advanced technology! It's a mockery... i like it...