Author Topic: Facial Recognition in Winbatch?  (Read 281 times)

Hoff

  • Newbie
  • *
  • Posts: 3
Facial Recognition in Winbatch?
« on: July 28, 2018, 10:41:55 am »
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

  • Pundit
  • *****
  • Posts: 922
    • Data & Stuff Inc.
Re: Facial Recognition in Winbatch?
« Reply #1 on: July 28, 2018, 11:30:34 am »
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

  • Newbie
  • *
  • Posts: 3
Re: Facial Recognition in Winbatch?
« Reply #2 on: July 28, 2018, 02:57:38 pm »
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

  • Tech Support
  • *****
  • Posts: 2619
    • WinBatch
Re: Facial Recognition in Winbatch?
« Reply #3 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. 

 
"Success is a lousy teacher. It seduces smart people into thinking they can't lose."
  - Bill Gates


Hoff

  • Newbie
  • *
  • Posts: 3
Re: Facial Recognition in Winbatch?
« Reply #4 on: July 28, 2018, 04:05:49 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

  • Pundit
  • *****
  • Posts: 922
    • Data & Stuff Inc.
Re: Facial Recognition in Winbatch?
« Reply #5 on: July 28, 2018, 05:53:48 pm »
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

  • Tech Support
  • *****
  • Posts: 2619
    • WinBatch
Re: Facial Recognition in Winbatch?
« Reply #6 on: July 29, 2018, 07:59:29 am »
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.
"Success is a lousy teacher. It seduces smart people into thinking they can't lose."
  - Bill Gates