Video alarm method

By acquiring and matching the time, location, and model feature values ​​of video image targets in the video alarm scheme, and combining them with false alarm target feature groups, the accuracy of alarm target detection is improved and the false alarm rate is reduced.

CN115965891BActive Publication Date: 2026-02-24HANGZHOU HIKVISION DIGITAL TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211559781.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-06
Publication Date
2026-02-24
Estimated Expiration
2042-12-06

AI Technical Summary

Technical Problem

In existing video alarm solutions, the accuracy of matching results is low when calculating the similarity between alarm targets and false targets using area, color histograms, and gradient histograms, leading to a high false alarm rate.

Method used

The first alarm target detection model is used to detect video images, obtain the time feature value, position feature value and model feature value of the target, and match them with manually marked false alarm target feature groups to determine the alarm analysis result, and output alarm information according to the matching result.

Benefits of technology

It improved the accuracy of matching alarm targets with false targets and reduced the false alarm rate of video alarms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115965891B_ABST
    Figure CN115965891B_ABST
Patent Text Reader

Abstract

The application discloses a video alarm method, device and equipment and a computer readable storage medium. The method comprises the following steps: detecting a first video image by using a first alarm target detection model to obtain a detection result; obtaining a first feature group, wherein the first feature group at least comprises a time feature value, a position feature value and a model feature value corresponding to a first target; matching the same type of feature values in the first feature group and a second feature group to obtain a matching result, wherein the second feature group at least comprises one or more feature values selected from the time feature value, the position feature value and the model feature value corresponding to a second target by a person; determining an alarm analysis result of the first target according to the matching result between the first feature group and a feature group corresponding to at least one false alarm target; and outputting alarm information corresponding to the first target when it is determined according to the alarm analysis result that the first target needs to be alarmed. The application reduces the false alarm rate of video alarm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of video surveillance technology, and in particular to a video alarm method, apparatus, device, and computer-readable storage medium. Background Technology

[0002] Video alarm technology refers to the technology of detecting video images captured by video acquisition devices and triggering an alarm when the detection results indicate that a target requiring alarm is present in the video image.

[0003] Current video alarm schemes, after detecting alarm targets in video images using algorithms or models, match the alarm targets with pre-saved false targets that should not trigger alarms. If every alarm target in the video image has a matching false target, no alarm is triggered; otherwise, an alarm is triggered. In this scheme, the similarity between alarm targets and false targets is calculated based on the area, color histogram, and gradient histogram of the regions where the alarm target and the false target are located in the video image. However, characterizing false targets using area, color histogram, and gradient histogram is not accurate enough, resulting in low accuracy in matching alarm targets with false targets, and consequently, a high false alarm rate for video alarms. Summary of the Invention

[0004] The main objective of this invention is to provide a video alarm method, apparatus, device, and computer-readable storage medium to improve the accuracy of matching results obtained by matching alarm targets with false targets, thereby reducing the false alarm rate of video alarms.

[0005] To achieve the above objectives, the present invention provides a video alarm method, the video alarm method comprising the following steps:

[0006] The first video image was detected using the first alarm target detection model, and the detection results were obtained.

[0007] When it is determined that a first target exists in the first video image, a first feature group is obtained, wherein the first target is a target that needs to be alarmed based on the detection result, the first feature group is the feature group corresponding to the first target, and the first feature group includes at least the time feature value, the location feature value and the model feature value corresponding to the first target;

[0008] The first feature group and the second feature group are matched with the same type of feature values ​​to obtain the matching result. The second feature group is the feature group corresponding to the second target. The second target is a false alarm target marked by the human in the second video image collected in history. The second feature group includes at least one or more feature values ​​selected by the human from the time feature value, position feature value and model feature value corresponding to the second target.

[0009] Based on the matching results between the first feature group and the feature group corresponding to at least one false alarm target, the alarm analysis result of the first target is determined;

[0010] When it is determined from the alarm analysis results that an alarm needs to be triggered on the first target, the alarm information corresponding to the first target is output.

[0011] Optionally, the step of obtaining the first feature group includes:

[0012] Generate a time feature value corresponding to the first target based on the acquisition time of the first video image;

[0013] Based on the position information of the first target on the first video image in the detection result, a position feature value corresponding to the first target is generated;

[0014] The feature value corresponding to the first target generated during the detection of the first video image using the first alarm target detection model is obtained and used as the model feature value corresponding to the first target.

[0015] Optionally, the step of matching feature values ​​of the same type in the first feature group and the second feature group to obtain a matching result includes:

[0016] Calculate the feature value matching degree between feature values ​​of the same type in the first feature group and the second feature group;

[0017] The matching degree of each feature value in the second feature group is summed by weighting the corresponding weights of each feature value in the second feature group to obtain the matching degree between the first feature group and the second feature group. The matching degree is used as the matching result. The weighting weights are set manually for the feature values ​​in the second feature group.

[0018] Optionally, after the step of outputting the alarm information corresponding to the first target, the method further includes:

[0019] When a false alarm confirmation message is received from a human regarding the alarm information, the first target is added as a new false alarm target, and the type of false alarm feature value selected by the human for the first target is determined based on the false alarm confirmation message.

[0020] Select feature values ​​of the same type as the false alarm feature values ​​from the first feature group, and use them as the feature group corresponding to the newly added false alarm target.

[0021] Optionally, the detection result includes bit information and a first confidence level corresponding to each third target in the first video image, and the alarm analysis result includes a second confidence level corresponding to the first target. The first confidence level and the second confidence level are used to characterize the probability that the corresponding target belongs to the target that needs to be alarmed.

[0022] After the step of determining the alarm analysis result of the first target based on the matching result between the first feature group and the feature group corresponding to at least one false alarm target, the method further includes: taking the first video image, the location information corresponding to each of the third targets, the first confidence level corresponding to each of the third targets other than the first target, and the second confidence level corresponding to the first target as training material, and adding the training material to the scene material library of the first shooting scene corresponding to the first video image;

[0023] After obtaining the second alarm target detection model obtained by retraining the first alarm target detection model based on the scene material library, the second alarm target detection model is used to replace the first alarm target detection model, and the second alarm target detection model is used to detect the third video image newly acquired in the first shooting scene.

[0024] Optionally, after the step of replacing the first alarm target detection model with the second alarm target detection model, the method further includes: using the second alarm target detection model to detect the fourth video image containing the fourth target, and using the feature values ​​generated during the detection process to update the model feature values ​​in the feature group corresponding to the fourth target, wherein the fourth target is a false alarm target whose corresponding feature group contains model feature values.

[0025] Optionally, the step of using the first video image, the location information corresponding to each of the third targets, the first confidence scores corresponding to the targets other than the first target among the five third targets, and the second confidence scores corresponding to the first target as training materials, and adding the training materials to a scene material library of the first shooting scene corresponding to the first video image, includes:

[0026] Based on the location information corresponding to the fifth target, the image region corresponding to the fifth target is extracted from the first video image, wherein the fifth target is any of the third targets;

[0027] 0 When the third confidence level corresponding to the fifth target is greater than or equal to the first threshold, the image region is marked with an alarm target and added to the scene material library as a training material. Wherein, when the fifth target is the first target, the third confidence level is the second confidence level corresponding to the fifth target. When the fifth target is a target other than the first target among the third targets, the third confidence level is the first confidence level corresponding to the fifth target.

[0028] When the third confidence level is less than the first threshold and greater than the second threshold, the third alarm target detection model is used to detect the image region to obtain the fourth confidence level corresponding to the fifth target. The image region is then marked with a tag corresponding to the fourth confidence level and added to the scene material library as a training material. The model complexity of the third alarm target detection model is greater than that of the first alarm target detection model.

[0029] Optionally, the step of adding the training material to the scene material library of the first shooting scene corresponding to the first video image includes:

[0030] The training materials are uploaded to the server so that the server can add the training materials to the scene material library. When the materials in the scene material library meet the retraining conditions, the first alarm target detection model is retrained using the scene material library and the basic material library to obtain the second alarm target detection model.

[0031] The step of replacing the first alarm target detection model with the second alarm target detection model after obtaining the second alarm target detection model obtained by retraining the first alarm target detection model based on the scene material library includes:

[0032] After the second alarm target detection model is downloaded from the server, algorithm version compatibility and data packet integrity are checked on the second alarm target detection model.

[0033] Once both the algorithm version compatibility test and the data packet integrity test pass, the second alarm target detection model replaces the first alarm target detection model.

[0034] To achieve the above objectives, the present invention also provides a video alarm device, the video alarm device comprising:

[0035] The detection module is used to detect the first alarm target in the acquired first video image using the first alarm target detection model and obtain the detection result;

[0036] The acquisition module is used to acquire a first feature group when it is determined that a first target exists in the first video image, wherein the first target is a target that needs to be alarmed based on the detection result, the first feature group is a feature group corresponding to the first target, and the first feature group includes at least the time feature value, the location feature value and the model feature value corresponding to the first target;

[0037] The matching module is used to match feature values ​​of the same type in the first feature group and the second feature group to obtain a matching result. The second feature group is the feature group corresponding to the second target. The second target is a false alarm target manually marked by the author for the second video image collected in history. The second feature group includes at least one or more feature values ​​manually selected from the time feature value, location feature value and model feature value corresponding to the second target.

[0038] The determination module is used to determine the alarm analysis result of the first target based on the matching result between the first feature group and the feature group corresponding to at least one false alarm target;

[0039] The output module is used to output alarm information corresponding to the first target when it is determined from the alarm analysis results that an alarm needs to be triggered on the first target.

[0040] To achieve the above objectives, the present invention also provides a video alarm device, the video alarm device comprising: a memory, a processor, and a video alarm program stored in the memory and executable on the processor, wherein the video alarm program, when executed by the processor, implements the steps of the video alarm method as described above.

[0041] Furthermore, to achieve the above objectives, the present invention also proposes a computer-readable storage medium storing a video alarm program, which, when executed by a processor, implements the steps of the video alarm method described above.

[0042] In this invention, a first alarm target detection model is used to detect the acquired first video image to obtain a detection result. When it is determined that a first target exists in the first video image, a first feature group is obtained, wherein the first target is a target that needs to be alarmed based on the detection result, and the first feature group is the feature group corresponding to the first target. The first feature group includes at least the time feature value, position feature value, and model feature value corresponding to the first target. The feature values ​​of the same type in the first feature group and the second feature group are matched to obtain a matching result. The second feature group is the feature group corresponding to the second target, and the second target is a false alarm target manually marked by the author for the historically acquired second video image. The second feature group includes at least one or more feature values ​​manually selected from the time feature value, position feature value, and model feature value corresponding to the second target. Based on the matching result between the first feature group and the feature group corresponding to at least one false alarm target, the alarm analysis result of the first target is determined. When it is determined that an alarm needs to be triggered for the first target based on the alarm analysis result, the alarm information corresponding to the first target is output. The video alarm scheme proposed in this invention takes into account that different false alarm targets may possess different types of feature values ​​that distinguish them from other targets. For different false alarm targets, different types of feature values ​​can be selected to represent them. This improves the detection accuracy when matching the first feature set of the first target with the feature set of the false alarm target to detect whether the first target is a false alarm, thereby reducing the false alarm rate of the video alarm. Furthermore, in this invention, the selectable feature value types include at least time feature values, location feature values, and model feature values, which can characterize the target's features from different dimensions, further improving the detection accuracy of whether the first target is a false alarm target and further reducing the false alarm rate of the video alarm. Attached Figure Description

[0043] Figure 1 This is a schematic diagram of the hardware operating environment involved in the embodiments of the present invention;

[0044] Figure 2 This is a flowchart illustrating the first embodiment of the video alarm method of the present invention;

[0045] Figure 3 This is a schematic diagram of the functional modules of a preferred embodiment of the video alarm device of the present invention.

[0046] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0047] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0048] like Figure 1As shown, Figure 1 This is a schematic diagram of the device structure of the hardware operating environment involved in the embodiments of the present invention.

[0049] It should be noted that the video alarm device in this embodiment of the invention can be a video acquisition device, a smartphone, a personal computer, a server, or other devices, and no specific limitations are imposed here.

[0050] like Figure 1 As shown, the video alarm device may include: a processor 1001, such as a CPU; a network interface 1004; a user interface 1003; a memory 1005; and a communication bus 1002. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen and an input unit such as a keyboard. Optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be high-speed RAM or non-volatile memory, such as a disk drive. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0051] Those skilled in the art in this field can understand. Figure 1 The device structure shown does not constitute a limitation on the video alarm device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0052] like Figure 1 As shown, the memory 1005, as a computer storage medium, may include an operating system, a network communication module, a user interface module, and a video alarm program. The operating system is a program that manages and controls the device's hardware and software resources, supporting the operation of the video alarm program and other software or programs. Figure 1 In the device shown, the user interface 1003 is mainly used for data communication with the client; the network interface 1004 is mainly used for establishing a communication connection with the server; and the processor 1001 can be used to call the video alarm program stored in the memory 1005 and execute the steps of the video alarm method in each embodiment.

[0053] Based on the above structure, various embodiments of the video alarm method are proposed.

[0054] Reference Figure 2 , Figure 2 This is a flowchart illustrating the first embodiment of the video alarm method of the present invention.

[0055] This invention provides an embodiment of a video alarm method. It should be noted that although the logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order. In this embodiment, the executing entity of the video alarm method can be a video capture device, such as a camera, or it can be a cloud platform, personal computer, smartphone, server, or other devices; no limitation is made in this embodiment. For ease of description, the following uses a camera as an example to illustrate each embodiment. In this embodiment, the video alarm method includes:

[0056] Step S10: The first video image is detected using the first alarm target detection model to obtain the detection result;

[0057] The camera can be fixedly installed in a certain position to capture images of the surrounding scene. Its shooting angle can be controlled and changed, or it can shoot from a fixed angle; this embodiment does not impose any restrictions. The camera can capture video images at a certain frame rate and detect alarm targets in each captured video image. Alternatively, it can select a portion of the captured video images according to pre-set rules for alarm target detection; this embodiment does not impose any restrictions on this either.

