Updated on 2024-02-29 GMT+08:00

Fight Detection

  • Data streams in JSON format are output to the specified DIS channels or webhook URLs, including structured data and images.
  • Result example:
    {
         "task_id": "a29dfa1bfcdd4a62b3f6048fe6965e8b",
         "stream_id": "aec5857c-222f-4aa9-be39-23654e118886",
         "event_type": 917504,
         "timestamp": 1535546604,
         "image_base64": "/9j/4AAQSkZJRgABAJDA...",
         "message_id": "0DD1BEA6-634B-11E8-8B0B-407D0FAD9218",
         "data":{
            "event_set":[
              {
               "bounding_box": {
                   "x": 931,
                   "y": 576,
                   "w": 307,
                  "h": 124
               },
             "confidence": 0.75
             }]}
    }
  • JSON format

    Field

    Type

    Description

    stream_id

    String

    Camera ID

    event_type

    Uint64

    Event type of the output message. The value is fixed to 917504, which is 0x 0000 0000 000E 0000 in hexadecimal format.

    task_id

    String

    Task ID

    timestamp

    Uint64

    Time when the alarm is triggered

    message_id

    String

    Alarm ID in the form of a UUID

    image_base64

    String

    Base64 encoding results of the video image when the alarm is triggered

    data

    Object

    Service input content

  • data parameters

    Field

    Type

    Description

    event_set

    List<Object>

    List of events generated

  • event_set parameters

    Field

    Type

    Description

    bounding_box

    Object

    Rectangle for the alarm object

    confidence

    Double

    Confidence of a fight event

  • bounding_box parameters

    Field

    Type

    Description

    x

    Int

    Horizontal coordinate of the upper-left corner of a bounding box

    y

    Int

    Vertical coordinate of the upper-left corner of a bounding box

    w

    Int

    Width of a bounding box

    h

    Int

    Height of a bounding box