Dogs are men’s best friend. Very attentive and with an incredible capability to attune to the emotional state of their owners, dogs are also a good company for children and provide security. How to learn the different breeds? Carrying around a dog encyclopedia or constantly browsing the internet on your smartphone? There is a smarter and funnier way to learn it by using the benefits of artificial intelligence technologies, namely deep learning methods; SOFTECH proposes an app designed to recognize dog breeds called Sniff! – inspired from the dogs habit of investigating its surroundings by sniffing around.

Sniff! was first unveiled at MWC 2018 in order to showcase different applications of AI and the use of deep neural networks. It is an educational app intended for kids and people of all ages willing to learn about existing dog breeds.

Main features:

Sniff! Allows the user to take the picture of the dog in your proximity or to import the picture from the camera gallery. An algorithm that learned to recognize dog breeds from thousands of dog images analyzes the picture. In a few seconds, the app delivers the most probable results: one or more potential dog breeds that match the dog in the photo. For each dog breed, Sniff! displays relevant information: height, most commonly met coloration of the breed, life span, general characteristics and behavioral aspects.  In addition, Sniff! AI app is available in both online and offline mode.

The project’s technical stuff on server and client side:

Server side:

It is written in Go and it runs in a dedicated docker image.

The deep neural net heavy lifting is done by TensorFlow for Go

Client side:

ReactNative app communicates through a REST API with the server

In order to reduce network traffic, the image pre-processing is done on the client

A small dog database was prepared using information from: dogtime and a-z animals web pages: http://dogtime.com/ and https://a-z-animals.com/

 

The AI computer vision technical stuff:

Deep neural nets training, evaluation, deployment:

We used the TensorFlow library from Google to train and evaluate several Conv-Net architectures

  • For the server side (online version) we evaluated several deep neural net architectures: ResNet-50, Inception v3, Inception-ResNet v2 and used the later;
  • For the client side (offline version) we evaluated two efficient Conv-Net architectures, specifically designed for low resource, and embedded vision applications by Google: MobileNet v1 and NASNet-mobile – we choose the later for its higher accuracy on our dataset;

 

Online mode – server side:

We used one of the best conv-net architectures from 2017, Google’s pretrained Inception-ResNet v2 (a very deep >100 layers neural network )

By using transfer learning we fine-tuned the network to classify 120 dog breeds using Stanford Dogs Dataset (this dataset contains images of 120 breeds of dogs from around the world)

Our best performing model of 92.3% accuracy was selected for the server side

 

Offline mode – client side:

For the client side we used a NASNet-mobile architecture, designed by Google’s AutoML (a machine learning algorithm built to explore/design neural network architectures). It’s accuracy is better then of VGG16, the ImageNet winner model from 2014, but with 27x less computation and 26x smaller size

Our best model with 84% accuracy was used for the offline mode

Further developments

Based on Sniff! AI application model, we can decline several types of useful applications for other domains too. Should you have specific needs or imagine a similar solution for education programs, for research, for agriculture, biology or other related fields, feel free to write us on contact@softech.ro