[0058] It should be noted that when the execution subject of the video alarm method in this embodiment of the invention is a device other than the video acquisition device, such as a server, the video acquisition device can upload the acquired video images to the server, and the server can detect the alarm target in the video images.

[0059] The process for detecting alarm targets in each frame of video image is the same. The following explanation uses the detection of alarm targets in one frame of video image as an example, and this frame of video image is referred to as the first video image for distinction.

[0060] An alarm target detection model (hereinafter referred to as the first alarm target detection model for distinction) is pre-configured in the camera. The first alarm target detection model can be a model for alarm target detection that has been pre-trained based on a large amount of training data. The specific structure of this model is not limited in this embodiment; for example, it can be implemented using a convolutional neural network or a deep learning network. The first alarm target detection model can be trained in the camera or trained on other devices, such as a server, and then deployed to the camera. In this embodiment, there are no restrictions on the training and deployment methods of the first alarm target detection model.

[0061] The camera uses a first alarm target detection model to detect the first video image and obtains detection results. These detection results can include information characterizing whether an alarm-inducing target exists in the first video image. For example, in one embodiment, the detection results can include location information and confidence levels for multiple targets detected in the first video image. The location information can be the target's coordinates and size in the first video image, and the confidence level can be a probability characterizing that the target is an alarm-inducing target. This can be achieved by comparing the target's confidence level with a pre-set threshold; if the confidence level is greater than the threshold, the target is determined to be an alarm-inducing target; otherwise, the target is determined to be an alarm-free target.

[0062] It should be noted that the detection accuracy of the first alarm target detection model is related to the model's complexity and the amount of training data. Generally, higher complexity leads to higher detection accuracy. However, higher complexity also places higher demands on the hardware computing power of the device running the model. In some scenarios, due to limitations in hardware computing power or the pursuit of real-time detection, it is necessary to compromise on model accuracy and use a model with relatively lower complexity. This results in reduced reliability of the detection results obtained from the model and may lead to false alarms. Furthermore, even the most complex model cannot guarantee 100% accuracy.

[0063] In this embodiment, when it is determined from the detection results that there is a target in the first video image that requires an alarm, the accuracy of the video alarm is further improved by detecting whether the target is a false alarm.

[0064] Step S20: When it is determined that a first target exists in the first video image, a first feature group is obtained, wherein the first target is a target that needs to be alarmed based on the detection result, the first feature group is a feature group corresponding to the first target, and the first feature group includes at least the time feature value, the position feature value and the model feature value corresponding to the first target.

[0065] The target that requires an alarm based on the detection results is referred to as the first target for distinction. When it is determined that a first target exists in the first video image, that is, when it is determined that an alarm requires an alarm exists in the first video image based on the detection results, the camera can acquire a first feature group. This first feature group is the feature group corresponding to the first target. It should be noted that there may be multiple first targets in the first video image, or there may be no first targets. In this embodiment, for the case where a first target exists in the first video image, further detection is performed to determine whether the first target is a false alarm, thereby improving the accuracy of the video alarm.

[0066] The first feature group includes at least the time feature value, position feature value, and model feature value corresponding to the first target. The time feature value characterizes the first target's appearance time, the position feature value characterizes the first target's location in the first video image, and the model feature value can be derived from the feature values ​​corresponding to the first target generated during the detection of the first video image using the first alarm target detection model, characterizing the first target's appearance in the first video image. In addition to time feature values, position feature values, and model feature values, the first feature group may also include other types of feature values ​​to characterize other aspects of the first target's features. It is understood that various types of feature values ​​are used to characterize the attributes of the first target from various dimensions; different targets may have different feature values ​​of the same type, while identical or similar targets may have the same or similar feature values ​​of the same type.

[0067] In this embodiment, a first feature group corresponding to the first target is obtained and used to match it with the feature group corresponding to the false positive target to determine whether the first target is a false positive target. This embodiment does not limit the method of obtaining the first feature group.

[0068] Further, in one embodiment, the step of obtaining the first feature group in step S20 includes:

[0069] Step S201: Generate a time feature value corresponding to the first target based on the acquisition time of the first video image;

[0070] In this embodiment, the camera can generate a time feature value corresponding to the first target based on the acquisition time of the first video image. The camera can record the acquisition time of each frame of video image it acquires. The method for generating the time feature value based on the acquisition time can be set according to the needs of the specific scenario and is not limited in this embodiment. For example, the acquisition time can include time values ​​at different unit granularities such as month, day, hour, minute, and second. When generating the time feature value corresponding to the first target, a portion of the time values ​​at different unit granularities can be selected from the acquisition time according to pre-set rules and used directly as the time feature value, or it can be converted into a data format that facilitates comparison before being used as the time feature value.

[0071] Step S202: Generate a position feature value corresponding to the first target based on the position information of the first target on the first video image in the detection result;

[0072] The detection results may include the position information of each detected target on the first video image. The camera can generate a position feature value corresponding to the first target based on the position information of the first target on the first video image. The method of generating the position feature value based on the position information can be set according to the needs of the specific scene and is not limited in this embodiment. For example, the coordinates of the first target in the first video image can be directly used as the position feature value corresponding to the first target.

[0073] Step S203: Obtain the feature value corresponding to the first target generated during the detection of the first video image using the first alarm target detection model, and use it as the model feature value corresponding to the first target.

[0074] During the detection of the first video image using the first alarm target detection model, feature values ​​corresponding to each target are generated (or calculated). For example, the feature values ​​corresponding to each target are extracted by the feature extraction layer in the first alarm target detection model. These feature values ​​may be data in vector or matrix form, and are not limited in this embodiment.

[0075] The camera can acquire the feature value corresponding to the first target generated during the detection of the first video image using the first alarm target detection model, and use the feature value as the model feature value corresponding to the first target.

[0076] Step S30: Match feature values ​​of the same type in the first feature group and the second feature group to obtain a matching result. The second feature group is the feature group corresponding to the second target. The second target is a false alarm target manually marked by the author for the second video image collected in history. The second feature group includes at least one or more feature values ​​manually selected from the time feature value, location feature value and model feature value corresponding to the second target.

[0077] The camera can store feature groups corresponding to false alarm targets in advance. False alarm targets are those that are manually marked by the camera based on historically acquired video images (hereinafter referred to as the second video image for distinction) and do not belong to the targets that need to be alarmed, but may be incorrectly detected as targets that need to be alarmed by the first alarm target detection model, or have already been incorrectly detected as targets that need to be alarmed by the first alarm target detection model.

[0078] The feature set corresponding to the false alarm target must include at least one or more feature values ​​manually selected from the time feature values, location feature values, and model feature values ​​corresponding to the second target. In addition, it may also include other types of feature values. The interpretation of the time feature values, location feature values, and model feature values ​​of the false alarm target can refer to the interpretation of the time feature values, location feature values, and model feature values ​​of the first target, and will not be repeated here.

[0079] This embodiment does not limit the marking method for false alarm targets or the selection method for their feature values. For example, in one embodiment, during camera use, the video image requiring an alarm and the location of the target requiring an alarm within the video image can be output to the client for display. Monitoring personnel can then make a judgment and, upon detecting a false alarm, mark the false alarm target through the client. The client can display feature value types for monitoring personnel to select, allowing them to choose the appropriate feature value type based on the specific circumstances of the false alarm target. The client then feeds back the feature value type of the false alarm target selected by the monitoring personnel to the camera, which then obtains and saves the feature set of the false alarm target based on the feature value type.

[0080] It should be noted that research has shown that different false alarm targets may have different types of feature values ​​that distinguish them from other targets. Therefore, in this embodiment, it is proposed that different types of feature values ​​can be selected to represent different false alarm targets. This improves the detection accuracy in subsequent steps when the first target is detected as a false alarm target by matching the first feature group of the first target with the feature group of the false alarm target, thereby improving the accuracy of video alarms.

[0081] For example, a poster on a wall might contain content that could be mistaken for an alarm target. Since its position remains constant across all frames of video footage captured by the camera, the poster's location can be marked as a false alarm target, and only the positional feature value can be selected as the feature group corresponding to that false alarm target. Similarly, a target might always appear at a fixed time or during a fixed time period each day, and its appearance might be mistaken for an alarm target. Therefore, this target can be marked as a false alarm target, and both time and model feature values ​​can be selected as the feature group corresponding to that false alarm target. Furthermore, a target's appearance time and location may not follow a fixed pattern, and only its appearance might be mistaken for an alarm target. Therefore, this target can be marked as a false alarm target, and model feature values ​​can be selected as the feature group corresponding to that false alarm target.

[0082] The camera can match the first feature group corresponding to the first target with the same type of feature values ​​in the second feature group corresponding to the second target, obtaining a matching result between the first and second feature groups. Alternatively, this matching result can be described as a matching result between the first target and the second target. Here, the second target is one of the false positive targets, and the second feature group is the feature group corresponding to the second target. The matching result can characterize whether the first target is the second target; for example, it can be a matching degree, where the first target is considered to be the second target when the matching degree is greater than a certain threshold.

[0083] It should be noted that the camera can sequentially match the first feature group of the first target with the feature groups corresponding to each false alarm target. If the matching result with a false alarm target indicates that the first target is a false alarm target, the first feature group of the first target will no longer be matched with the feature groups of other false alarm targets. Therefore, in this embodiment, the false alarm target that is matched with the first target is called the second target to distinguish it from the false alarm target.

[0084] It should be noted that some types of feature values ​​may exist in the first feature group but not in the second feature group. In this embodiment, matching feature values ​​of the same type in two feature groups means matching feature values ​​of the same type that exist in both feature groups. For example, when the second feature group includes time feature values ​​and model feature values, the time feature values ​​in the first feature group and the time feature values ​​in the second feature group are matched, and the model feature values ​​in the first feature group and the model feature values ​​in the second feature group are matched.

[0085] In this embodiment, the specific implementation method for matching the first feature group and the second feature group to obtain the matching result is not limited. For example, in one embodiment, the matching degree between feature values ​​of the same type in the first feature group and the second feature group (hereinafter referred to as feature value matching degree for distinction) can be calculated, and then the matching degree of each feature value matching degree can be averaged or weighted to obtain the matching degree between the first feature group and the second feature group. This matching degree is used as the matching result. Alternatively, the matching degree can be compared with a threshold. When the matching degree is greater than the threshold, the matching result that the first target is not the second target is obtained. When the matching degree is less than or equal to the threshold, the matching result that the first target is the second target is obtained. As another example, in one embodiment, step S30 includes:

[0086] Step S301: Calculate the feature value matching degree between feature values ​​of the same type in the first feature group and the second feature group;

[0087] The camera can calculate the feature value matching degree between feature values ​​of the same type in the first feature group and the second feature group. The specific calculation method is not limited in this embodiment. For example, for time feature values, the distance between the time points represented by two time feature values ​​can be calculated, and the feature value matching degree is calculated based on the distance; the closer the distance, the higher the feature value matching degree between the two time feature values. Similarly, for location feature values, the distance between location points in the image represented by two location feature values ​​can be calculated, and the feature value matching degree is calculated based on the distance; the closer the distance, the higher the feature value matching degree between the two location feature values. Alternatively, the ratio of overlapping areas between the regions in the image represented by two location feature values ​​can be calculated, and the feature value matching degree is calculated based on the overlapping area ratio; the larger the overlapping area ratio, the higher the feature value matching degree between the two location feature values. Furthermore, for model feature values, when the model feature values ​​are in vector or matrix form, the vector similarity or matrix similarity between two model feature values ​​can be calculated, and the feature value matching degree is calculated based on the similarity; the larger the similarity, the higher the feature value matching degree between the two model feature values.

[0088] Step S302: The matching degree of each feature value is summed by weighting the corresponding weights of each feature value in the second feature group to obtain the matching degree between the first feature group and the second feature group. The matching degree is used as the matching result. The weighting weights are manually set for the feature values ​​in the second feature group.

[0089] Research has shown that the representativeness of each feature value of a false alarm target varies. Therefore, in this embodiment, the camera can pre-store the weighted weights corresponding to each feature value in the feature group of the false alarm target. These weighted weights can be manually set according to the specific situation of the false alarm target. This improves the detection accuracy when the first target is detected as a false alarm target by matching the first feature group of the first target with the feature group of the false alarm target, thereby improving the accuracy of video alarms.

[0090] For example, when the location of a falsely reported target in a video image is more representative of the falsely reported target than its appearance features, the weighting weight corresponding to the location feature value of the falsely reported target can be set higher, while the weighting weight corresponding to the model feature value can be set lower.

[0091] After calculating the feature matching degree between each feature value, the camera can use the weighted weights corresponding to each feature value in the second feature group to perform a weighted summation of the feature matching degrees of each feature value to obtain the matching degree between the first feature group and the second feature group.

[0092] The camera can use the matching degree between the second feature groups as the matching result between the second feature groups, or compare the matching degree with a threshold. When the matching degree is greater than the threshold, the first target is not the second target. When the matching degree is less than or equal to the threshold, the first target is the second target.

[0093] Step S40: Determine the alarm analysis result of the first target based on the matching result between the first feature group and the feature group corresponding to at least one false alarm target;

[0094] The alarm analysis result for the first target can be either a result indicating whether the first target is a target requiring an alarm, or a confidence score indicating the probability that the first target is a target requiring an alarm. When the alarm analysis result is a confidence score, it can be compared with a pre-set threshold to determine whether the first target is a target requiring an alarm.

[0095] In a specific implementation, when the matching result between the first feature group and the feature group corresponding to a false alarm target indicates that the first target is the false alarm target, the alarm analysis result of the first target being a target that needs to be alarmed can be obtained; when the matching result between the first feature group and the feature groups corresponding to all false alarm targets indicates that the first target is not any of the false alarm targets, the alarm analysis result of the first target being a target that does not need to be alarmed can be obtained.

[0096] Alternatively, when the matching result between the first feature group and the feature group corresponding to the false alarm target is a matching degree, the maximum matching degree can be selected from the matching degrees between the first feature group and the feature groups corresponding to each false alarm target. The confidence degree is calculated based on the maximum matching degree, and the confidence degree is used as the alarm analysis result of the first target.

