Artificial intelligence target detection method and device based on dynamic threshold adaptive adjustment

By introducing a dynamic threshold adaptive adjustment method in the object detection, the time window queue is used to record the time interval of the object detection and adjust the threshold, the problems of low environmental adaptability, high error rate and low efficiency caused by the fixed threshold in the prior art are solved, and more efficient and accurate object detection is achieved.

CN119888268AActive Publication Date: 2025-04-25SHENZHEN ZHUOYUE ZHIYUN TECHNOLOGY CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411971774.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-04-25
Estimated Expiration
2044-12-30

AI Technical Summary

Technical Problem

Due to the fixed threshold, the existing target detection methods have problems such as low environmental adaptability, high error rate, low efficiency and waste of resources.

Method used

By introducing a dynamic threshold adaptive adjustment method in object detection, the time window queue is used to record the time interval of object detection, and the time window threshold is dynamically adjusted according to the mean to adapt to changes in different scenarios and environments.

Benefits of technology

It improves the accuracy and efficiency of target detection, reduces false detection and missed detection, optimizes the use of computing resources, and adapts to a variety of complex target detection scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119888268A_ABST
    Figure CN119888268A_ABST
Patent Text Reader

Abstract

The invention provides an artificial intelligence target detection method and device based on dynamic threshold adaptive adjustment. The method comprises the following steps: initializing a time window queue; acquiring data through an acquisition module; receiving target detection data through a target detection module, and recording a time interval between the target detection data and the previous target detection data; updating a time window queue according to the time interval; calculating a mean value of the time window queues; judging whether to adjust a time window threshold according to the mean value; if yes, dynamically adjusting the threshold value according to the mean value and the time interval; performing target detection according to the adjustment threshold; and post-processing the detection result and displaying the detection result on a display screen. According to the invention, the threshold value can be dynamically adjusted, false detection and missing detection are avoided, the accuracy of target detection is improved, and the detection precision is improved; and the requirements of different environments and time periods are met. Detection targets with low confidence can be screened, redundant calculation is avoided, and resource waste is avoided. The method can adapt to various target detection scenes, and the adaptive capacity is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer vision technology, and in particular to an artificial intelligence target detection method and device based on dynamic threshold adaptive adjustment. Background Art

[0002] Object detection is one of the core tasks in computer vision, which aims to identify and locate target objects in images or videos. In practical applications, the object detection model processes the input image through a neural network and outputs information such as the target location, category, and confidence.

[0003] Most existing object detection methods use a fixed threshold to determine whether an object is a valid detection. These methods set a fixed confidence threshold when processing objects in an image, and only detection boxes with a confidence score higher than the threshold are considered valid objects. In many common object detection algorithms, a preset fixed threshold is usually used to filter the candidate boxes output by the model.

[0004] However, the use of fixed thresholds for target determination is difficult to adapt to changes in different scenes and environments. For example, factors such as illumination changes, image noise, and target density will affect the detection effect of the target. In complex scenes, the use of fixed thresholds may lead to false positives or false negatives. On the other hand, traditional target detection methods cannot automatically adjust the threshold according to real-time environmental changes. When the detection scene changes, the fixed threshold is no longer applicable, resulting in reduced detection performance and inability to effectively adapt to environmental changes. In addition, due to the use of fixed thresholds, the target detection model needs to process all candidate boxes regardless of whether they will become valid targets, which will waste computing resources, especially when there are many low-confidence detection boxes. On the other hand, existing methods usually use a global fixed threshold to adapt to all targets, which is difficult to handle complex tasks with large differences in target morphology, size, and category, especially when there are many types of targets in the scene and there is a lot of background noise, which will lead to reduced accuracy.

[0005] In summary, the existing target detection methods have problems such as low environmental adaptability, high error rate, low efficiency and waste of resources due to the fixed threshold. Therefore, how to dynamically adjust the target detection threshold according to different scenarios and improve the detection performance has become a key issue to be solved in target detection. Summary of the invention

[0006] The present invention aims to solve the problems of low environmental adaptability, high error rate, low efficiency and waste of resources in target detection in the above-mentioned prior art due to fixed thresholds, and to provide an artificial intelligence target detection method and device based on dynamic threshold adaptive adjustment.

[0007] The present invention provides an artificial intelligence target detection method based on dynamic threshold adaptive adjustment, comprising the following steps:

[0008] Preprocessing: initializing a time window queue; wherein the time window queue includes a plurality of elements;

[0009] Collect data through a preset acquisition module to obtain target detection data;

[0010] Receiving the target detection data through a preset target detection module, and recording the time interval between the target detection data and the previous target detection data;

[0011] updating the time window queue according to the time interval;

[0012] Calculate the mean of the time window queue; wherein the mean is the average value of all elements in the time window queue;

[0013] Determine whether to adjust the preset time window threshold according to the mean;

[0014] If yes, dynamically adjusting the threshold according to the mean value and the time interval to obtain an adjusted threshold;

[0015] Perform target detection according to the adjustment threshold to obtain a detection result;

[0016] The detection results are post-processed and presented on a preset display screen.

[0017] Furthermore, the preprocessing: the step of initializing the time window queue includes:

[0018] The time window queue is populated.

[0019] Furthermore, the step of filling the time window queue includes:

[0020] The time window queue is filled with a preset maximum time window value.

[0021] Furthermore, before the step of receiving a detection target and recording the time interval between the detection target and a previous detection target, the step includes:

[0022] Determining whether the target confidence of the detected target is greater than a preset confidence threshold;

[0023] If so, the time interval between the current target detection time and the previous target detection time is recorded, and the detected target is transmitted.

[0024] Furthermore, before the step of determining whether the target confidence of the detected target is greater than a preset confidence threshold, the step includes:

[0025] Performing data preprocessing on the detection target; the data preprocessing includes but is not limited to size adjustment, color space conversion, denoising and grayscale;

[0026] The confidence score of each detected target is calculated using a preset target detection algorithm.

[0027] Further, the step of updating the time window queue according to the time interval includes:

[0028] The tail of the time window queue is updated according to the time interval; wherein the time interval includes a minimum time window value and a maximum time window value.

[0029] Further, the step of updating the tail of the time window queue according to the time interval includes:

[0030] Determine whether the time interval is greater than the maximum time window value;

[0031] If yes, then add an integer of the maximum time window value to the end and reset the time interval;

[0032] If not, the time interval is filled into the time window queue.

[0033] Furthermore, the step of determining whether to adjust the preset time window threshold according to the mean value includes:

[0034] comparing the mean with the time window threshold;

[0035] If the mean is greater than the time window threshold, no adjustment is made;

[0036] If the mean is less than the time window threshold, the time window threshold is adjusted to obtain an adjusted threshold.

[0037] Furthermore, if the mean is less than the time window threshold, the time window threshold is adjusted, and the step of obtaining the adjusted threshold includes:

[0038] The adjustment formula of the time window threshold is:

[0039]

[0040] Among them, new_threshold represents the adjustment threshold, default_threshold represents the confidence threshold; mean represents the mean; WINDOW_THRESH represents the time window threshold; WINDOW_VALUE_MIN represents the minimum time window value.

[0041] The present invention also provides an artificial intelligence target detection device based on dynamic threshold adaptive adjustment, comprising:

[0042] An acquisition module, used for acquiring data to obtain target detection data;

[0043] Preprocessing module, used to initialize the time window queue;

[0044] A target detection module, configured to receive the target detection data, record the time interval between the target detection data and the previous target detection data, and perform target detection according to the adjustment threshold to obtain a detection result;

[0045] An updating module, configured to update the time window queue according to the time interval;

[0046] A mean calculation module, used to calculate the mean of the time window queue;

[0047] A first judgment module, used to judge whether to adjust a preset time window threshold according to the mean value;

[0048] a dynamic threshold adjustment module, configured to dynamically adjust the threshold according to the mean value and the time interval to obtain an adjusted threshold;

[0049] A post-processing module, used for post-processing the detection result;

[0050] The display module is used to present the detection result on a preset display screen.

[0051] The present invention also provides a computer device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor executes the computer program to implement the steps in any one of the above methods.

[0052] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above methods are implemented.

[0053] The present invention provides an artificial intelligence target detection method and device based on dynamic threshold adaptive adjustment, which has the following beneficial effects:

[0054] By adaptively adjusting the threshold to optimize target detection, the threshold can be adjusted dynamically to avoid false detection and missed detection, improve the accuracy of target detection, and improve detection precision; based on the mechanism of time window queue, the threshold can be adaptively adjusted to meet the needs of different environments and time periods. It can screen detection targets with low confidence, avoid redundant calculations, improve efficiency, optimize computing resources, and avoid resource waste. It can adapt to a variety of complex target detection scenarios, has strong adaptability, and has scalability and broad application prospects. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Figure 1 A schematic diagram of the method steps of the artificial intelligence target detection method based on dynamic threshold adaptive adjustment in the present invention;

[0056] Figure 2 It is a structural block diagram of an artificial intelligence target detection device based on dynamic threshold adaptive adjustment in the present invention;

[0057] Figure 3 A structural block diagram of a computer device of the present invention;

[0058] Figure 4 A schematic diagram of a flow chart of an embodiment of an artificial intelligence target detection method based on dynamic threshold adaptive adjustment of the present invention;

[0059] Figure 5 The present invention is a practical working diagram of an embodiment of an artificial intelligence target detection method based on dynamic threshold adaptive adjustment.

[0060] Marking description: acquisition module 10, pre-processing module 20, target detection module 30, update module 40, mean calculation module 50, first judgment module 60, dynamic threshold adjustment module 70, post-processing module 80, display module 90. DETAILED DESCRIPTION

[0061] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0062] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0063] Reference Figure 1 , is an artificial intelligence target detection method based on dynamic threshold adaptive adjustment in an embodiment of the present invention, comprising:

[0064] S1, preprocessing: initializing a time window queue; wherein the time window queue includes multiple elements;

[0065] S2, collecting data through a preset collection module 10 to obtain target detection data;

[0066] S3, receiving target detection data through a preset target detection module 30, and recording the time interval between the target detection data and the previous target detection data;

[0067] S4, update the time window queue according to the time interval;

[0068] S5, calculating the mean of the time window queue; wherein the mean is the average value of all elements in the time window queue;

[0069] S6, judging whether to adjust the preset time window threshold according to the mean value;

[0070] S7, if yes, dynamically adjust the threshold according to the mean value and the time interval to obtain an adjusted threshold;

[0071] S8, performing target detection according to the adjusted threshold value to obtain a detection result;

[0072] S9, post-processing the detection results and presenting them on a preset display screen.

[0073] In the above steps, the time window queue is first preprocessed, wherein the time window queue includes multiple elements, and the time window queue represents the time interval size in the target detection process. The element is an integer between the minimum time window value and the maximum time window value. Specifically, the dynamic threshold adaptive adjustment mechanism is based on a time window queue of size WINDOW_MAX_LENGTH, and the elements of the queue are integers between WINDOW_VALUE_MIN and WINDOW_VALUE_MAX, that is, integers between the minimum time window value and the maximum time window value, and are used to represent the time interval size of target detection. The queue can be used to record the time interval in target detection and dynamically adjust the threshold based on the time interval. Then, the preset acquisition module 10 is used to obtain the target detection data; the target detection data is received by the preset target detection module 30, and the time interval between the target detection data and the previous target detection data is recorded. Then the time window queue is updated according to the time interval. The mean of the time window queue is calculated again, wherein the mean is the average value of all elements in the time window queue. According to the mean, it is judged whether to adjust the time window threshold. If so, the threshold is dynamically adjusted according to the mean and the time interval to obtain the adjusted threshold. Then, target detection is performed according to the threshold to obtain the detection result. Finally, the detection result is post-processed and presented on a preset display screen.

[0074] The present application sets a time window queue mechanism to dynamically adjust the threshold of target detection, and adjusts the threshold according to real-time feedback of target detection, thereby improving the accuracy and robustness of target detection, wherein robustness refers to the ability to maintain stable function operation in the face of changes in internal structure or external environment.

[0075] In one embodiment, preprocessing: the step of initializing the time window queue includes:

[0076] Fill the time window queue.

[0077] The steps to fill the time window queue include:

[0078] Fill the time window queue with the preset maximum time window value.

[0079] In this embodiment, the time window queue is first initialized, that is, when the target detection program starts to execute, the time window queue is first filled, and the time window queue is filled with an integer of WINDOW_VALUE_MAX, where WINDOW_VALUE_MAX is the maximum time window value. That is, the initial value of all elements of the time window queue is WINDOW_VALUE_MAX. At this time, the target detection time interval for each time period is WINDOW_VALUE_MAX seconds.

[0080] In one embodiment, before the step of receiving a detection target and recording the time interval between the detection target and a previous detection target, the method includes:

[0081] Determine whether the target confidence of the detected target is greater than a preset confidence threshold;

[0082] If yes, the time interval between the current target detection time and the previous target detection time is recorded, and the detected target is transmitted.

[0083] In this embodiment, in order to ensure that only high-confidence detection targets are processed to avoid waste of resources, the detection targets will be screened according to the set confidence threshold. When the confidence of the detection target is higher than the set confidence threshold, the detection target will be identified as a valid target and marked or transmitted to the post-processing module 80. If it is lower than the set confidence threshold, it will be discarded or ignored to avoid false detection, improve the accuracy of target detection, and reduce the processing of invalid detection frames to avoid waste of computing resources. In a specific embodiment, it can also be combined with non-maximum suppression (NMS) to further remove low-confidence frames with higher overlap, thereby improving the accuracy and efficiency of target detection.

[0084] More specifically, each time a target is detected, it is determined that the confidence of the target is greater than a preset confidence threshold value default_threshold, and the time interval between the current target detection and the last target detection is recorded.

[0085] In one embodiment, before the step of determining whether the target confidence of the detected target is greater than a preset confidence threshold, the following steps are included:

[0086] Perform data preprocessing on the detection target; data preprocessing includes but is not limited to size adjustment, color space conversion, denoising and grayscale;

[0087] The confidence score of each detected target is calculated using a preset target detection algorithm.

[0088] In this embodiment, the target detection module 30 receives data from a camera or other video stream input device in real time, and can obtain high-quality image streams or video streams and input them into the target detection task. The data transmission is carried out in real time to ensure that the image frames in the video stream can be quickly obtained. After each frame of the image is obtained, the image is first preprocessed, and the preprocessing methods include but are not limited to image resizing, color space conversion, denoising and grayscale operations. It can reduce interference in the image, improve the quality of image data, and provide clear input for subsequent target detection algorithms.

[0089] The preprocessed image is transmitted and then analyzed according to a preset target detection algorithm, which includes YOLO (You Only Look Once), SSD (Single Shot Multibox Detector), DETR (Detection Transformer) or other learning models. After training, the model can recognize various targets in the image and generate corresponding detection boxes and confidence scores. During the target detection process, the target detection algorithm will identify multiple detection targets and calculate a confidence score for each detection target to indicate the probability that the detection target is a preset target category.

[0090] In one embodiment, the step of updating the time window queue according to the time interval includes:

[0091] The tail of the time window queue is updated according to the time interval; wherein the time interval includes a minimum time window value and a maximum time window value.

[0092] The step of updating the tail of the time window queue according to the time interval includes:

[0093] Determine whether the time interval is greater than the maximum time window value;

[0094] If yes, add an integer of the maximum time window value to the end and reset the time interval;

[0095] If not, fill the time interval into the time window queue.

[0096] In this embodiment, the minimum time window value is the minimum time window value, and the maximum time window value is the maximum time window value. The minimum time window value is WINDOW_VALUE_MIN, and the maximum time window value is WINDOW_VALUE_MAX. If the time interval between two target detections exceeds WINDOW_VALUE_MAX seconds, an integer with a value of WINDOW_VALUE_MAX is added to the time window queue. If the time interval between target detections is less than WINDOW_VALUE_MAX seconds, the time window queue is filled according to the actual time interval.

[0097] In one embodiment, the step of determining whether to adjust the preset time window threshold according to the mean value includes:

[0098] Compare the mean to the time window threshold;

[0099] If the mean is greater than the time window threshold, no adjustment is made;

[0100] If the mean is less than the time window threshold, the time window threshold is adjusted to obtain the adjusted threshold.

[0101] In this embodiment, the calculated mean, that is, the average value of all elements in the time window queue, is compared with the preset time window threshold. If the mean is greater than the time window threshold (WINDOW_THRESH), no adjustment is made. If the mean is less than the time window threshold (WINDOW_THRESH), an adjustment is made.

[0102] In one embodiment, if the mean is less than the time window threshold, the time window threshold is adjusted, and the step of obtaining the adjusted threshold includes:

[0103] The adjustment formula for the time window threshold is:

[0104]

[0105] Among them, new_threshold represents the adjustment threshold, default_threshold represents the confidence threshold, mean represents the mean, WINDOW_THRESH represents the time window threshold, and WINDOW_VALUE_MIN represents the minimum time window value.

[0106] In this embodiment, it can be seen from the formula that when the mean of the time window queue is less than WINDOW_THRESH, the time window threshold will be adjusted according to the mean, so that the time window threshold can gradually decrease as the time interval of target detection increases, thereby reducing false detection and optimizing detection accuracy.

[0107] In summary, refer to the attached Figure 4, in the specific implementation, first initialize, that is, at the beginning of the program, the size of the time window queue is WINDOW_MAX_LENGTH, all elements are filled with WINDOW_VALUE_MAX, and the default target detection threshold is set to default_threshold. Then enter the target detection. Whenever a target is detected, first record the time interval with the last detection and update the time window queue. If the detection interval exceeds WINDOW_VALUE_MAX seconds, add an integer of WINDOW_VALUE_MAX to the end of the queue. If it is equal to or less than WINDOW_VALUE_MAX seconds, fill it into the time window queue according to the actual time interval. Then calculate the mean of the time window queue, that is, calculate the mean of the time window queue after each target detection. Then adjust the time window threshold, that is, compare the mean of the time window queue with the preset time window threshold. If the mean is greater than the time window threshold (WINDOW_THRESH), no adjustment is made and the current threshold is maintained. If the mean is less than the time window threshold (WINDOW_THRESH), the threshold is adjusted to new_threshold according to the formula, and the result is finally output. According to the adjusted time window threshold, the target detection continues until the end. This application is based on a dynamic threshold adaptive adjustment mechanism. The time interval of target detection is recorded through a time window queue, and the time window threshold is dynamically adjusted according to the mean, which can significantly improve the detection accuracy. Unlike the traditional fixed threshold method, it can provide real-time feedback and adjust the time window threshold, adaptively optimize the target detection effect in different scenarios, and avoid false detection and missed detection. In addition, the adjustment formula of the time window threshold uses the mean based on the time window queue for adaptive calculation to improve the efficiency and accuracy in complex environments and multi-target detection tasks. This application also further improves the efficiency of the system by screening low-confidence detection boxes and optimizing computing resources. At the same time, it has good scalability and stability, and can adapt to target detection tasks of different scales and needs. This application also further improves the efficiency of the system by screening low-confidence detection boxes and optimizing computing resources. That is, a dynamic confidence threshold strategy is adopted to automatically filter out detection frames with confidence lower than the set confidence threshold during the target detection process, reducing the processing of invalid detection frames and avoiding the waste of computing resources. In addition, the non-maximum suppression (NMS) technology is combined to further remove low-confidence frames with high overlap, thereby improving the accuracy and efficiency of target detection. On the other hand, by optimizing the allocation of computing resources, the computational burden is reduced while ensuring detection accuracy. Using lightweight models such as MobileNet (existing network) and EfficientDet (with EfficienNet as the backbone feature extraction network) for target detection can significantly reduce the amount of computation and memory usage.This application has strong flexibility and can adapt to a variety of application scenarios. It provides high-precision and high-efficiency target detection solutions, can effectively reduce the computational burden, and improve usability.

[0108] Reference Figure 2 , an artificial intelligence target detection device based on dynamic threshold adaptive adjustment, an acquisition module 10, used to collect data to obtain target detection data; a preprocessing module 20, used to initialize a time window queue; a target detection module 30, used to receive target detection data, and record the time interval between the target detection data and the previous target detection data, and perform target detection according to the adjusted threshold to obtain a detection result; an update module 40, used to update the time window queue according to the time interval; a mean calculation module 50, used to calculate the mean of the time window queue; a first judgment module 60, used to judge whether to adjust the preset time window threshold according to the mean; a dynamic threshold adjustment module 70, used to dynamically adjust the threshold according to the mean and the time interval to obtain the adjusted threshold; a post-processing module 80, used to post-process the detection result; a display module 90, used to present the detection result on a preset display screen; a second judgment module, used to judge whether the detected target whether the target confidence is greater than a preset confidence threshold; a recording module, for recording the time interval between the time of the current target detection and the time of the previous target detection, and transmitting the detected target; a filling unit, for filling the time window queue; a data preprocessing unit, for performing data preprocessing on the detected target; a calculation unit, for calculating the confidence score of each detected target by a preset target detection algorithm; an updating unit, for updating the tail of the time window queue according to the time interval; a first judgment unit, for judging whether the time interval is greater than the maximum time window value; an adding unit, for adding an integer of the maximum time window value to the tail if yes, and resetting the time interval; a filling unit, for filling the time interval into the time window queue if no; a comparison unit, for comparing the mean with the time window threshold; an adjustment unit, for adjusting the time window threshold to obtain an adjusted threshold if the mean is less than the time window threshold.

[0109] In this embodiment, first, the preprocessing module 20 initializes the time window queue, and then the filling unit fills the time window queue; then the acquisition module 10 acquires data to obtain target detection data, and the data preprocessing unit performs data preprocessing on the detected target; then the calculation unit calculates the confidence score of each detected target through the target detection algorithm, and the second judgment module judges whether the target confidence of the detected target is greater than a preset confidence threshold; then the recording module records the time interval between the time of the current target detection and the time of the previous target detection, and transmits the detected target, the target detection module 30 receives the target detection data, and records the time interval between the current target detection data and the previous target detection data; the update module Block 40 updates the time window queue according to the time interval; the first judgment unit judges whether the time interval is greater than the maximum time window value, the adding unit adds an integer of the maximum time window value at the end, and resets the time interval; the filling unit fills the time interval into the time window queue; the mean calculation module 50 calculates the mean of the time window queue; the comparison unit compares the mean with the time window threshold; if the mean is less than the time window threshold, the adjustment unit adjusts the time window threshold to obtain the adjusted threshold; the dynamic threshold adjustment module 70 dynamically adjusts the threshold according to the mean and the time interval to obtain the adjusted threshold; the target detection module 30 performs target detection according to the adjusted threshold to obtain the detection result; finally, the display module 90 presents the detection result on a preset display screen.

[0110] In order to have good scalability and stability, the present application adopts a modular design, and the modules are decoupled through standard interfaces, which can be flexibly expanded and customized, and has a wide range of application scenarios. In another specific embodiment, the present application can also accelerate the target detection process by adding hardware, such as GPU (Graphics Processing Unit) or NPU (Neural Processing Unit), thereby increasing the processing speed.

[0111] In summary, in the specific implementation, this application sets up a time window queue, which records the time interval between the most recent WINDOW_MAX_LENGTH detections. After each detection, the time window queue is updated and the average is calculated. When the queue average is less than the set threshold (default_threshold), the time window threshold (new_threshold) of target detection is adjusted according to the average, so as to be able to adaptively respond to environmental changes and changes in target density. Figure 5As shown, it is a workflow diagram in an embodiment of the present application. Among them, RISP src is Real-Time Streaming Protocol, src represents source code; File src represents file source code; Cam src represents computer source code; Resize represents the change of computer image size; Padding represents element spacing; cvtColor represents color space conversion; NMS represents non-maximum suppression; Draw represents drawing.

[0112] Specifically, when the video stream is captured and processed, the device will continuously update the time window queue and dynamically adjust the time window threshold according to the time interval in the time window queue, thereby effectively improving the accuracy and efficiency of target detection. It can flexibly adjust the detection strategy based on real-time feedback, optimize the target detection results, and ensure that the detection accuracy is not easily affected by scene changes.

[0113] Reference Figure 3 In the embodiment of the present application, a computer device is also provided. The computer device may be a server, and its internal structure may be as follows: Figure 3 As shown. The computer device includes a processor, a memory, a network interface and a database. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory is the operating system, computer program and database in the non-volatile storage medium. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is used to store data such as templates, tables, preset fields, etc. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an artificial intelligence target detection method based on dynamic threshold adaptive adjustment is implemented.

[0114] The processor executes the method for extracting data from the insurance policy, comprising the following steps:

[0115] Preprocessing: Initialize a time window queue; wherein the time window queue includes multiple elements;

[0116] Collecting data through a preset acquisition module 10 to obtain target detection data;

[0117] Receive target detection data through a preset target detection module 30, and record the time interval between the target detection data and the previous target detection data;

[0118] Update the time window queue according to the time interval;

[0119] Calculate the mean of the time window queue; where the mean is the average value of all elements in the time window queue;

[0120] Determine whether to adjust the preset time window threshold based on the mean value;

[0121] If so, the threshold is dynamically adjusted according to the mean value and the time interval to obtain the adjusted threshold;

[0122] Perform target detection according to the adjusted threshold and obtain the detection result;

[0123] The test results are post-processed and presented on a preset display screen.

[0124] In one embodiment, preprocessing: the step of initializing the time window queue includes:

[0125] Fill the time window queue.

[0126] In one embodiment, the step of filling the time window queue includes:

[0127] Fill the time window queue with the preset maximum time window value.

[0128] In one embodiment, before the step of receiving a detection target and recording the time interval between the detection target and a previous detection target, the method includes:

[0129] Determine whether the target confidence of the detected target is greater than a preset confidence threshold;

[0130] If yes, the time interval between the current target detection time and the previous target detection time is recorded, and the detected target is transmitted.

[0131] In one embodiment, before the step of determining whether the target confidence of the detected target is greater than a preset confidence threshold, the following steps are included:

[0132] Perform data preprocessing on the detection target; data preprocessing includes but is not limited to size adjustment, color space conversion, denoising and grayscale;

[0133] The confidence score of each detected target is calculated using a preset target detection algorithm.

[0134] In one embodiment, the step of updating the time window queue according to the time interval includes:

[0135] The tail of the time window queue is updated according to the time interval; wherein the time interval includes a minimum time window value and a maximum time window value.

[0136] In one embodiment, the step of updating the tail of the time window queue according to the time interval includes:

[0137] Determine whether the time interval is greater than the maximum time window value;

[0138] If yes, add an integer of the maximum time window value to the end and reset the time interval;

[0139] If not, fill the time interval into the time window queue.

[0140] In one embodiment, the step of determining whether to adjust the preset time window threshold according to the mean value includes:

[0141] Compare the mean to the time window threshold;

[0142] If the mean is greater than the time window threshold, no adjustment is made;

[0143] If the mean is less than the time window threshold, the time window threshold is adjusted to obtain the adjusted threshold.

[0144] In one embodiment, if the mean is less than the time window threshold, the time window threshold is adjusted, and the step of obtaining the adjusted threshold includes:

[0145] The adjustment formula for the time window threshold is:

[0146]

[0147] Among them, new_threshold represents the adjustment threshold, default_threshold represents the confidence threshold, mean represents the mean, WINDOW_THRESH represents the time window threshold, and WINDOW_VALUE_MIN represents the minimum time window value.

[0148] Those skilled in the art will understand that Figure 3 The structure shown in is merely a block diagram of a portion of the structure related to the present application solution and does not constitute a limitation on the computer device to which the present application solution is applied.

[0149] An embodiment of the present application further provides a computer storage medium on which a computer program is stored. When the computer program is executed by a processor, an artificial intelligence target detection method based on dynamic threshold adaptive adjustment is implemented, comprising the following steps:

[0150] Preprocessing: Initialize a time window queue; wherein the time window queue includes multiple elements;

[0151] Collecting data through a preset acquisition module 10 to obtain target detection data;

[0152] Receive target detection data through a preset target detection module 30, and record the time interval between the target detection data and the previous target detection data;

[0153] Update the time window queue according to the time interval;

[0154] Calculate the mean of the time window queue; where the mean is the average value of all elements in the time window queue;

[0155] Determine whether to adjust the preset time window threshold based on the mean value;

[0156] If so, the threshold is dynamically adjusted according to the mean value and the time interval to obtain the adjusted threshold;

[0157] Perform target detection according to the adjusted threshold and obtain the detection result;

[0158] The test results are post-processed and presented on a preset display screen.

[0159] In one embodiment, preprocessing: the step of initializing the time window queue includes:

[0160] Fill the time window queue.

[0161] In one embodiment, the step of filling the time window queue includes:

[0162] Fill the time window queue with the preset maximum time window value.

[0163] In one embodiment, before the step of receiving a detection target and recording the time interval between the detection target and a previous detection target, the method includes:

[0164] Determine whether the target confidence of the detected target is greater than a preset confidence threshold;

[0165] If yes, the time interval between the current target detection time and the previous target detection time is recorded, and the detected target is transmitted.

[0166] In one embodiment, before the step of determining whether the target confidence of the detected target is greater than a preset confidence threshold, the following steps are included:

[0167] Perform data preprocessing on the detection target; data preprocessing includes but is not limited to size adjustment, color space conversion, denoising and grayscale;

[0168] The confidence score of each detected target is calculated using a preset target detection algorithm.

[0169] In one embodiment, the step of updating the time window queue according to the time interval includes:

[0170] The tail of the time window queue is updated according to the time interval; wherein the time interval includes a minimum time window value and a maximum time window value.

[0171] In one embodiment, the step of updating the tail of the time window queue according to the time interval includes:

[0172] Determine whether the time interval is greater than the maximum time window value;

[0173] If yes, add an integer of the maximum time window value to the end and reset the time interval;

[0174] If not, fill the time interval into the time window queue.

[0175] In one embodiment, the step of determining whether to adjust the preset time window threshold according to the mean value includes:

[0176] Compare the mean to the time window threshold;

[0177] If the mean is greater than the time window threshold, no adjustment is made;

[0178] If the mean is less than the time window threshold, the time window threshold is adjusted to obtain the adjusted threshold.

[0179] In one embodiment, if the mean is less than the time window threshold, the time window threshold is adjusted, and the step of obtaining the adjusted threshold includes:

[0180] The adjustment formula for the time window threshold is:

[0181]

[0182] Among them, new_threshold represents the adjustment threshold, default_threshold represents the confidence threshold, mean represents the mean, WINDOW_THRESH represents the time window threshold, and WINDOW_VALUE_MIN represents the minimum time window value.

[0183] In summary, the artificial intelligence target detection method and device based on dynamic threshold adaptive adjustment provided in the embodiment of the present application optimizes target detection by adaptively adjusting the threshold, can dynamically adjust the threshold, avoid false detection and missed detection, improve the accuracy of target detection, and improve detection accuracy; can adaptively adjust the threshold based on the mechanism of time window queue to adapt to the needs of different environments and time periods. It can screen detection targets with low confidence, avoid redundant calculations, improve efficiency, optimize computing resources, and avoid waste of resources. It can adapt to a variety of complex target detection scenarios, has strong adaptability, and has scalability and broad application prospects.

[0184] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing related hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media provided in this application and used in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0185] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other identical elements in the process, device, article or method including the element.

[0186] The above description is only a preferred embodiment of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. An artificial intelligence target detection method based on dynamic threshold adaptive adjustment, characterized in that: The following steps are involved: Preprocessing: initializing a time window queue; wherein the time window queue includes a plurality of elements; Collect data through a preset acquisition module to obtain target detection data; Receiving the target detection data through a preset target detection module, and recording the time interval between the target detection data and the previous target detection data; updating the time window queue according to the time interval; Calculate the mean of the time window queue; wherein the mean is the average value of all elements in the time window queue; Determine whether to adjust the preset time window threshold according to the mean; If yes, dynamically adjusting the threshold according to the mean value and the time interval to obtain an adjusted threshold; Perform target detection according to the adjustment threshold to obtain a detection result; The detection results are post-processed and presented on a preset display screen.

2. The artificial intelligence target detection method based on dynamic threshold adaptive adjustment according to claim 1 is characterized in that: The preprocessing: the step of initializing the time window queue includes: The time window queue is populated.

3. The artificial intelligence target detection method based on dynamic threshold adaptive adjustment according to claim 2 is characterized in that: The step of filling the time window queue includes: The time window queue is filled with a preset maximum time window value.

4. The artificial intelligence target detection method based on dynamic threshold adaptive adjustment according to claim 1 is characterized in that: Before the step of receiving a detection target and recording the time interval between the detection target and a previous detection target, the method further comprises: Determining whether the target confidence of the detected target is greater than a preset confidence threshold; If so, the time interval between the current target detection time and the previous target detection time is recorded, and the detected target is transmitted.

5. The artificial intelligence target detection method based on dynamic threshold adaptive adjustment according to claim 1 is characterized in that: Before the step of determining whether the target confidence of the detected target is greater than a preset confidence threshold, the step includes: Performing data preprocessing on the detection target; the data preprocessing includes but is not limited to size adjustment, color space conversion, denoising and grayscale; The confidence score of each detected target is calculated using a preset target detection algorithm.

6. The artificial intelligence target detection method based on dynamic threshold adaptive adjustment according to claim 4 is characterized in that: The step of updating the time window queue according to the time interval includes: The tail of the time window queue is updated according to the time interval; wherein the time interval includes a minimum time window value and a maximum time window value.

7. The artificial intelligence target detection method based on dynamic threshold adaptive adjustment according to claim 6 is characterized in that: The step of updating the tail of the time window queue according to the time interval includes: Determine whether the time interval is greater than the maximum time window value; If yes, then add an integer of the maximum time window value to the end and reset the time interval; If not, the time interval is filled into the time window queue.

8. The artificial intelligence target detection method based on dynamic threshold adaptive adjustment according to claim 1 is characterized in that: The step of judging whether to adjust the preset time window threshold according to the mean value includes: comparing the mean with the time window threshold; If the mean is greater than the time window threshold, no adjustment is made; If the mean is less than the time window threshold, the time window threshold is adjusted to obtain an adjusted threshold.

9. The artificial intelligence target detection method based on dynamic threshold adaptive adjustment according to claim 6 is characterized in that: If the mean is less than the time window threshold, the time window threshold is adjusted to obtain the step of adjusting the threshold, including: The adjustment formula of the time window threshold is: Among them, new_threshold represents the adjustment threshold, default_threshold represents the confidence threshold; mean represents the mean; WINDOW_THRESH represents the time window threshold; WINDOW_VALUE_MIN represents the minimum time window value.

10. An artificial intelligence target detection device based on dynamic threshold adaptive adjustment, characterized in that: include: An acquisition module, used for acquiring data to obtain target detection data; Preprocessing module, used to initialize the time window queue; A target detection module, used to receive the target detection data, record the time interval between the target detection data and the previous target detection data, and perform target detection according to the adjustment threshold to obtain a detection result; An updating module, used for updating the time window queue according to the time interval; A mean calculation module, used to calculate the mean of the time window queue; A first judgment module, used to judge whether to adjust a preset time window threshold according to the mean value; a dynamic threshold adjustment module, configured to dynamically adjust the threshold according to the mean value and the time interval to obtain an adjusted threshold; A post-processing module, used for post-processing the detection result; The display module is used to present the detection result on a preset display screen.

11. A computer device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the processor executes the computer program, the steps of the artificial intelligence target detection method based on dynamic threshold adaptive adjustment as described in any one of claims 1 to 9 are implemented.

12. A computer storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the artificial intelligence target detection method based on dynamic threshold adaptive adjustment as described in any one of claims 1 to 9 are implemented.

Citation Information

Patent Citations

  • Self-adaptation burst flow detection device and detection method thereof

    CN103888315A

  • Pedestrian anti-collision early warning method and device, storage medium and stacking machine

    CN112784725A

  • Adaptive confidence threshold adjustment method for improving video detection continuity

    CN115376038A

  • Infrared image target detection method and system based on deep learning

    CN118644723A

  • Method and apparatus for detecting abnormality using time-series data

    KR1020170084445A