I am having difficulty with the triggers setup. Do you have to define a name/watchPattern/threshold/handler for each different category of watchObjects?
What I am trying to accomplish is to trigger an HD recording whenever there is a car detected on the street or a person on the sidewalk. Additionally, I would like to trigger an HD recording and send an alert (likely telegram) whenever there is a car/person detected in my driveway/upper walkway. Could anyone look at my triggers.json logic and advise if there there a more efficient way to do the below? When my StreetSD camera saves a JPG into the "aiinput" folder, in the docker logs, I see the AI go through each of the below "named" triggers (human detector sidewalk, car detector sidewalk, human detector driveway, car detector driveway) before deciding to fire/not fire an alert. The log will say "found at least one object in the photo" then something like "Detected object car is not in the watch objects list [person, bicycle], and down the line. My CPU (i7-4770k with 16GB ram) is spiking hard (with only 1 camera) and I have multiple cameras to migrate over from the camera NVR.
Under triggers I have:
{
"name": "Human detector Sidewalk",
"watchPattern": "/aiinput/Street*.jpg",
"enabled": true,
"threshold": {
"minimum": 40,
"maximum": 100
},
{
"handlers": {
"triggerUris": "IP: PORT/admin?trigger&camera=StreetHD"]
},
"masks": [{ONE mask, AI thinks my neighbors mailbox is a person}]
"watchObjects": ["person", "bicycle"]
"name": "Car detector Street",
"watchPattern": "/aiinput/Street*.jpg",
"enabled": true,
"threshold": {
"minimum": 20,
"maximum": 100
},
{
"handlers": {
"triggerUris": "IP: PORT/admin?trigger&camera=StreetHD"]
},
"masks": [{LOTS of MASKS for neighbors driveways}]
"watchObjects": ["car", "truck", "motorcycle", "bus", "truck"]
"name": "Human detector Driveway",
"watchPattern": "/aiinput/Street*.jpg",
"enabled": true,
"threshold": {
"minimum": 40,
"maximum": 100
},
{
"handlers": {
"triggerUris": "IP: PORT/admin?trigger&camera=StreetHD"]
"telegram": { NOT SETUP YET }
},
"masks": [{LOTS OF MASKS for street and sidwalk}],
"watchObjects": ["person", "bicycle"]
"name": "Car detector Driveway",
"watchPattern": "/aiinput/Street*.jpg",
"enabled": true,
"threshold": {
"minimum": 20,
"maximum": 100
},
{
"handlers": {
"triggerUris": "IP: PORT/admin?trigger&camera=StreetHD"]
"telegram": { NOT SETUP YET }
},
"masks": [{LOTS OF MASKS for street and sidwalk}],
"watchObjects": ["car", "truck", "motorcycle", "bus", "truck"]
View from camera: