Analytics API and AI Assistants
Everything on the Analytics page is available to your own software through Agent DVR's API: counts by line and zone for any period, who is in view now, counters, speeds, heatmaps, alerts and the dashboards themselves. See the analytics commands in the API documentation. The commands need an administrator login.
If you have connected an AI assistant to Agent DVR, it can read your analytics too. Ask it things like "how many people came through the front door yesterday?", "when was the shop busiest this week?" or "has the queue alert gone off today?". The assistant has tools for counts (get_analytics_counts), who is in view now (get_analytics_live), time spent in zones (get_analytics_time_in_zone), measured speeds (get_analytics_speeds) and alerts (get_analytics_alerts), and a ready-made counting_report prompt.
An assistant that is allowed to configure Agent DVR can also set counting up for you from the lines and zones you have drawn: "keep a count of how many people are in the shop, the limit is 30" adds an occupancy counter, and "tell me when the queue at the till is more than 5 for a minute" or "alert me if anyone is by the gate for two minutes after 10pm" adds an alert. "Measure how fast cars go down the drive, the two lines are 12 metres apart" adds a speed measurement, and you can ask it to change or delete a counter, a speed measurement or an alert by name: "make the queue alert 8 instead of 5", "switch the gate alert off for now", "the side door line counts the wrong way round". It tells you what it made, changed or removed, and you will find it on the Counters or Alerts tab. It cannot draw lines or zones: do that first under Cameras.
Troubleshooting
- There is no Analytics entry in the menu: Analytics needs a current version of Agent DVR and an administrator login. It can also be switched off for everyone: see Analytics under Sections in Server Menu - Settings - User Interface.
- The Analytics page shows "Upgrade to unlock": The license on this server does not include Analytics. It comes with the Standard and Professional plans.
- Nothing is being counted: Check the camera is on and Analytics enabled is switched on, that analytics is Enabled on the Settings tab, and that the detection model has finished downloading. Turn on Overlay and watch the live video: objects being tracked have a box and a number.
- Objects are missed or counted twice: Raise the Detection rate, adjust Confidence, and move lines to where objects are fully in view and well separated. People who hide behind each other cannot be told apart from a low camera.
- Inward and Outward are the wrong way round: Draw the line in the other direction. The arrow points Inward.
- An occupancy count drifts through the day: Set a Reset time when the place is empty, and correct it with Set count when needed.
- CPU use is high: Switch on Use GPU, lower the Detection rate, and enable analytics only on the cameras you need.