1 SAFR Watchlist Email Alerting

This solution guide describes how to use SAFR to create an email alert when a known person appears at an entrance monitored by a video camera.

This guide is written for Windows users. Linux users can achieve the same functionality, but they need to use the Web Console and SAFR Actions CLI instead of the Desktop Client & SAFR Actions GUI.

For simplicity's sake, this guide assumes that you're using a SAFR Cloud License. If you're using a SAFR On-Premises License, you'll also need to install and manage the SAFR Server.

1.1 Required Hardware and Software

1.1.1 Required Hardware

  • At least one camera for every entrance you want to monitor. See the Camera Selection and Positioning section below for information about camera requirements.
  • Approximately one PC computer for every 8 cameras that you use. See SAFR System Requirements for recommended computer specifications.

1.1.2 Required Software

SAFR Actions is installed with SAFR Desktop or SAFR Server. Only run SAFR Actions on a single PC or actions will be duplicated.

1.2 Install SAFR Desktop Client and SAFR Actions

Download and install the SAFR Desktop for Windows from the SAFR Download Portal . The SAFR Desktop installer includes both the SAFR Desktop Client and SAFR Actions.

If you have many cameras, you may need to install multiple Desktop Clients on different machines.

1.3 Camera Selection and Positioning

Because the goal of this scenario is to detect when a known threat attempts to enter the facility, every entrance to the facility should have at least one camera pointed at it. When identifying Camera placement should follow these guidelines:

  • Cameras should be about 9-12 feet off the ground to maintain a low vertical angle.
    • If cameras must be mounted on a high ceiling, use a camera with higher zoom located further from the entry.
  • Cameras should be positioned so that subjects who approach entrances will face the camera nearly straight on.
  • Cameras selection for at least 50 pixels wide face. 80+ pixels produce even better results.
    • Camera angle of view has the strongest influence on face size. Get cameras with small angle of view that cover only the width or the entry or hall
    • Camera resolution can also increase pixel count but at the cost of processing power. An 8MP camera will result in 4x load on your servers for a 2x gain in face width.

1.3.1 Surveillance vs. Facial Recognition

Surveillance and facial recognition have competing goals. Surveillance cameras must monitor and keep a record of the entire space. Facial recognition on the other hand, is only important on entries and chokepoints and is unconcerned about the surroundings.

Surveillance and facial recognition also have competing functional requirements. Surveillance must capture very large areas and provide complete coverage of a facility and transmit and record large amounts of video data. Therefore, very wide angles and low bitrate video is required to keep costs from skyrocketing. Facial recognition on the other hand, requires as much details as possible of the face and low face angles. To ensure complete coverage, surveillance cameras are placed high up so everything is in view while facial recognition cameras are placed low in keep low face angles and highest chance of a face match.

For these reasons, facial recognition should be deployed with new purpose-selected cameras. Cameras should be selected to achieve the following results:

1.3.2 Lighting Considerations

Success with recognition largely depends on lighting conditions. Faces must be well lit and free of deep shadows that obscure the eyes or other portions of the face. To achieve this, the following should be considered when at design time:

  • There should be a light source behind the camera so that subjects' faces are clearly illuminated.
  • Avoid strong backlight such as large exterior glass surfaces when possible.
  • Use cameras with dynamic exposure control such as WDR or SAFR SC800’s Face Prioritized Exposure
  • Place cameras so the face is not directly in line with strong backlight.
    • For example, instead of one camera placed directly in front of an entry, place one camera on either side of the entry directed to the left or right of the entry.

1.4 Install and Connect Your Cameras

There are two ways to process video in SAFR:

  • SAFR Camera Feed Analyzer is an interactive tool that allows you to adjust settings and visually review results.
  • SAFR Video Feeds Tool allows processes videos as a background Windows Service even if a user is not logged in.

The section below describes how to process video in SAFR Camera Feed Analyzer. Once configured, feeds can be pushed to Video Feeds for background processing by clicking the “Add to Video Feeds” toolbar button.

1.4.1 Connect Cameras

You can connect cameras in following ways:

  • Allow SAFR to automatically discover ONVIF cameras on the network (takes about 30 seconds).
  • Connect SAFR to a supported VMS (See http://docs.real.com).
  • Configure one or more RTSP Cameras as described in Connect Cameras to SAFR.

1.4.2 Configure Cameras

For each camera you to be processed, do the following:

  1. Within the SAFR Desktop Client's Camera Feed Analyzer window, select the camera you want to configure.
  2. Select the Enrolled and Stranger Monitoring operator mode from the drop-down menu in the upper right corner of the Camera Feed Analyzer window.
  3. Open Recognition Details from the View menu. This will display a cropped face below the video:
    A person wearing a mask

Description automatically generated
    Recognition details reports face size, center pose, sharpness, and contrast:
    A person wearing a mask

Description automatically generated
  4. Optimize the camera location by adjusting the camera's optical zoom to ensure that subjects' faces are at least 80 pixels in width.
  5. Add the camera's video feed to your Video Recognition Gateway (VIRGO) video feeds by pressing the Add to Video Feeds button.
  6. Check your system's CPU and GPU load and memory.

1.5 Configure SAFR to Send Notifications

1.5.1 Configure SAFR to Send Emails

Configure SAFR so that it can use an email server to send email messages.

  1. Get an SMTP Server account you can use to send emails.
  2. Go to the Web Console's Status Page .
  3. In the Configuration section, click on Set up SMTP Email Service. You'll be presented with the following dialog.
    A screenshot of a computer

Description automatically generated
    • Email Server: The address of the SMTP email server.
    • Server Port: The email server port. The default port for SMTP is 587.
    • Sender Email: The email username of the SMTP account. (e.g.Susan.Johnson@gmail.com)
    • Password: The password for the SMTP account.
    • From Email Address: The email address that will appear on the "From" line. This feature isn't supported by all email servers; if this field isn't used then the Sender Email value is used for the "From" line.
    • Sender Name: The display name on the "From" line. (e.g.Susan Johnson)
    • Test Email: Configure the test email that will be sent after you finish setting up the SMTP email service.
      • To Email: The email address to which the test email will be sent.
      • Subject: The test email's subject.
      • Body: The test email's body.
  4. Click Apply.
  5. Verify that the specified email address received a test email.

1.5.2 Configure SAFR to Send SMS Messages

Configure SAFR so that it can use a short message service (SMS) server to send SMS messages.

  1. Go to the Web Console's Status Page .

1.6 Configure SAFR Actions

1.6.1 Using Actions GUI Editor

This section describes how to use the GUI Editor to create a SAFR Actions configuration. If you prefer, see the next section to load a pre-defined SAFR Actions configuration.

On the machine where SAFR Actions is installed:

  1. Open SAFR Actions
  2. Use the “+” and “-“ symbols to add and remove properties to match the following:

    • Set userId and userPwd to your SAFR Account credentials.
    • 'myEmailConfig' is a unique id used to refer to the email definition and must match spelling and case.
    • emailDef -> Item 1 -> recipients -> Item 1: The email address of whomever you want to receive email notifications. If you want more than 1 person to receive email notifications, do the following:
      • Hover your mouse over recipients.
      • Press the + button to create additional recipients.
      • Set the newly created item(s) to the additional email address(es).
  3. Choose File > Save to save your changes. Changes take effect immediately.

1.6.2 Loading a SAFR Actions config file

Follow the steps below to load the SAFR Actions Email configuration.

  1. Download EMAIL-SAFRActions.config and save the SAFR Actions configuration folder here:
    C:\ProgramData\RealNetworks\SAFR\ares\config
  2. Open this folder in Windows File Explorer.
  3. Open Windows Services and stop the "SAFR Ares" Windows Service.
    Also ensure that SAFR Actions GUI is not open.
  4. Rename the existing file SAFRActions.config file in the config directory.
    SAFRActions.config -> SAFRActions.config.bak
  5. Rename the config file you just downloaded to SAFRActions.config.
    EMAIL-SAFRActions.config -> SAFRActions.config
  6. Start the SAFR Actions Windows Service "SAFR Ares"
  7. Open SAFR Actions GUI application.
  8. Within the SAFR Actions GUI, set the following fields to the specified values:
    • Set userId and userPwd to your SAFR Account credentials.
    • emailDef -> Item 1 -> recipients -> Item 1: The email address of whomever you want to receive email notifications. If you want more than 1 person to receive email notifications, do the following:
      • Hover your mouse over recipients.
      • Press the + button to create additional recipients.
      • Set the newly created item(s) to the additional email address(es).
  9. Choose File > Save to save your changes. Changes take effect immediately.

Note: If SAFR Actions is installed on a different machine from a SAFR Desktop Client, make sure the system clocks on the Desktop Client and SAFR Actions machines are within a few seconds of each other. (If the two system clocks differ by more than a few seconds, events may not trigger.)

1.7 Register People

1.7.1 Register a Person into SAFR Using a Photo

To register a person from a photo, do the following:

  1. Open the SAFR Desktop Client.
  2. Navigate to the People Window by selecting People from the Tools drop-down menu.
  3. Click the Add face button near the top of the People Window.
  4. Select the photo image located on your hard drive.
  5. Any photo that has sufficient quality for recognition will show a green oval around the face
  6. Type a name and other person data if desired.
  7. Click Save changes.

Note: It's very helpful to use as high quality a photo as possible.

1.7.2 Register a Person Into SAFR Using a Connected Camera

To register a person using a connected camera, do the following:

  1. Open the SAFR Desktop Client.
  2. Select the Learn and Monitor operator mode from the drop-down menu in the upper right corner of the Camera Feed Analyzer window. (i.e.the client's default window)
  3. Select a connected camera from the Camera Selector drop-down menu.
  4. Show the subject's face to the selected connected camera and wait for the overlay oval around their face to display the message "Click face to register".
  5. Click the face and enter the subject's name.

Note: Don't forget to change the operator mode to Secure Access if you want to use the camera as part of the Threat Detection system.

1.7.3 Register a Person From Event Photo

To enroll a person who from an event photo, do the following:

  1. Open the SAFR Desktop Client.
  2. Navigate to the Events Window by selecting Evebts from the Tools drop-down menu.
  3. Right Click on an event of interest and select Enroll as new…
    A screenshot of a computer

Description automatically generated
  4. Supply a name. Both first and last name are required with this entry method.
  5. If desired supply an Access Clearance (only needed for Access Control applications).
  6. Click OK.
  7. If quality issues exist with image, a View issues popup will appear:

    Click the View issues link to review face quality issues and accept or reject the image.
  8. If no issues are found, a View faces popup will appear:
    A green and white sign

Description automatically generated
    Click the View faces link to make further edits.

Note: Importing low quality faces may increase false positives. Secure Access if you want to use the camera as part of the Threat Detection system.

1.8 Configure a Registered Person as a Threat

As intended, notifications are only generated for persons marked as threat or concern. Use the following procedure to set an imported person as threat or concern.

  1. Open the SAFR Desktop Client.
  2. Navigate to the People Window by selecting People from the Tools drop-down menu.
  3. Sort or filter the list to find the person of interest.
    1. You can review people already marked as Threat or Concern using the Id Class.
  4. For each person you want to configure as a threat:
    • Double-click the person.
    • Choose Threat or Concern from the ID Class menu list.
    • In the Desktop Client, that person will now be marked with a red oval overlay to indicate a Threat or an amber oval overlay to indicate a Concern.

1.9 Test Your Threat Detection System

Enable on-screen feedback which will make it easier to test if the action is working.

  1. Open SAFR Preferences from the Tools menu.
  2. Go to Events tab
  3. Scroll down and enable the following Options.
    A screenshot of a computer

Description automatically generated

To test the system that you have just set up, do the following:

  1. Register yourself with SAFR and configure yourself as a threat, as described above.
  2. Hide your face from all connected cameras.
  3. Show your face to a connected camera and wait for SAFR to recognize you.
  4. Upon recognition, you should see the following:
    • A red oval should be drawn around your face in SAFR's video feed, indicating that you're a threat.
    • The message "Threat Detected" should flash on the screen.
    • You should see an email appear in your inbox.
    • Your phone should receive an SMS message.

If you don't see the red oval or the on-screen message, review the troubleshooting steps in the next section.

1.10 Troubleshooting

If you the email is not getting generated, try the following.

1.10.1 Check Events are Generated

Open Events from the Tools menu and look for the expected event after a person of type threat appears.

  • If no event
    • Check that enrolled face is of good quality. Open Person record and hold mouse over the face image to see quality metrics. Any metrics with warning icon indicate issues.
      A screenshot of a computer

Description automatically generated
    • Connect to the camera with Camera Feed Analyzer and view Recognition details as person walks in view of the camera.
      1. Observe the overlay color, if grey face does not meet minimum quality criteria.
      2. Observe face size, if less than 80 pixels, try to zoom camera or closer to subjects.
      3. Observe the center pose quality (Q). If less than 0.5, try placing camera more in line with direction of travel (though recognition even down to profile pose is possible with good quality enrolled image)

1.10.2 Check SAFR Actions Log File

Open SAFR Actions log (located at C:\ProgramData\RealNetworks\SAFR\ares\logs) to see if there are any clues there.

  • Check for errors with login, ensure that your account information is correct.
  • If you see a "Too Late" message, the machine running the SAFR Desktop Client and the machine running SAFR Actions may not be set to the same time. Correct this and try again.
  • See following helpdesk article for information about SAFR Actions logs: https://support.safr.com/en/support/solutions/articles/69000208746

1.10.3 Test if Action Triggered

If action appears to be triggered from logs, enable event replies in SAFR Camera Feed Analyzer to verify.

  1. Open Camera Feed Analyzer from the File menu.
  2. Select a camera from the dropdown (see Connect Cameras above)
  3. Open Preferences from Tools menu.
  4. Go to Events tab, scroll down and enable following three checkboxes shown below.

A screenshot of a computer program

Description automatically generated

  1. Generate a new event by standing in front of the camera and watch for a message on the video preview window. The message is configured in SAFR Actions config from above:
    A table with text and images

Description automatically generated with medium confidence

1.10.4 Check Email Delivery

Confirm email delivery by testing in SAFR Web Console

  1. Open SAFR Web Console
  2. Go to Status tab and scroll down to "Reconfigure Email Service"
  3. Enter a test email address and click Apply.
    A screenshot of a computer

Description automatically generated
    If errors occur on sending, they will be reported here.
    1. If authentication error, ensure that your email service allows single factor authentication for this account.
    2. If using Gmail that you have set up an App Password as described above.
  4. Check that email is successfully delivered.

1.11 Downloadable Files

EMAIL-SAFRActions.config

Questions or comments about the documentation? Email us at safr-doc-feedback@realnetworks.com .