I wanted to make my BlueIris and Smartthings integration smarter. God knows regular camera motion detection is mostly useless. So I used a combination of artificial intelligence tools to:
- Detect familiar cars in my driveway (coming and going)
- Detect unknown cars (make, model, color, sometimes license plate)
- Detect ONLY people at my front door (not just motion)
To do that, I used several tools:
- BlueIris is an IP camera software for Windows, this is what I use to gather alert images and to execute my python scripts
- Cloud Based Google AutoML Image Classification (basically free to use for personal use since the usage is quite low)
- Sighthound’s Vehicle Detection API (5,000 calls a month, also basically free for my personal use)
- WebCoRE for creating voice alerts on my Sonos (alternatively cast-web for Google Home devices) or other various alerts
- Pushbullet for getting image notifications pushed to my phone, and my desktop at work.
I am not a coder at all, I’ve just hacked things together until they worked.
Using Google’s AutoML Image Classification is incredibly easy.
I just used a couple months of images, dragging and dropping them into named folders, let’s say:
“Bob’s Car Arriving”
“Alice’s Car Arriving”
“Bob’s Car Leaving”
“Alice’s Car Leaving”
zip them up, upload to Google, and press Train. That easy. I’ve just created a Machine Learned AI to analyse future images. Since BlueIris roughly takes the same image of my car coming into the driveway, and a different one for pulling out of the garage, I can use that for coming and going. I do NOT use that to disarm my security however, I have a Samsung presence sensor hardwired into my car, but theoretically you could if you were confident enough.
I had done the same training with people at my front door and it has an over 90% confidence with only 50 images. Sighthound’s API has people detection but is not that good when your IP Camera cuts off people for example.
Attached is a GitHub repository where I have uploaded my Python scripts.
My house can now confidently announce out loud when the Mailman pulls up in our driveway, when there is an unknown car (and through a WebCoRE argument, it will announce for example: “There is a grey toyota prius in your driveway”) , or when I come home, and there are other people in my house to hear it.
Additionally I can have dogs bark on my Sonos when a real person is detected at the front door, only when the house is armed.
The possibilities are endless!
Check it out here, I’d love to see someone else help build on this.