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.
- 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.
- You may want doors that can be locked electronically so that you can lock all entrances to your facility when a known threat is detected.
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:
- Actions Relay Event Service (ARES) - A Java application that acts as an event listener that dispatches configured actions in response to events.
- SAFR Actions GUI - A GUI that helps users manage ARES.
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.
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:
- In most cases, cameras should be about 10-12 feet off the ground and about 20-30 feet from the entrance.
- Cameras should be positioned so that subjects who approach entrances will face the camera nearly straight on.
- Camera resolutions should be such that faces are at least 120 pixels high when at the entrance. (Larger than 120 pixels would be even better.)
- Camera lenses should have sun/rain shades.
Success with recognition largely depends on lighting conditions.
- At nighttime and indoors there should be a light source behind the camera so that subjects' faces are clearly illuminated.
- Avoid a direct line between the sun and your cameras' lenses.
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:
- Shutter priority mode
- Exposer compensation
- Manual mode with full shutter speed, iris (aperture), and gain adjustment
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:
- Visibility enhancer
- Backlight compensation
- Highlight compensation
- Noise reduction
The basic steps in handling a backlight situation are as follows:
- Angle the camera slightly toward the floor to eliminate as much direct light into the camera's sensor as possible.
- 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.
- Turn on backlight compensation if available (it's available on the 772R), and adjust the level.
- 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.
- 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:
- Set the shutter speed to 1/90 or higher.
- Open the iris, increasing the f-stop for the iris (aperture) until subjects' faces are bright enough.
- 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.
For each camera you install, do the following:
- Within the SAFR Desktop Client's Camera Feed Analyzer window, select the camera you want to install.
- Select the Secure Access operator mode from the drop-down menu in the upper right corner of the Camera Feed Analyzer window.
- 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.
- 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)
- Add the camera's video feed to your Video Recognition Gateway (VIRGO) video feeds by pressing the Add to Video Feeds button.
- 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.
Configure SAFR so that it can use an email server to send email messages.
- Get an SMTP Server account you can use to send emails.
- Go to the Web Console's Status Page.
- 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.
- Click Apply.
- Verify that the specified email address received a test email.
Configure SAFR so that it can use a short message service (SMS) server to send SMS messages.
- Go to the Web Console's Status Page.
- 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.
- Click Apply.
- Verify that the specified phone received a test SMS message.
Note: Make sure the SAFR Actions GUI is not running during steps 1-3 below.
On the machine where ARES is installed:
- Delete the default SAFRActions.config file located at
C:\ProgramData\RealNetworks\SAFR\ares\config
.
- Save ThreatSAFRActions.config to
C:\ProgramData\RealNetworks\SAFR\ares\config
.
- Rename the config file you just saved to SAFRActions.config.
- Start the SAFR Actions GUI.
- 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:
- Hover your mouse over recipients.
- Press the + button to create additional recipients.
- 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:
- Hover your mouse over recipients.
- Press the + button to create additional recipients.
- Set the newly created item(s) to the additional phone number(s).
- 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.)
To register a person from a photo, do the following:
- Open the SAFR Desktop Client.
- Navigate to the People Window by selecting People… from the Tools drop-down menu.
- Click the Add face button near the top of the People Window.
- Select the photo image located on your hard drive.
- 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.
To register a person using a connected camera, do the following:
- Open the SAFR Desktop Client.
- 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)
- Select a connected camera from the Camera Selector drop-down menu.
- 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".
- 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.
To configure a registered person as a threat, do the following:
- Open the SAFR Desktop Client.
- Navigate to the People Window by selecting People… from the Tools drop-down menu.
- 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.
- You can remove people already marked as Threat or Concern from view by filtering on ID Class for No Concern.
- 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.
To test the system that you have just set up, do the following:
- Register yourself with SAFR and configure yourself as a threat, as described above.
- Hide your face from all connected cameras.
- Show your face to a connected camera and wait for SAFR to recognize you.
- 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:
- If you see errors with the login, ensure that your account information is correct.
- 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.
- Check the ARES log (located at
C:\ProgramData\RealNetworks\SAFR\ares\logs
) to see if there are any clues there.
- Contact RealNetworks technical support.