[0097] Step S50: When it is determined from the alarm analysis results that an alarm needs to be triggered on the first target, output the alarm information corresponding to the first target.

[0098] When the alarm analysis results for the first target determine that an alarm needs to be triggered, the camera can output alarm information corresponding to the first target. The specific content and format of the alarm information are not limited in this embodiment; for example, it could be marking the location of the first target in a first video image, and using the marked first video image as the alarm information.

[0099] The camera can output alarm information to a client device, which then outputs the information to the monitoring personnel so they can be promptly informed of the alarm. Alternatively, in other implementations, other output methods can be configured as needed; this embodiment does not impose any limitations on this.

[0100] In this embodiment, the first video image is detected using a first alarm target detection model to obtain a detection result. When it is determined that a first target exists in the first video image, a first feature group is obtained, wherein the first target is a target that needs to be alarmed based on the detection result, and the first feature group is the feature group corresponding to the first target. The first feature group includes at least the time feature value, position feature value, and model feature value corresponding to the first target. The feature values ​​of the same type in the first feature group and the second feature group are matched to obtain a matching result. The second feature group is the feature group corresponding to the second target, and the second target is a false alarm target manually marked by the user for historically acquired second video images. The second feature group includes at least one or more feature values ​​manually selected from the time feature value, position feature value, and model feature value corresponding to the second target. Based on the matching result between the first feature group and the feature group corresponding to at least one false alarm target, the alarm analysis result of the first target is determined. When it is determined that an alarm needs to be triggered for the first target based on the alarm analysis result, the alarm information corresponding to the first target is output. The video alarm scheme proposed in this embodiment takes into account that different false alarm targets may have different types of feature values ​​that distinguish them from other targets. For different false alarm targets, different types of feature values ​​can be selected to represent them. This improves the detection accuracy when matching the first feature group of the first target with the feature group of the false alarm target to detect whether the first target is a false alarm, thereby reducing the false alarm rate of the video alarm. Furthermore, in this embodiment, the selectable feature value types include at least time feature values, location feature values, and model feature values, which can characterize the target's features from different dimensions, further improving the detection accuracy of whether the first target is a false alarm target and further reducing the false alarm rate of the video alarm.

[0101] Furthermore, based on the first embodiment described above, a second embodiment of the video alarm method of the present invention is proposed. In this embodiment, after step S50, the method further includes:

[0102] Step S60: When a false alarm confirmation message is received from a human regarding the alarm information, the first target is taken as a new false alarm target, and the type of false alarm feature value selected by the human for the first target is determined according to the false alarm confirmation message.

[0103] After the camera outputs an alarm message for a first target, if it receives a false alarm confirmation message from a human operator regarding that alarm message, it can treat the first target as a newly added false alarm target. The method of receiving the false alarm confirmation message is not limited in this embodiment. For example, in one embodiment, the camera can send the alarm message to a client, which provides a false alarm target confirmation function. When monitoring personnel determine that the first target is a false alarm target, they can use this function to mark the first target as a false alarm target and select a false alarm feature value type corresponding to the first target based on its characteristics. The client then includes the selected false alarm feature value type in the false alarm confirmation message and sends it back to the camera.

[0104] Step S70: Select a feature value of the same type as the false alarm feature value from the first feature group, and use it as the feature group corresponding to the newly added false alarm target.

[0105] The camera selects a feature value from the first feature group that is of the same type as the false alarm feature value, and uses it as the feature group corresponding to the newly added false alarm target.

[0106] It should be noted that if a target that has already been manually marked as a false alarm target is then identified as an alarm target and triggers an alarm, the monitoring personnel can reselect the feature group corresponding to that target, or reset the weighting of the feature values ​​of each type in the feature group. This improves the representativeness of the feature group for the false alarm target, thereby further improving the detection accuracy of whether the first target is a false alarm target and further reducing the false alarm rate of video alarms.

[0107] Furthermore, based on the first and / or second embodiments described above, a third embodiment of the video alarm method of the present invention is proposed. In this embodiment, after step S40, the method further includes:

[0108] Step A10: Use the first video image, the location information corresponding to each of the third targets, the first confidence level corresponding to each of the third targets other than the first target, and the second confidence level corresponding to the first target as training materials, and add the training materials to the scene material library of the first shooting scene corresponding to the first video image;

[0109] In this embodiment, the detection result obtained by using the first alarm target detection model to detect the first video image may include the location information and confidence level (hereinafter referred to as the first confidence level) of each target (hereinafter referred to as the third target for distinction) in the first video image. The alarm analysis result may include the confidence level corresponding to the first target (hereinafter referred to as the second confidence level for distinction). The first confidence level and the second confidence level are used to characterize the probability that the corresponding target belongs to the target that needs to be alarmed. Among them, when the first confidence level corresponding to the third target is greater than a certain threshold, the third target can be considered as the target that needs to be alarmed, that is, the third target is the first target. It should be noted that the first target may or may not exist among the third targets.

[0110] The camera can use the first video image, the location information corresponding to each third target, the first confidence level of each third target other than the first target, and the second confidence level of the first target as training materials, and add the training materials to the scene material library of the shooting scene corresponding to the first video image (hereinafter referred to as the first shooting scene for distinction).

[0111] The shooting scenes can be categorized by camera; for example, video images captured by one camera correspond to one shooting scene. Alternatively, shooting scenes can be categorized by the scene area captured by the camera; for example, video images captured by multiple cameras of the same scene area correspond to one shooting scene, while video images captured by one camera of different scene areas correspond to different shooting scenes. By establishing different scene material libraries for different shooting scenes, alarm target detection models adapted to the shooting scenes can be trained using these scene material libraries, thereby improving the detection accuracy of the alarm target detection models.

[0112] The camera can either store a scene material library locally and retrain the first alarm target detection model locally using the scene material library, or upload the training material to a server for retraining. Alternatively, when the execution entity of the video alarm method in this embodiment is the server, the server can store the scene material library and retrain the first alarm target detection model on the server.

[0113] In a specific implementation, when retraining the first alarm target detection model, a basic material library and a scene material library corresponding to the first shooting scene can be used together to retrain the first alarm target detection model. The basic material library can be training materials collected regardless of the shooting scene.

[0114] In a specific implementation, the first alarm target detection model may be retrained only when the retraining condition is met. The retraining condition may be that the training material in the scene material library corresponding to the first shooting scene reaches a certain quantity, or it may be that a manually triggered retraining instruction is received.

[0115] Step A20: After obtaining the second alarm target detection model obtained by retraining the first alarm target detection model based on the scene material library, the second alarm target detection model is used to replace the first alarm target detection model, and the second alarm target detection model is used to detect the third video image newly acquired in the first shooting scene.

[0116] The alarm target detection model obtained after retraining the first alarm target detection model is referred to as the second alarm target detection model for distinction. It should be noted that the second alarm target detection model has the same model structure as the first alarm target detection model, but the specific values ​​of the model parameters may differ.

[0117] Once the camera acquires the second alarm target detection model, it can replace the first alarm target detection model. That is, when detecting the subsequently acquired video images (hereinafter referred to as the third video image for distinction), the second alarm target detection model is used to detect the third video image.

