With the Anolla function, you can start training models and setting to detect abnormal behaviors.
In order to use all this features, you need to install GUI Management.

  • Please check this file to see the newest updated functions in Asilla SDK 1.5 compared with version 1.4
  • After installing Asilla SDK, our system can detect behaviors. However in order to optimize the SDK for each camera such as decreasing False Positives and saving computation resources, you need to train the model.
    (※Our SDK can systematically run without training mode)

    Training process has three modes. It runs in the following order:

    1. Collecting: Collect action samples
    2. Training: Train the model with collected action samples
    3. Running: Run with the trained model
    For new users: First time collecting samples
    Collecting

    In the Camera Configuration of GUI, you need to set:
    collect_data_time: "collecting hours"
    collect_data_from: "start time to collect"
    (※Please NOT set start time if you don’t want to use collected data samples)
    collect_data_to: "end time to collect"
    (※Please NOT set end time if you don’t want to use collected data samples)
    train_min_sample: "min action samples" (format: %Y-%m-%d %H:%M:%S.%f)
    train_max_sample: "max action samples" (format: %Y-%m-%d %H:%M:%S.%f)

    Open the Terminal, you can choose one of these methods:

    1. In the config.ini, set training_dict = "true"
    2. Run SDK asdk run_client

    OR
    1. Run asdk update_dict (This command automatically make training_dict= "true")
    After successfully running the command above, “Collecting” mode will be started.
    Note: users have to set cameras before running asdk update_dict
    Training

    The system will switch to “Training” mode when one condition below is satisfied.

    1. [Collected samples > train_min_sample] AND [Collected duration > collect_data_time]
    2. Collected samples > Maximum collecting sample
    Running

    After the training process is done, the system will automatically switch to the running mode.
    ※If you want to detect abnormal action (-4), please add (-4) in enable_action_list of Common Configurations.


    For previous users: Updating samples

    In the Camera Configuration of GUI, you need to set:
    collect_data_from: "start time to collect"
    collect_data_to: "end time to collect"

    Open the Terminal, you can choose one of these methods:

    1. In the config.ini, set training_dict = "true"
    2. Run SDK asdk run_client

    OR
    1. Run asdk update_dict (This command automatically make training_dict= "true")
    Note: users have to set cameras before running asdk update_dict
    Training

    After successfully running the command above, “Training” mode will be started. (It skips collecting mode)

    Running

    After the training process is done, the system will automatically switch to the running mode.
    ※If you want to detect abnormal action (-4), please add (-4) in enable_action_list of Common Configurations.

    Our Asilla SDK abnormal behavior detection might sometimes wrongly detect normal actions as abnormal due to some reasons. Therefore, to increase the accuracy of abnormal detections, we would recommend you to use the behavior standardization function.

    Standardizing those abnormal detections implies you can avoid similar actions happen next time at your disposal, which helps minimize the amount of incorrect detections in the alerts. Here's how to standardize.

    Run the standardization function
    1. Note down Camera ID and Time ID when you get a wrong detection via an alert.
      In the below sample, Location: cam01 so Camera ID is “1” and TimeID is “1636954897652”.
      Anolla alert via Telegram
    2. Use the command below to call the standardization function (replace SDK IP Address, Camera_ID and Time_ID from the previous step):
      curl -X POST http://SDK_IP_ADDRESS:5000/setNormalAction \
      -H "Content-Type: application/json" \
      -d '{"cam_id": CAMERA_ID, "time_id": Time_ID}'

      SDK_IP_ADDRESS is the IP Address of your machine you have installed Asilla SDK Client.

    Reset standardization data

    In some cases such as your camera angle and location has been changed etc. You may need to reset your standardized data. Use below API to reset your data to default for a specific camera (replace your SDK IP Address and Camera_ID):

    curl -X POST http://SDK_IP_ADDRESS:5000/resetNormalAction \
    -H "Content-Type: application/json" \
    -d '{"cam_id": CAMERA_ID}'

    For security purposes and privacy concerns, Asilla SDK can blur faces in the output videos. This feature is turned off by default, so you need to turn it on via our Restful API with the command below (replace your SDK_IP_ADDRESS and CAMERA_ID):

    curl -X POST http://SDK_IP_ADDRESS:5000/setSpecificCamConfig \
    -H "Content-Type: application/json" \
    -d '{"cam_id": CAMERA_ID, "config_info": {"use_privacy_mask": true}}'

    SDK_IP_ADDRESS is the IP Address of your machine you have installed Asilla SDK Client.

    Here is the comparison of the images before and after applying the privacy mask.

    Before applying privacy mask
    After applying privacy mask

    When we use wide-angle cameras, sometimes people in the corners of the frame appear distorted. This can cause wrong detections. For example, walking near the corners of the frame is recognized as abnormal action.

    To solve this issue, users can use camera calibration, which is to make the camera angle of a wide-angle camera look closer to what our naked eyes see.

    This feature is turned off by default (as not all cameras are wide-angle), so you need to turn it on via our Restful API with the command below:

    curl -X POST http://SDK_IP_ADDRESS:5000/setSpecificCamConfig \
    -H "Content-Type: application/json" \
    -d '{"cam_id": CAMERA_ID, "config_info": {"use_calibration": true}}'

    Here is the comparison of the images before and after applying the camera calibration (see the top and bottom corners)

    Before applying calibration
    After applying calibaration

    Users can draw a polygon and Anolla will only detect abnormal behavior inside that polygon. In order to use this function, you need to install GUI Management.

    1. Open Management GUI
      http://DEVICE_IP_ADDRESS:8080
    2. Click Action Areas on the sidebar menu to go to the setting page
    3. Choose the device and camera you want to set up Action Areas
    4. If you haven’t had a background photo, click Capture camera button to capture the background camera photo
    5. Draw an action area by clicking at least three points on the screen
    6. When you finish drawing, right-click or press Enter.
    7. Finally, click Apply button to save.
    Create an Action Area

    Users can draw a polygon and Anolla won’t detect abnormal behavior inside that polygon. In order to use this function, you need to install GUI Management.

    1. Open Management GUI
      http://DEVICE_IP_ADDRESS:8080
    2. Click Action Areas on the sidebar menu to go to the setting page
    3. Choose the device and camera you want to set up Action Areas
    4. If you haven’t had a background photo, click Capture camera button to capture the background camera photo
    5. Draw a non action area by clicking at least three points on the screen
    6. When you finish drawing, right-click or press Enter.
    7. Finally, click Apply button to save.
    Create a Non Action Area