News for hackers. Stuff that matters.
Re:Face recognition in images and video with Python by symisc_devel on Monday June 18, 2018 @12:02PM (#17339291)
We released a C/C++ computer vision library (Python binding to follow) earlier this month which let you perform face recognition at Real-time from IoT or Raspberry PI devices. The library is dependency free, cross platform and should compile fine on most modern architectures with a C compiler.

https://github.com/symisc/sod

Re:Face recognition in images and video with Python by Djvacto on Monday June 18, 2018 @01:13PM (#17339882)
Speaking as someone with limited and theoretical knowledge of computer vision, does CV usually overlap with Optical Character Recognition (OCR)?

I read through the readme and don't recall any references to identifying text, so I was wondering if and where a separation between OCR and CV might exist in the development process?

Re:Face recognition in images and video with Python by symisc_devel on Monday June 18, 2018 @02:46PM (#17340642)
Yes, CV is always the first pass before character extraction. It envolve a lot of image processing routines including morphological operation like dilation, noise removal, etc. and finally blob detection[1]. All of the preprocessing routines are implemented in SOD.

[1]: https://sod.pixlab.io/c_api/sod_image_find_blobs.html

Re:Face recognition in images and video with Python by tjoff on Monday June 18, 2018 @12:27PM (#17339503)
A bit unrelated but I'm in a need for some sort of cat deterrent that will spray water at all cats except mine. Also it would be nice if humans were exempted as well.

I haven't done the legwork myself yet, but would this be an appropriate project to check out for this? (As for identifying my cat I've been thinking about alternative solutions such as rfid necklace or something but it is quickly getting past 'quick hack').

Re:Face recognition in images and video with Python by scardine on Monday June 18, 2018 @05:16PM (#17341766)
Check out the talk "Militarizing Your Backyard with Python: Computer Vision and the Squirrel Hordes"[1] from PyCon 2012. He wired a water canon to a camera able to tell squirrels from birds:

> Has your garden been ravaged by the marauding squirrel hordes? Has your bird feeder been pillaged? Tired of shaking your fist at the neighbor children? Learn how to use Python to tap into computer vision libraries and build an automated sentry water cannon capable of soaking intruders.

Previous discussion here: https://news.ycombinator.com/item?id=3710107

[1] http://pyvideo.org/pycon-us-2012/militarizing-your-backyard-...

Re:Face recognition in images and video with Python by rhplus on Monday June 18, 2018 @01:07PM (#17339833)
A Bluetooth LE device similar to Tile[1] might be a cheap and reliable signal source in a package small enough to attach to a collar. If you had two Bluetooth receivers on either side of your camera's visual field, you could compare signal strengths during motion and positively identify your cat (assuming feline motion detection is a solved problem).

[1] https://www.thetileapp.com/

Re:Face recognition in images and video with Python by zmmmmm on Monday June 18, 2018 @08:00PM (#17342663)
It might be easier to cheat and put a bluetooth or similar beacon onto your cat to suppress the water spray than try and distinguish your cat from others?
Re:Face recognition in images and video with Python by tjoff on Tuesday June 19, 2018 @03:32AM (#17344476)
One of the goals is to create a safe place for my cat, on the porch or something. And still be able to fend off neighbor cats. She is getting old and has had fights on the porch which makes her scared to go out.

So I guess it depends on how easy it would be to limit the scope/direct the receiver to only activate when she is on the stairs which is probably the optimal target range for the porch (and not activate when she is lying just beside the receiver).

Thanks so much everyone for the answers! Can't believe I forgot about the squirrel presentation. My cat is all black and I'm not sure how I'd go about distinguishing it. A really colorful necklace perhaps, but it would have to be quite ungraceful to not be covered in fur when watched from the front/back (a second camera 90 degrees from the first could perhaps help).

In the QA in the squirrel presentation someone also mentioned OpenTLD, which seems to be superseded by CMT ( https://www.gnebehay.com/cmt/ ). Worth a look.

I hope I can find the time to experiment on this.

Re:Face recognition in images and video with Python by Tiki on Monday June 18, 2018 @01:45PM (#17340136)
I don't think you'll find a 'quick hack' but what you're asking is definitely possible as a project.

Check this video out for ideas(guy used ML/servo controlled squirt gun to get rid of squirrels from his bird house) https://www.youtube.com/watch?v=QPgqfnKG_T4

Re:Face recognition in images and video with Python by ourcat on Monday June 18, 2018 @05:13PM (#17341745)
This older article from the same author might help you : 'Detecting cats in images with OpenCV' - https://www.pyimagesearch.com/2016/06/20/detecting-cats-in-i...
Re:Face recognition in images and video with Python by manifestsilence on Monday June 18, 2018 @12:31PM (#17339544)
This would be amazing. Please do a DIY blog if you figure this out. :)
Re:Face recognition in images and video with Python by subcosmos on Monday June 18, 2018 @04:18PM (#17341356)
I find it amazing that we live in a world where such profound tech is purposed for such tasks as this :)
Re:Face recognition in images and video with Python by leblancfg on Monday June 18, 2018 @11:48AM (#17339126)
I automated half of my first desk job by writing this Python CLI tool, which wraps the OpenCV `detectFace` method:

https://github.com/leblancfg/autocrop

Pyimagesearch is a great repository of everything OpenCV related, great to see them on the front page.

Re:Face recognition in images and video with Python by ebrewste on Monday June 18, 2018 @12:10PM (#17339345)
Pyimagesearch is great. I'm just a tinkerer / hobbyist in the computer vision space, but this is a site I come to time and again to get up to speed on topics that just seem harder elsewhere.
Re:Face recognition in images and video with Python by andyidsinga on Monday June 18, 2018 @12:35PM (#17339569)
true that - a lot of very practical examples and posts on this site ..and python makes them a joy to play with!

edit: fwiw - I've been playing with motion detection / background subtraction https://www.pyimagesearch.com/2015/05/25/basic-motion-detect...

Re:Face recognition in images and video with Python by JulianWasTaken on Monday June 18, 2018 @10:41AM (#17338584)
Nice.

I did something simple here awhile back with a CFFI wrapper for OpenCV.

http://tech.magnetic.com/2015/11/real-time-facial-recognitio...

Re:Face recognition in images and video with Python by vstuart on Monday June 18, 2018 @11:02AM (#17338737)
Re:Face recognition in images and video with Python by drhoffma on Monday June 18, 2018 @11:21AM (#17338868)
But Jurassic Park theme!
Re:Face recognition in images and video with Python by wcrichton on Monday June 18, 2018 @01:51PM (#17340187)
If your use case is archival (running this on many videos stored on disk) as opposed to realtime (running on a live video feed), we built a research tool called Scanner [1] for maximum performance in offline video analytics, e.g. see our face detection example [2].

[1] https://github.com/scanner-research/scanner

[2] https://scanner-research.github.io/scannertools/#face-detect...

Re:Face recognition in images and video with Python by kruhft on Monday June 18, 2018 @11:21AM (#17338873)
Can it track eye movements? A cheap eye tracker would be awesome so all the window's i'm looking at are in focus.
Re:Face recognition in images and video with Python by zionsrogue on Monday June 18, 2018 @11:23AM (#17338890)
This method is just for face recognition. If you're interested in tracking eye movements take a look at face detection + facial landmarks:

https://www.pyimagesearch.com/2017/04/03/facial-landmarks-dl...

And then techniques to localize the center of the eye:

http://thume.ca/projects/2012/11/04/simple-accurate-eye-cent...

Re:Face recognition in images and video with Python by taeric on Monday June 18, 2018 @12:31PM (#17339547)
Sounds like a great idea. I would be a little worried about how often I actually am not looking at the window I am typing in. Though, I suspect there are obvious patterns.
Re:Face recognition in images and video with Python by kruhft on Tuesday June 19, 2018 @02:14PM (#17349028)
I think it would be easy to train for novices.
Re:Face recognition in images and video with Python by taeric on Wednesday June 20, 2018 @11:22AM (#17356238)
I think that is what worries me. For most purposes, this is fine. I do, however, sometimes have a transcription use case. This is fairly uncommon, but I worry that I would get bitten by it being taken away.

That make sense? I still think this is worth trying.

Re:Face recognition in images and video with Python by nickserv on Monday June 18, 2018 @05:00PM (#17341660)
Great article. I'm working on a project to identify buildings, and it seems this technique would apply. Does anyone know of a good buildings dataset, or a pretrained network? 3 million images is no easy task to find... Thanks!
Re:Face recognition in images and video with Python by kevinali1 on Monday June 18, 2018 @09:37PM (#17343117)
Aerial images?
Re:Face recognition in images and video with Python by nickserv on Tuesday June 19, 2018 @03:12AM (#17344402)
Sorry, forgot to mention this would be for street level recognition. I don't think aerial views would work for that application, perspective issues notably.
Re:Face recognition in images and video with Python by turowicz on Monday June 18, 2018 @02:37PM (#17340561)
The article is very similar to readme.md and samples from the github repo of face_recognition.