[0118] In a specific implementation, after the second alarm target detection model is trained, it can be verified using a verification material library to obtain the detection accuracy of the second alarm target detection model. Only when the detection accuracy is greater than a certain threshold, or when the detection accuracy is greater than the detection accuracy of the first alarm target detection model, will the second alarm target detection model replace the first alarm target detection model.

[0119] Furthermore, in one embodiment, the server can store a scene material library corresponding to various shooting scenarios. When retraining conditions are met, the alarm target detection model for the corresponding shooting scenario is retrained using the scene material library. The retrained alarm target detection model, the adapted algorithm version, the adapted shooting scenario, and the model's detection accuracy are stored in the model library. The server can send a model update command to the camera corresponding to a shooting scenario when it receives a manually triggered command or detects that the model in the model library for a certain shooting scenario has a higher accuracy than the model deployed in the camera. When the camera meets the model update conditions, it downloads a new model from the server. After passing data packet integrity checks and algorithm version compatibility checks, the new model replaces the old model. Furthermore, in one embodiment, if the new model fails to run, the camera can revert to using the old version of the model. Furthermore, in one embodiment, if the new model fails to detect a target for an extended period after running, the camera can also revert to using the old version of the model. Furthermore, in one embodiment, at least two versions of the model can be retained in the camera, namely the previously working model and the newly downloaded model. If it is confirmed that the downloaded model has not malfunctioned after a long period of testing, the previously working model can be deleted to reduce the cost of model management.

[0120] It should be noted that in this embodiment, by establishing a scene material library and retraining the alarm target detection model using this library, the old alarm target detection model can be continuously optimized and its detection accuracy improved. Furthermore, by using the second confidence level corresponding to the first target as training material instead of the first confidence level, the alarm target detection model retrained with this material can further learn to identify false alarm targets, thus reducing the false alarm rate.

[0121] Furthermore, in one embodiment, after the step of replacing the first alarm target detection model with the second alarm target detection model in step A20, the method further includes:

[0122] Step A30: The second alarm target detection model is used to detect the fourth video image containing the fourth target, and the model feature value in the feature group corresponding to the fourth target is updated using the feature value generated during the detection process. The fourth target is a false alarm target whose corresponding feature group contains the model feature value.

[0123] To ensure that the model feature values ​​of the first target and the false alarm target are generated using the same model, thereby guaranteeing the accuracy of detecting whether the first target is a false alarm target, in this embodiment, after the camera replaces the first alarm target detection model with the second alarm target detection model, the camera can use the second alarm target detection model to detect the video image containing the fourth target (hereinafter referred to as the fourth video image for distinction), and update the model feature values ​​in the feature group corresponding to the fourth target using the feature values ​​generated during detection. Here, the fourth target is a false alarm target whose feature group contains model feature values. The fourth video image can be the video image in which the fourth target is detected.

[0124] Further, in one embodiment, step A10 includes:

[0125] Step A101: Extract the image region corresponding to the fifth target from the first video image according to the location information corresponding to the fifth target, wherein the fifth target is any of the third targets;

[0126] In this embodiment, the image region corresponding to the fifth target can be extracted from the first video image based on the location information corresponding to the fifth target. Here, the fifth target can be any third target.

[0127] Step A102: When the third confidence level corresponding to the fifth target is greater than or equal to the first threshold, the image region is marked with an alarm target and added to the scene material library as a training material. Wherein, when the fifth target is the first target, the third confidence level is the second confidence level corresponding to the fifth target; when the fifth target is a target other than the first target among the third targets, the third confidence level is the first confidence level corresponding to the fifth target.

[0128] When the fifth target is the first target, meaning the fifth target is determined to be the target requiring an alarm based on the detection results, this fifth target has a first confidence level and a second confidence level. In this case, the second confidence level is used as the third confidence level for the fifth target, and the labeling of the image region corresponding to the fifth target is determined based on the third confidence level. When the fifth target is a target other than the first target among the third targets, meaning the fifth target is determined to be the target not requiring an alarm based on the detection results, this fifth target only has a first confidence level. In this case, the first confidence level is used as the third confidence level for the fifth target, and the labeling of the image region corresponding to the fifth target is determined based on the third confidence level. It should be noted that the labels on the image regions are used as training labels in the training material.

[0129] The third confidence level corresponding to the fifth target can be compared with the first and second thresholds. The first and second thresholds can be set as needed, with the first threshold being greater than the second threshold. When the third confidence level is greater than or equal to the first threshold, it indicates that the fifth target is highly likely to be a target requiring an alarm. At this time, the image region corresponding to the fifth target can be marked as an alarm target, and the image region marked as an alarm target can be added to the scene material library as a training material.

[0130] Step A103: When the third confidence level is less than the first threshold and greater than the second threshold, the third alarm target detection model is used to detect the image region to obtain the fourth confidence level corresponding to the fifth target. The image region is then marked with a tag corresponding to the fourth confidence level and added to the scene material library as a training material. The model complexity of the third alarm target detection model is greater than that of the first alarm target detection model.

[0131] When the third confidence level is less than the first threshold or greater than the second threshold, it indicates that the fifth target is relatively likely to be a target requiring an alarm, but it cannot be confirmed that the fifth target is a target that requires an alarm.

[0132] At this point, the third alarm target detection model can be used to detect the image region corresponding to the fifth target, obtaining the confidence score corresponding to the fifth target (hereinafter referred to as the fourth confidence score for distinction). The image region corresponding to the fifth target is then labeled with the tag corresponding to the fourth confidence score and used as training material.

[0133] Add the fifth target to the scene material library. For example, when the fourth confidence level is greater than a certain threshold (which can be set as needed), it can be determined that the fifth target is a target that needs to be alarmed. The image region corresponding to the fifth target is marked as an alarm target and added to the scene material library as a training material. When the fourth confidence level is less than the threshold, it can be determined that the fifth target is not a target that needs to be alarmed. The image region corresponding to the fifth target is marked as a non-alarm target and added to the scene material library as a training material.

[0134] The model complexity of the third alarm target detection model is 5 degrees greater than that of the first alarm target detection model, and its detection accuracy is also higher than that of the first alarm target detection model. Therefore, using the third alarm target detection model to reanalyze the fifth target with a relatively low confidence level can achieve automated collection of training materials and also ensure the quality of training materials in the scene-based material library.

[0135] Furthermore, when the third confidence level corresponding to the fifth target is less than or equal to the second threshold, the image region can be discarded, or the image region can be marked as a non-alarm target and added to the scene material library as a training material.

[0136] Further, in one embodiment, the step A10 of adding the training material to the scene material library of the first shooting scene corresponding to the first video image includes:

[0137] Step A104: Upload the training materials to the server so that the server can add the training materials to the scene material library. When the materials in the scene material library meet the retraining conditions, 5 the first alarm target detection model is retrained using the scene material library and the basic material library to obtain the second alarm target detection model.

[0138] In this embodiment, the camera can upload training materials to the server, which then adds the training materials to the scene material library. It should be noted that the server can also use the methods described in steps A101 to A03 above.

