Threat Detection Solution Guide

This solution guide describes how to use SAFR to create an alert when a known threat 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 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.

Required Hardware and Software

Required Hardware

Required Software

Install SAFR Desktop Client and SAFR Actions

Download and install the SAFR Desktop installer for Windows from the SAFR Download Portal. The SAFR Desktop installer includes both the SAFR Desktop Client and SAFR Actions. Note that when you install SAFR Actions, both of the following are installed:

If you have many cameras, you may need to install multiple Desktop Clients on different machines. Typically each machine can handle up to 8 cameras. If you do install multiple Desktop Clients, don't install ARES (or SAFR Actions) on the additional clients; you should only install one ARES instance.

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. Camera placement should follow these guidelines:

Lighting Considerations

Success with recognition largely depends on lighting conditions.

Backlighting, which is when light shines from behind a subject, can cause significant difficulties in recognition and should be avoided whenever possible. However, because backlighting often can't be avoided, the cameras you use should have the following features which help alleviate backlighting difficulties:

The Sony 772R is one example of a camera with all of the features above. In addition to these features the 772R also offers various digital tools to enhance the image:

The basic steps in handling a backlight situation are as follows:

  1. Angle the camera slightly toward the floor to eliminate as much direct light into the camera's sensor as possible.
  2. Because people will be moving through the field of view (FOV), maintaining high shutter speed is important to obtain blur-free images. To help accomplish this, place a bound on the slowest shutter speed allowed.
  3. Turn on backlight compensation if available (it's available on the 772R), and adjust the level.
  4. If faces are still dark, adjust the exposure compensation to brighten the faces. The background will probably become overexposed, but that's OK for facial recognition.
  5. If there are specular reflections, or if faces are still too dark, turn on highlight compensation.

This approach is appropriate for situations where varying outdoor conditions also vary the amount of light reflected from faces. Light intensity is simply boosted above what the cameras would choose automatically and the image is enhanced to reduce exposer variance.

In cases where outdoor conditions generate backlight conditions and there is minimal variation in lighting from inside (e.g. there are few windows, so indoor illumination doesn't affect the lighting on subjects' faces), it's more appropriate to place the camera in fully manual mode and set the shutter speed, iris, and gain values manually to properly expose the face while allowing the background to be overexposed. When in manual mode, the camera makes no auto-adjustments and is not thrown off by momentary bursts of light due to opening doors or other momentary drastic changed in lighting. When setting your camera in manual mode, do the following:

  1. Set the shutter speed to 1/90 or higher.
  2. Open the iris, increasing the f-stop for the iris (aperture) until subjects' faces are bright enough.
  3. Focus the camera on the sweet spot of the recognition where people are most likely to face towards the camera.

Increasing the iris reduces the distance during which subjects' faces are in focus. (This is called the depth of field.) Increasing the iris increases the quality of the image but reduces the amount of time the image is in focus and viability for recognition. In either case, focus the camera on the sweet spot of the recognition where people are most likely to face toward the camera.

Install and Connect Your Cameras

For each camera you install, do the following:

  1. Within the SAFR Desktop Client's Camera Feed Analyzer window, select the camera you want to install.
  2. Select the Secure Access operator mode from the drop-down menu in the upper right corner of the Camera Feed Analyzer window.
  3. Optimize the camera location and orientation. Adjust the camera's optical zoom to ensure that subjects' faces are at least 80 pixels high from chin to forehead.
  4. Adjust the focus of the camera to the closest position where all subjects' faces are within the camera's field of view. (i.e. ensure that no one will be to the left or right of the camera view)
  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. If you want to install an additional camera, but doing so would increase your CPU or GPU load to 100% or greater, install an additional instance of the SAFR Desktop Client on a different machine and install the additional camera on the newly installed Desktop Client.

Additional Camera Resources

Configure SAFR to Send Notifications

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.
    • 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.

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.
  2. In the Configuration section, click on Set up SMS. You'll be presented with the following dialog.
    • SMS Provider: Your SMS Provider. You can select either SAFR Cloud or Amazon SNS from the drop-down menu. The SAFR Cloud provider is much easier to set up however, so you should probably select the default SMS Provider, SAFR Cloud.
    • Test Message: Send a test message to verify that your SMS is properly configured.
      • To Phone Number: The phone number to which the test message will be sent. The number should be in the E.164 format. (e.g. +12065551313)
      • Message: The text message that will be sent.
  3. Click Apply.
  4. Verify that the specified phone received a test SMS message.

Configure ARES

Note: Make sure the SAFR Actions GUI is not running during steps 1-3 below.

On the machine where ARES is installed:

  1. Delete the default SAFRActions.config file located at C:\ProgramData\RealNetworks\SAFR\ares\config.
  2. Save ThreatSAFRActions.config to C:\ProgramData\RealNetworks\SAFR\ares\config.
  3. Rename the config file you just saved to SAFRActions.config.
  4. Start the SAFR Actions GUI.
  5. Within the SAFR Actions GUI, set the following fields to the specified values:
    • userId: Your username.
    • userPwd: Your password.
    • 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:
      1. Hover your mouse over recipients.
      2. Press the + button to create additional recipients.
      3. Set the newly created item(s) to the additional email address(es).
    • smsDef -> Item 1 -> recipients -> Item 1: The phone number of whomever you want to receive SMS notifications. It should be in the E.164 format. (e.g. +2065551313) If you want more than 1 person to receive SMS notifications, do the following:
      1. Hover your mouse over recipients.
      2. Press the + button to create additional recipients.
      3. Set the newly created item(s) to the additional phone number(s).
  6. Choose File > Save to save your changes.

Note: If ARES is installed on a different machine from a SAFR Desktop Client, make sure the system clocks on the Desktop Client and ARES 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.)

Register People

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 purple oval around the face with the option to click and add a name. Type a name if desired.

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

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.

Configure a Registered Person as a Threat

To configure a registered person as a threat, 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. If you want to see most recently added people, sort by Enrollment Date, and set sort order to Descending in order to see the newly added entries.
  4. You can remove people already marked as Threat or Concern from view by filtering on ID Class for No Concern.
  5. For each person you want to configure as a threat:
    1. Double-click the person.
    2. Choose Threat or Concern from the ID Class menu list.
    3. 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.

Test Your Threat Detection System

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, try the following troubleshooting steps:

  1. If you see errors with the login, ensure that your account information is correct.
  2. If you see a "Too Late" message, the machine running the Desktop Client and the machine running ARES may not be set to the same time. Correct this and try again.
  3. Check the ARES log (located at C:\ProgramData\RealNetworks\SAFR\ares\logs) to see if there are any clues there.
  4. Contact RealNetworks technical support.

Downloadable Files

See Also