On the SitePoint PHP blog there's a tutorial posted from editor Bruno Skvorc where he attempts to replicate the "What-Dog" application recently created by Microsoft in under 100 lines of code. It makes use of the Diffbot service to do the actual detection and evaluation.
Rather recently, Microsoft released an app using AI to detect a dog’s breed. [...] In my non-SitePoint time, I also work for Diffbot – the startup you may have heard of over the past few weeks – who also dabble in AI. To test how they compare, in this tutorial we’ll recreate Microsoft’s application using Diffbot’s technology to see if it does a better job at recognizing the adorable beasts we throw at it!
He walks you through the installation and configuration of the software you'll need (and account you'll need to create). From there he shares the code to take in the user's upload, send it as a
POST request over to the Diffbot service and returning the relevant results. He finishes out the article with a comparison of the two services, posting various images and seeing which comes closer.