You can get unique count by using the "Enrolled and Unique Traffic Monitoring" (which will auto-learn identities as they appear in the camera) and then using the Event APIs as follows to count unique persons

  • GET /events with following aggregation settings to allow the API to aggregate (merge) events for you
    • minSeparation - merge based on time between events
    • spanSources - Boolean - merge on single camera only or across all cameras
    • There are also settings for merging for people who were not learned but this is not applicable when in learning mode
  • GET /heatmap - aggregating personCount (unique persons) and eventCount (appearance) per source over time grouped by sub-time if desired
  • GET /heatmap/<siteid> - Same but for single site (SAFR has notion of source=Camera and Site=Building)



  • About Event aggregation and Person+Face vs. Face only detection
    • If you are using person detection (which requires a bit more CPU) you will generally only have one event per entire time person walks in view of the camera so that using event aggregation is only important if you want to aggregate 
  • About Learning modes
    • For modes like "Enrolled and Unique Traffic Monitoring", where we learn identities from the live video, the image quality of the face must meet certain criteria in order to ensure you are learning sufficient quality faces to subsequently recognize reliably.  This threshold is default at 160 pixel (ear to ear) and center pose quality of .6 (i.e. 10° off center face).  This sort of auto-learning is typically done only on your entrance cameras and its ideal to have camera focused only on the doorway