Question

I wish to detect an image is face or no. as I know there is many cloud API to work this issue, but I wish I can do this from gem/ plugin or something that running on local (no make API request).

So Anyone who already experiences with this hopefully could share. Thanks for your advance.

Was it helpful?

Solution

I haven't tried the library myself yet but

https://github.com/jeffrafter/ruby-opencv

has a short example code section on face recognition - although I think this is the source used for the RubyGem OpenCV (or at least a fork of the original), neither has been under development for quite a few years.

http://rubygems.org/gems/opencv

gem "opencv", "~> 0.0.7"

if you need more up-to-date features maybe try

https://github.com/amarburg/opencv-ffi

Although you will need to import the modules into your public folders (or whichever folder you are using to import external code from - it varies with Rails version), and then follow the example code.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top