[0139] The training materials are added to the scene material library in a specific manner. The server can retrain the first alarm target detection model using both the scene material library and the basic material library when the materials in the scene material library meet the zero-retraining condition. The retraining condition can be that the training materials in the scene material library corresponding to the first shooting scene reach a certain quantity, or it can be a manually triggered retraining command received.

[0140] In step A20, after obtaining the second alarm target detection model obtained by retraining the first alarm target detection model based on the scene material library, the step of replacing the first alarm target detection model with the second alarm target detection model includes:

[0141] Step A201: After the second alarm target detection model is downloaded from the server, the algorithm version compatibility test and data packet integrity test are performed on the second alarm target detection model.

[0142] After the camera downloads the second alarm target detection model from the server, it can perform algorithm version compatibility testing and data packet integrity testing on the second alarm target detection model. Algorithm version compatibility testing checks whether the version of the algorithm running in the camera's model is suitable for the downloaded second alarm target detection model. Data packet integrity testing monitors whether the data packet of the downloaded second alarm target detection model is complete.

[0143] Step A202: After both the algorithm version compatibility test and the data packet integrity test pass, the first alarm target detection model is replaced with the second alarm target detection model.

[0144] Once the algorithm version compatibility test and data packet integrity test are both passed, the camera can replace the first alarm target detection model with the second alarm target detection model.

[0145] Furthermore, if the algorithm version compatibility test or the data packet integrity test fails, the camera can delete the downloaded second alarm target detection model and still use the first alarm target detection model to detect subsequent video images.

[0146] It should be noted that, in specific implementations, when both model retraining and training material analysis are performed in the camera, they can be done when the camera's computing resources are idle.

[0147] Furthermore, embodiments of the present invention also propose a video alarm device, referring to... Figure 3 The video alarm device includes:

[0148] Detection module 10 is used to detect the first acquired video image using the first alarm target detection model and obtain the detection result;

[0149] The acquisition module 20 is used to acquire a first feature group when it is determined that a first target exists in the first video image, wherein the first target is a target that needs to be alarmed based on the detection result, the first feature group is a feature group corresponding to the first target, and the first feature group includes at least the time feature value, the location feature value and the model feature value corresponding to the first target;

[0150] Matching module 30 is used to match feature values ​​of the same type in the first feature group and the second feature group to obtain a matching result. The second feature group is the feature group corresponding to the second target. The second target is a false alarm target manually marked by the author for the second video image collected in history. The second feature group includes at least one or more feature values ​​manually selected from the time feature value, location feature value and model feature value corresponding to the second target.

[0151] The determination module 40 is used to determine the alarm analysis result of the first target based on the matching result between the first feature group and the feature group corresponding to at least one false alarm target;

[0152] Output module 50 is used to output alarm information corresponding to the first target when it is determined from the alarm analysis results that an alarm needs to be triggered on the first target.

[0153] Furthermore, the acquisition module 20 is also used for:

[0154] Generate a time feature value corresponding to the first target based on the acquisition time of the first video image;

[0155] Based on the position information of the first target on the first video image in the detection result, a position feature value corresponding to the first target is generated;

[0156] The feature value corresponding to the first target generated during the detection of the first video image using the first alarm target detection model is obtained and used as the model feature value corresponding to the first target.

[0157] Furthermore, the matching module 30 is also used for:

[0158] Calculate the feature value matching degree between feature values ​​of the same type in the first feature group and the second feature group;

[0159] The matching degree of each feature value in the second feature group is summed by weighting the corresponding weights of each feature value in the second feature group to obtain the matching degree between the first feature group and the second feature group. The matching degree is used as the matching result. The weighting weights are set manually for the feature values ​​in the second feature group.

[0160] Furthermore, the video alarm device also includes:

[0161] A new module is added to the module when a false alarm confirmation message is received from a human to the alarm information, and to the first target is added as a false alarm target, and the type of false alarm feature value selected by the human to the first target is determined according to the false alarm confirmation message.

[0162] The selection module is used to select feature values ​​of the same type as the false alarm feature values ​​from the first feature group, and use them as the feature group corresponding to the newly added false alarm target.

[0163] Furthermore, the detection result includes the location information and first confidence level of each third target in the first video image, and the alarm analysis result includes the second confidence level of the first target. The first confidence level and the second confidence level are used to characterize the probability that the corresponding target belongs to the target that needs to be alarmed.

[0164] The video alarm device also includes:

[0165] An addition module is used to take the first video image, the location information corresponding to each of the third targets, the first confidence level corresponding to each of the third targets other than the first target, and the second confidence level corresponding to the first target as training materials, and add the training materials to the scene material library of the first shooting scene corresponding to the first video image;

[0166] The replacement module is used to replace the first alarm target detection model with the second alarm target detection model after obtaining the second alarm target detection model obtained by retraining the first alarm target detection model based on the scene material library, and to detect the third video image newly acquired in the first shooting scene using the second alarm target detection model.

[0167] Furthermore, the video alarm device also includes:

[0168] The update module is used to detect the fourth video image containing the fourth target using the second alarm target detection model, and to update the model feature value in the feature group corresponding to the fourth target using the feature value generated during the detection process, wherein the fourth target is a false alarm target whose corresponding feature group contains model feature values.

[0169] Furthermore, the adding module is also used for:

[0170] Based on the location information corresponding to the fifth target, the image region corresponding to the fifth target is extracted from the first video image, wherein the fifth target is any of the third targets;

[0171] When the third confidence level corresponding to the fifth target is greater than or equal to the first threshold, the image region is marked with an alarm target and added to the scene material library as a training material. When the fifth target is the first target, the third confidence level is the second confidence level corresponding to the fifth target. When the fifth target is a target other than the first target among the third targets, the third confidence level is the first confidence level corresponding to the fifth target.

[0172] When the third confidence level is less than the first threshold and greater than the second threshold, the third alarm target detection model is used to detect the image region to obtain the fourth confidence level corresponding to the fifth target. The image region is then marked with a tag corresponding to the fourth confidence level and added to the scene material library as a training material. The model complexity of the third alarm target detection model is greater than that of the first alarm target detection model.

[0173] Furthermore, the adding module is also used for:

[0174] The training materials are uploaded to the server so that the server can add the training materials to the scene material library. When the materials in the scene material library meet the retraining conditions, the first alarm target detection model is retrained using the scene material library and the basic material library to obtain the second alarm target detection model.

[0175] The replacement module is also used for:

[0176] After the second alarm target detection model is downloaded from the server, algorithm version compatibility and data packet integrity are checked on the second alarm target detection model.

[0177] Once both the algorithm version compatibility test and the data packet integrity test pass, the second alarm target detection model replaces the first alarm target detection model.

[0178] The extended content of the specific implementation of the video alarm device of the present invention is basically the same as the above-described embodiments of the video alarm method, and will not be repeated here.

[0179] Furthermore, embodiments of the present invention also propose a computer-readable storage medium storing a video alarm program, wherein the video alarm program, when executed by a processor, implements the steps of the video alarm method described below.

[0180] The various embodiments of the video alarm device and computer-readable storage medium of the present invention can be referred to the various embodiments of the video alarm method of the present invention, and will not be repeated here.

[0181] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0182] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0183] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0184] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.

Claims

