-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Face detection #19
Comments
Yes, something like www.imgix.com and www.cloudinary.com support would be fantastic. |
And interestingly I don't think it would take TOO much to implement, but I'm not sure it makes sense to build face detection into Glide itself. This is better served as a separate package. I sort of keep hoping that a package will pop up...there is already a number of them in Javascript. (ie. http://facedetection.jaysalvat.com/). If I were to make this package I would build it in such as way that it simply returned the coordinates of the faces, and didn't actually do the cropping itself. This would allow it to be used with any sort of image manipulation library...like Glide. |
This was also discussed in Intervention/image: Intervention/image#75 |
Yeah, someone who knows a thing or two about face detection needs to take the bull by the horns and make a good PHP library for this. I bet it would get used a LOT. |
We maybe need to convince @jaysalvat with beer to create a PHP version of his JavaScript library. :) |
The problem is performance, or more specifically that certain tasks need to be written in C, delegated to other libraries - like image magic - or parallelized. All these things are annoying, and tbh solved better by other libraries/tools like thumbor. |
Very fair point @josegonzalez, but if this can be done with JavaScript, surely it can also be done in PHP, no? |
Javascript gets web workers, which happen off the ui thread, can be parallelized and thus happen much faster than in PHP :( |
Hello all! There are some PHP face detection projects. But beers are welcomed anyway :) |
thumbor's focal-point detection algorithm for facials and features is implemented through OpenCV (http://opencv.org). They also implement what they call "Lazy Detection" which is nothing more then a image processing queue based on redis. |
Closing this issue for now. I love the idea of face detection in Glide, but it's too big of a feature for me to handle at this point. Further, I think it's probably better better handled by a lower level library, as @josegonzalez suggested. |
For Javascript, there is: https://github.com/jwagner/smartcrop.js |
Awesome @barryvdh, I hadn't seen this one before. Thanks for sharing. |
It would be awesome to add face detection to the
crop
function. This might be a bit of a pipe dream. There is this PHP package. Also, could be good to look at this JavaScript project.Function would work like this:
The text was updated successfully, but these errors were encountered: