Yes, I’m using a camera. I’m using a Raspberry Pi with camera module specifically. Most RSTP compatible cameras can feed a stream out to Amazon Kinesis Video Streams. The application is not in any way dependent on the size of the creature or motion for that matter. The Raspberry Pi is sending a video stream to Kinesis Video Streams. The Kinesis Stream is fed into Rekognition, where the object detection is done. Rekognition is constantly analysing the video stream for objects, when the objects I’m interested in appear, I trigger an action. In this case, a Dog on my Lawn.
This is a brief blog post on Amazon Rekognition. It explains how object detection works.
Here’s a little technical detail on getting a video stream from a Raspberry Pi into Amazon Kinesis Streams for analysis by Rekognition.
https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/producersdk-cpp-rpi.html
https://docs.aws.amazon.com/rekognition/latest/dg/streaming-video.html
https://docs.aws.amazon.com/rekognition/latest/dg/labels.html
So for an example of what Rekognition will give you as a response… I ran detect-labels against the image linked here…
http://unisci24.com/data_images/wlls/20/241000-german-shepherd.jpg
In the output below, you can see that detect-labels provides you with a number of details about the object you are detecting with varying levels of confidence. The Class, Species, and Breed (among other things) of the animal are all detailed. There’s even a 55.7% chance that this dog might be a Police Dog. You can imagine that if there’s a particularly pesky rottweiler lighting up your lawn regularly, you can tune it to only trigger if both dog is detected that is a rottweiler. Let me know if this explains it for you.
{
"Labels": [
{
"Name": "Mammal",
"Confidence": 99.40145874023438,
"Instances": [],
"Parents": [
{
"Name": "Animal"
}
]
},
{
"Name": "Canine",
"Confidence": 99.40145874023438,
"Instances": [],
"Parents": [
{
"Name": "Mammal"
},
{
"Name": "Animal"
}
]
},
{
"Name": "Pet",
"Confidence": 99.40145874023438,
"Instances": [],
"Parents": [
{
"Name": "Animal"
}
]
},
{
"Name": "German Shepherd",
"Confidence": 99.40145874023438,
"Instances": [],
"Parents": [
{
"Name": "Pet"
},
{
"Name": "Animal"
},
{
"Name": "Mammal"
},
{
"Name": "Canine"
},
{
"Name": "Dog"
}
]
},
{
"Name": "Animal",
"Confidence": 99.40145874023438,
"Instances": [],
"Parents": []
},
{
"Name": "Dog",
"Confidence": 99.40145874023438,
"Instances": [
{
"BoundingBox": {
"Width": 0.8466859459877014,
"Height": 0.9463058710098267,
"Left": 0.07047327607870102,
"Top": 0.020711854100227356
},
"Confidence": 96.1170425415039
}
],
"Parents": [
{
"Name": "Animal"
},
{
"Name": "Mammal"
},
{
"Name": "Canine"
},
{
"Name": "Pet"
}
]
},
{
"Name": "Police Dog",
"Confidence": 55.79732894897461,
"Instances": [],
"Parents": [
{
"Name": "Pet"
},
{
"Name": "Animal"
},
{
"Name": "Mammal"
},
{
"Name": "Canine"
},
{
"Name": "Dog"
}
]
}
],
"LabelModelVersion": "2.0"
}