1. A video alarm method, characterized in that, The video alarm method includes the following steps: The first video image was detected using the first alarm target detection model, and the detection results were obtained. When it is determined that a first target exists in the first video image, a first feature group is obtained, wherein the first target is a target that needs to be alarmed according to the detection result, the first feature group is a feature group corresponding to the first target, and the first feature group includes at least the time feature value, the position feature value and the model feature value corresponding to the first target, wherein the time feature value represents the feature of the first target in the time of appearance, the position feature value represents the feature of the first target in the position of appearance in the first video image, and the model feature value represents the feature of the appearance of the first target in the first video image; The first feature group and the second feature group are matched with the same type of feature values ​​to obtain the matching result. The second feature group is the feature group corresponding to the second target. The second target is a false alarm target marked by the human in the second video image collected in history. The second feature group includes at least one or more feature values ​​selected by the human from the time feature value, position feature value and model feature value corresponding to the second target. Based on the matching results between the first feature group and the feature group corresponding to at least one false alarm target, the alarm analysis result of the first target is determined; When it is determined from the alarm analysis results that an alarm needs to be triggered on the first target, the alarm information corresponding to the first target is output.

2. The video alarm method as described in claim 1, characterized in that, The step of obtaining the first feature group includes: Generate a time feature value corresponding to the first target based on the acquisition time of the first video image; Based on the position information of the first target on the first video image in the detection result, a position feature value corresponding to the first target is generated; The feature value corresponding to the first target generated during the detection of the first video image using the first alarm target detection model is obtained and used as the model feature value corresponding to the first target.

3. The video alarm method as described in claim 1, characterized in that, The step of matching feature values ​​of the same type in the first feature group and the second feature group to obtain the matching result includes: Calculate the feature value matching degree between feature values ​​of the same type in the first feature group and the second feature group; The matching degree of each feature value in the second feature group is summed by weighting the corresponding weights of each feature value in the second feature group to obtain the matching degree between the first feature group and the second feature group. The matching degree is used as the matching result. The weighting weights are set manually for the feature values ​​in the second feature group.

4. The video alarm method as described in claim 1, characterized in that, After the step of outputting the alarm information corresponding to the first target, the method further includes: When a false alarm confirmation message is received from a human regarding the alarm information, the first target is added as a new false alarm target, and the type of false alarm feature value selected by the human for the first target is determined based on the false alarm confirmation message. Select feature values ​​of the same type as the false alarm feature values ​​from the first feature group, and use them as the feature group corresponding to the newly added false alarm target.

5. The video alarm method according to any one of claims 1 to 4, characterized in that, The detection result includes the location information and first confidence level of each third target in the first video image, and the alarm analysis result includes the second confidence level of the first target. The first confidence level and the second confidence level are used to characterize the probability that the corresponding target belongs to the target that needs to be alarmed. After the step of determining the alarm analysis result of the first target based on the matching result between the first feature group and the feature group corresponding to at least one false alarm target, the method further includes: The first video image, the location information corresponding to each of the third targets, the first confidence level of each of the third targets other than the first target, and the second confidence level of the first target are used as training materials. The training materials are added to the scene material library of the first shooting scene corresponding to the first video image. After obtaining the second alarm target detection model obtained by retraining the first alarm target detection model based on the scene material library, the second alarm target detection model is used to replace the first alarm target detection model, and the second alarm target detection model is used to detect the third video image newly acquired in the first shooting scene.

6. The video alarm method as described in claim 5, characterized in that, After the step of replacing the first alarm target detection model with the second alarm target detection model, the method further includes: The second alarm target detection model is used to detect the fourth video image containing the fourth target, and the model feature value in the feature group corresponding to the fourth target is updated using the feature value generated during the detection process. The fourth target is a false alarm target whose corresponding feature group contains the model feature value.

7. The video alarm method as described in claim 5, characterized in that, The step of using the first video image, the location information corresponding to each of the third targets, the first confidence level corresponding to each of the third targets other than the first target, and the second confidence level corresponding to the first target as training materials, and adding the training materials to the scene material library of the first shooting scene corresponding to the first video image includes: Based on the location information corresponding to the fifth target, the image region corresponding to the fifth target is extracted from the first video image, wherein the fifth target is any of the third targets; When the third confidence level corresponding to the fifth target is greater than or equal to the first threshold, the image region is marked with an alarm target and added to the scene material library as a training material. When the fifth target is the first target, the third confidence level is the second confidence level corresponding to the fifth target. When the fifth target is a target other than the first target among the third targets, the third confidence level is the first confidence level corresponding to the fifth target. When the third confidence level is less than the first threshold and greater than the second threshold, the third alarm target detection model is used to detect the image region to obtain the fourth confidence level corresponding to the fifth target. The image region is then marked with a tag corresponding to the fourth confidence level and added to the scene material library as a training material. The model complexity of the third alarm target detection model is greater than that of the first alarm target detection model.

8. The video alarm method as described in claim 5, characterized in that, The step of adding the training material to the scene material library of the first shooting scene corresponding to the first video image includes: The training materials are uploaded to the server so that the server can add the training materials to the scene material library. When the materials in the scene material library meet the retraining conditions, the first alarm target detection model is retrained using the scene material library and the basic material library to obtain the second alarm target detection model. The step of replacing the first alarm target detection model with the second alarm target detection model after obtaining the second alarm target detection model obtained by retraining the first alarm target detection model based on the scene material library includes: After the second alarm target detection model is downloaded from the server, algorithm version compatibility and data packet integrity are checked on the second alarm target detection model. Once both the algorithm version compatibility test and the data packet integrity test pass, the second alarm target detection model replaces the first alarm target detection model.

9. A video alarm device, characterized in that, The video alarm device includes: The detection module is used to detect the first alarm target in the acquired first video image using the first alarm target detection model and obtain the detection result; The acquisition module is used to acquire a first feature group when it is determined that a first target exists in the first video image, wherein the first target is a target that needs to be alarmed according to the detection result, the first feature group is a feature group corresponding to the first target, and the first feature group includes at least a time feature value, a position feature value and a model feature value corresponding to the first target, wherein the time feature value represents the feature of the first target in the time of appearance, the position feature value represents the feature of the position of the first target in the first video image, and the model feature value represents the feature of the appearance of the first target in the first video image; The matching module is used to match feature values ​​of the same type in the first feature group and the second feature group to obtain a matching result. The second feature group is the feature group corresponding to the second target. The second target is a false alarm target manually marked by the author for the second video image collected in history. The second feature group includes at least one or more feature values ​​manually selected from the time feature value, location feature value and model feature value corresponding to the second target. The determination module is used to determine the alarm analysis result of the first target based on the matching result between the first feature group and the feature group corresponding to at least one false alarm target; The output module is used to output alarm information corresponding to the first target when it is determined from the alarm analysis results that an alarm needs to be triggered on the first target.

10. A video alarm device, characterized in that, The video alarm device includes: a memory, a processor, and a video alarm program stored in the memory and executable on the processor, wherein the video alarm program, when executed by the processor, implements the steps of the video alarm method as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Video alarm method and video alarm device

    CN104700532A

  • Alarm method and device

    CN105279898A