muesli / smartcrop

smartcrop finds good image crops for arbitrary crop sizes
MIT License
1.82k stars 114 forks source link

The state of restoring face detection? #34

Closed svkoskin closed 6 years ago

svkoskin commented 6 years ago

Hello,

I have been trying to use smartcrop for my use case (usually, making landscape thumbnails of portrait images of people), and in my completely unscientific investigations, it seems that the current smartcrop implementation picks any body part with no particular preference for face. That interpretation is supported by the fact that face detection has been dropped last year.

Here are the smart crops of images on https://github.com/muesli/smartcrop/issues/33 - the issue is very similar to mine.

38201198-f24a8300-36c9-11e8-8448-bda0f1b35686 38201199-f2952b1c-36c9-11e8-87e6-d898f944d060

I understand that having native dependencies makes building more complicated and confusing, and therefore, it is good to have a pure Go package. OpenCV 3 seems to make things even more complicated.

So, I remember seeing some comments about restoring OpenCV-based face detection as a separate optional package. What is the status of that effort? Would it be possible to somehow help with it?

Also, I wonder if using https://github.com/hybridgroup/gocv would make integration with OpenCV 3 easier, since https://github.com/go-opencv/go-opencv seems to have some struggles with supporting OpenCV 3.

muesli commented 6 years ago

I'm still very open to supporting that again, but as a separate analyzer than can be optionally loaded, so whoever doesn't need it gets away without a cgo dependency.

muesli commented 6 years ago

As such, I think we can continue discussing this in your PR #35 (preferably) and #23 (if needed).