Live data from Hacker News

Face detection jQuery Plugin

facedetection.jaysalvat.com

11–20 of 43 posts

Re: Face detection jQuery Plugin

#11
post #10
post #8

Earlier quoted context omitted.

[deleted]

Well maybe something like 1) upload pic, 2) show full-size pic with crop preview in browser, 3) user confirms dimensions and saves to server.

In my excitement I had a brain fart. That's a great idea.

Re: Face detection jQuery Plugin

#12
Looks like more evidence for Atwood's Law: Any application that can be written in JavaScript, will eventually be written in JavaScript.

I have a couple of questions:

1. How does Liu Liu's algorithm (which I think he calls "deformable parts model") compare with Viola-Jones [1]? Any idea what the error stats (false positives & negatives) are like? In my experience [2] Viola-Jones has very low error rates. Regarding performance, I think it'll be a while before anything can come close to Viola-Jones, but this algo seems good enough.

2. Ok, this might be a stupid question, but I'll ask anyway.

Does this plugin mean that face detection can now be completely done on the client side? I use face detection in my web app [2] for passport photo formatting. I'm wondering if instead of uploading the photo (~2-4MB) to the server and processing it there with OpenCV, I can download the plugin to the browser(~0.5MB?) and get everything done right there.

[1] http://opencv.willowgarage.com/documentation/python/cascade_...

[2] http://freepassportphoto.dyndns.org/

The error rates info is from the webserver's error-log. Its very rare that I see a "No face found" error (false negatives) or get complaints that the formatted photo is all messed up (false positives).

Re: Face detection jQuery Plugin

#13

That is hugely impressive. I just tried it with crowd shots and it worked well. The only issue seemed to be with faces that weren't horizontally aligned. Would love to read more about the process of moving the algorithm over to jQuery.

jQuery is used for: 1. Finding the picture in the DOM. 2. Drawing the rectangles on the faces.

The algorithm in itself is written in a lovely language called JavaScript.

While I appreciate the attention the author brings to liu liu's code, the jquery plugin packaging doesn't add much value.

Re: Face detection jQuery Plugin

#14

That is hugely impressive. I just tried it with crowd shots and it worked well. The only issue seemed to be with faces that weren't horizontally aligned. Would love to read more about the process of moving the algorithm over to jQuery.

jQuery is used for: 1. Finding the picture in the DOM. 2. Drawing the rectangles on the faces. The algorithm in itself is written in a lovely language called JavaScript. While I appreciate the attention the author brings to liu liu's code, the jquery plugin packaging doesn't add much value.

Cheers Karl, I assumed it was doing more. Having said that this does make the algorithm slightly more accessible.

Re: Face detection jQuery Plugin

#15
post #5

This looks like a fork of Liu Liu's javascript library. http://www.readwriteweb.com/hack/2010/11/face-detection-html...

The author credits Liu Liu for the algorithm

It's not just the algorithm, the whole detection code is just cutpasted from liu liu's repository.

https://github.com/liuliu/ccv/blob/stable/js/ccv.js

Re: Face detection jQuery Plugin

#16
post #12

Looks like more evidence for Atwood's Law: Any application that can be written in JavaScript, will eventually be written in JavaScript. I have a couple of questions: 1. How does Liu Liu's algorithm (which I think he calls "deformable parts model") compare with Viola-Jones [1]? Any idea what the error stats (false positives & negatives) are like? In my experience [2] Viola-Jones has very low error rates. Regarding per…

The deformable part based model is pretty much /the/ state-of-the-art object detection model. There is absolutely no way it should be attributed to "Liu Liu". It's creators are Felzenszwalb et al.[1].

The performance of DPMs far surpasses any other basic model such as a Viola Jones syle Haar cascade. Also you should find with DPMs that you are able to detect faces with far higher degrees of deformation - i.e. 3/4 profile faces, rotated faces etc. DPMs are far far more robust than haar cascades but with greater computational expense. Check out the papers at [1].

[1] http://www.cs.brown.edu/~pff/latent/

Re: Face detection jQuery Plugin

#17
Try this in the page:

$('#detect').click(); setTimeout(function() { $('.face').prepend('http://officialpsds.com/images/thumbs/Santa-Hat-psd20202.png width="90px" />'); $('.santaHat').css('position', 'relative'); $('.santaHat').css('top', '-60px');$('.face').css('border-width','0px'); }, 200);

Re: Face detection jQuery Plugin

#18
post #5

This looks like a fork of Liu Liu's javascript library. http://www.readwriteweb.com/hack/2010/11/face-detection-html...

The author credits Liu Liu for the algorithm

I'd like to know how much of the donations he "credits" to Liu Liu. Hate shameless requests for donations on top of very little work without fairly sharing the money!

Re: Face detection jQuery Plugin

#19

Try this in the page: $('#detect').click(); setTimeout(function() { $('.face').prepend(' http://officialpsds.com/images/thumbs/Santa-Hat-psd20202.png width="90px" />'); $('.santaHat').css('position', 'relative'); $('.santaHat').css('top', '-60px');$('.face').css('border-width','0px'); }, 200);

[deleted]
Post reply on HN