Dog / Cat / Human Detector

Google Inc
Supported Device
Vision Kit

The Dog / Cat / Human model can identify whether there’s a dog, cat, or person in an image and draw a box around the identified objects. It’s based on the MobileNet model, a general-purpose object detection model.

Already included in the SD card image


Demo: Human, cat, or dog?

Time: 15 minutes

It’s pretty easy for people to spot a person, cat or dog, but it can be pretty tricky for a computer to do it just as well. This demo uses an image recognition model to take an image and guess whether there’s a person, cat or dog on it.

What you’ll need

  • Assembled Vision Kit
  • Connection to your device
Step 1: Get connected

First, make sure you’re connected to your device and have a terminal open. Otherwise you can’t tell your kit to start identifying Human, cat, or dog.

Step 2: Stop your current demo

Your Vision Kit may already have another demo running, like the Smile Detector which runs by default when your kit is turned on. You’ll need to turn off any demos that are currently running. To do that, press Control-C.

Step 3: Find an image

Before you can try out the demo, you need an image that the model can look at. Learn how you can use an online image.

Step 4: Run command

Enter the following command into your terminal application:

~/AIY-projects-python/src/examples/vision/ --input <input image>

If you ran into an error, check Help.

The model will take the input image and try to detect what’s in it and print its answer on your terminal screen. Try a couple different kinds of images with people, cats or dogs. Here’s some more ideas:

  • What happens when you upload an image with a different kind of animal?
  • Try images with weird angles or poor lighting. Can it still identify a person, dog or cat?
Cleanup time

When you’re done with the demo, remember to stop it before trying another demo by pressing Control-C.

Finding an image to use with your model

You can find an image online using the Wget program. When you have an image in mind, here’s how to use it:

  1. Make sure you’re connected to your kit via SSH or through peripherals and have a terminal window open
  2. Make sure you also have the image’s URL available
  3. In your terminal, enter: wget
    • For example: wget
    • The file will be downloaded to the current directory