Facial Recognition in Winbatch?

Started by Hoff, July 28, 2018, 10:41:55 AM

Previous topic - Next topic

Hoff

So I've completed some cool winbatching to download a whole bunch of full quality pictures from my kids' sleepaway camp website.  (The initial page has a bunch of thumbnails of my selected favorites, I parse the webpage, convert the URL's from the thumbnail to the full quality URL's, and download them to a user specified directory).  That's all fun and a great time saver.  However, in order to do that, I've had to go through thousands of pictures just to identify the ones with my kids in it and mark them as favorites.  I was thinking - with all of winbatch's functionality (image manipulation, etc), it would be very cool if it offered functions that did facial recognition.  A function that takes in an array of images as the 'control', and then an image to return a yes or no answer (or maybe even better to return a number to represent a confidence level %). 

Given that there are facial recognition api's in other languages (java, etc.), I think this probably technically feasible.  Admittedly, I could have winbatch shell out and call another language to do that work, but what's the fun in that?  (And also, I'd have to assume the target machine has the jvm or python interpreter installed, etc.).  It would be great if I could do the entire thing in winbatch.. 

I did see something about ImgCompare in the Pixie Extender, but I'm not sure what its capabilities are - it just lists:
'Compares two images for similarity in spatial layout and color.'

BTW, if the recognition code was in a windows based language - C#/.Net, would that make it easier to integrate with winbatch?

Thoughts?  Hostile reactions?

JTaylor

If you had C# code that does what you want there is a reasonable chance you could use that with a little tweaking.   I assume you know WinBatch can run C# code now?

Jim

Hoff

Yes, my googling revealed that.  However, I assume that also means that the target machine must have certain libraries available/installed.  That's why i was hoping for a winbatch only solution that could produce a standalone .EXE that just works.

td

I have no first-hand experience performing facial recognition using Web services let alone using  WinBatch to do same so take the following for what it is worth (not much.)

I think, commonly, facial recognition is provided as a Web service.  The service engine can be trained and then used to perform recognition.  Of course, this usually involves some kind of fee paid to some entity.   One common method of data exchange with Web services is json objects.  WinBatch has several systems that can be used to communicate with a web service using json objects. 

 
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

Hoff

Quote from: td on July 28, 2018, 03:25:43 PM
I have no first-hand experience performing facial recognition using Web services let alone using  WinBatch to do same so take the following for what it is worth (not much.)

I think, commonly, facial recognition is provided as a Web service.  The service engine can be trained and then used to perform recognition.  Of course, this usually involves some kind of fee paid to some entity.   One common method of data exchange with Web services is json objects.  WinBatch has several systems that can be used to communicate with a web service using json objects. 



That is certainly an interesting approach - I guess I'd have to see how much it would cost.  (And weigh that against the 'cost' of looking at the pictures myself as I do now...).  There are definitely apis for languages like python and there are portal versions of python (though it's still a large download) that I could bundle in the winbatch package.  At this point this is more of an intellectual exercise.    Thanks for taking the time to think about it!

There are some that are free with max limits per day, certainly worth experimenting with ( https://www.betafaceapi.com/wpa/index.php/pricing )

JTaylor

Betaface looks interesting.   Unless I have missed something it looks like a service for which you could easily build a WinBatch front-end.   Would be interested in hearing how it goes.

Jim

td

I know (or maybe I just think I know) that there are image recognition libraries built on Google's open source TensoFlow API.  While TensoFlow has been ported to Windows and C/C++, I am not so sure about any image recognition libraries.   I believe there are open source Python APIs available for TensoFlow based image recognition. Which more or less makes sense as Python seems to have become the programming language du jour.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade