Method and device for reducing false alarm rate of target detection, equipment and medium
By building the target feature error library and using the error library to determine the detection results, the problem of high false alarm rate of the target detection model in new scenarios is solved, and the effect of reducing false alarm rate and improving detection accuracy is achieved.
Patent Information
- Application Number
- CN202411585453.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2044-11-08
AI Technical Summary
The false alarm rate of the target detection model is high when migrating to a new scenario, resulting in a decrease in detection accuracy.
By constructing a target feature error library, using the trained target detection model to detect the detected images, obtain the wrong image features, and prohibit output when the detection result is error based on the error feature library to reduce the false alarm rate. The specific steps include detecting the image to be detected, obtaining bounding box information, extracting area image features, saving it as an error library until the termination condition of error feature acquisition is met, and prohibiting output when determining the error detection result based on the error library in subsequent detection. .
It effectively reduces the false alarm rate of target detection, improves the accuracy and reliability of detection, and ensures detection performance in new scenarios.
Smart Images

Figure CN119091284A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image detection technology, and in particular to a method, device, equipment and medium for reducing the false alarm rate of target detection. Background Art
[0002] With the development of science and technology, artificial intelligence technology continues to improve.
[0003] The object detection model can detect people, animals, plants or objects in the image and locate their positions based on computer vision algorithms.
[0004] In the model training stage, the relevant technology can build a training data set based on the scene to be applied, and train the target detection model based on the training data set. In the deployment and application stage, the surveillance camera in the corresponding scene can collect images, and then the target detection model can be used to detect the collected images.
[0005] However, in some cases, such as migrating an object detection model to a new scenario, the object detection model has a high false positive rate. Summary of the invention
[0006] The present invention provides a method, device, equipment and medium for reducing the false alarm rate of target detection, so as to solve the defect of high false alarm rate of target detection model in related technology and reduce the false alarm rate of target detection.
[0007] In a first aspect, the present invention provides a method for reducing the false alarm rate of target detection, comprising: Inputting a first image to be detected into a trained target detection model to perform target detection, and obtaining a first detection result, wherein the first detection result includes a first category identifier and first bounding box information; Determining whether the first category identifier in the first detection result is a correct identifier; Determining that the first category identifier is a correct identifier, outputting the first category identifier and the first bounding box information; If it is determined that the first category identifier in the first detection result is an error identifier, outputting the first category identifier and the first bounding box information is prohibited, and a first region image corresponding to the first bounding box information is obtained in the first image, a first image feature is extracted from the first region image, and the first image feature is saved as an error image feature in a database; Inputting the second image to be detected into the target detection model for target detection until the set error feature acquisition termination condition is met, and determining the current database as the target feature error library; Inputting the image to be detected into the target detection model to perform target detection and obtain a detection result; If the detection result is determined to be an erroneous detection result according to the erroneous image features stored in the target feature error library, the output of the detection result is prohibited to reduce the false alarm rate of target detection.
[0008] Optionally, the detection result includes corresponding category identification and bounding box information; The step of determining, based on the erroneous image features stored in the target feature error library, that the detection result is an erroneous detection result comprises: Acquire a region image corresponding to the bounding box information in the image to be detected, and extract image features from the region image; Respectively determining the similarity between the image feature and each of the erroneous image features stored in the target feature error library; If it is determined that at least one of the similarities is not less than a preset similarity threshold, the detected category identifier is determined to be an erroneous identifier, and the detection result is determined to be an erroneous detection result.
[0009] Optionally, after respectively determining the similarity between the image feature and each of the erroneous image features stored in the target feature error library, the method further includes: It is determined that each of the similarities is less than the preset similarity threshold, then the detected category identifier is determined to be a correct identifier, the detection result is determined to be a correct result, and the detection result is output.
[0010] Optionally, the termination condition for error feature acquisition is that the number of image detections of the target detection model is not less than a preset number threshold, and the detection accuracy of the target detection model is not less than a preset accuracy threshold.
[0011] Optionally, the target detection model is obtained by training the target detection model to be trained according to the expanded training data set, and the expanded training data set is obtained by expanding the original training data set; The original training data set includes N sample images, where N is an integer greater than 2; and the process of performing data expansion on the original training data set to obtain the expanded training data set includes: Performing small object occlusion on each of the sample images respectively to obtain an occluded image corresponding to each of the sample images; Splicing any M of the blocked images to obtain a spliced image, wherein M is an integer greater than 1 and less than N; Reducing the scale of each stitched image to obtain a reduced image; All the reduced images and the N sample images are taken as a whole as the expanded training data set.
[0012] In a second aspect, the present invention provides a device for reducing the false alarm rate of target detection, comprising: A first detection unit, configured to input a first image to be detected into a trained target detection model to perform target detection, and obtain a first detection result, wherein the first detection result includes a first category identifier and first bounding box information; A judging unit, configured to judge whether the first category identifier in the first detection result is a correct identifier; a first determining unit, configured to determine that the first category identifier is a correct identifier, and output the first category identifier and the first bounding box information; a second determining unit, configured to determine that the first category identifier in the first detection result is an error identifier, and then prohibit outputting the first category identifier and the first bounding box information; an acquisition unit, configured to acquire, in the first image, a first region image corresponding to the first bounding box information; An extraction unit, configured to extract a first image feature from the first region image; as a unit, for storing the first image feature as an erroneous image feature in a database; A second detection unit, used for inputting the second image to be detected into the target detection model for target detection until a set error feature acquisition termination condition is met; A third determining unit, used to determine the current database as a target feature error database; A third detection unit is used to input the image to be detected into the target detection model to perform target detection and obtain a detection result; The fourth determination unit is used to determine that the detection result is an erroneous detection result based on the erroneous image features stored in the target feature error library, and then prohibit outputting the detection result to reduce the false alarm rate of target detection.
[0013] Optionally, the detection result includes corresponding category identification and bounding box information; The fourth determining unit is further configured to: Acquire a region image corresponding to the bounding box information in the image to be detected, and extract image features from the region image; Respectively determining the similarity between the image feature and each of the erroneous image features stored in the target feature error library; If it is determined that at least one of the similarities is not less than a preset similarity threshold, the detected category identifier is determined to be an erroneous identifier, and the detection result is determined to be an erroneous detection result.
[0014] Optionally, the device further comprises: A fifth determination unit is used to, after respectively determining the similarities between the image features and each of the erroneous image features stored in the target feature error library, determine that each of the similarities is less than the preset similarity threshold, then determine that the detected category identifier is a correct identifier, determine that the detection result is a correct result, and output the detection result.
[0015] Optionally, the termination condition for error feature acquisition is that the number of image detections of the target detection model is not less than a preset number threshold, and the detection accuracy of the target detection model is not less than a preset accuracy threshold.
[0016] Optionally, the target detection model is obtained by training the target detection model to be trained according to the expanded training data set, and the expanded training data set is obtained by expanding the original training data set; The original training data set includes N sample images, where N is an integer greater than 2; and the process of performing data expansion on the original training data set to obtain the expanded training data set includes: Performing small object occlusion on each of the sample images respectively to obtain an occluded image corresponding to each of the sample images; Splicing any M of the blocked images to obtain a spliced image, wherein M is an integer greater than 1 and less than N; Reducing the scale of each stitched image to obtain a reduced image; All the reduced images and the N sample images are taken as a whole as the expanded training data set.
[0017] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, computer instructions are stored in the memory, and the processor executes the method for reducing the false alarm rate of target detection according to the above-mentioned first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0018] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the method for reducing the false alarm rate of target detection according to the first aspect or any corresponding embodiment thereof.
[0019] The method, apparatus, device and medium for reducing the false alarm rate of target detection provided by the present invention can use a trained target detection model to perform target detection on multiple images to be detected, build a target feature error library according to the detection results, and then continue to perform target detection on the images to be detected based on the target detection model to obtain detection results. When the detection result is determined to be an erroneous detection result according to the target feature error library, the output of the detection result can be prohibited, thereby reducing the false alarm rate of target detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0021] Figure 1 A flow chart of a method for reducing the false alarm rate of target detection provided by an embodiment of the present invention; Figure 2 A flowchart of another method for reducing the false alarm rate of target detection provided by an embodiment of the present invention; Figure 3 A schematic diagram of the structure of a device for reducing the false alarm rate of target detection provided by an embodiment of the present invention; Figure 4 A schematic diagram of the structure of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0022] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are 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.
[0023] Combine the following Figure 1-Figure 2 The present invention describes a method for reducing the false alarm rate of target detection.
[0024] like Figure 1 As shown, this embodiment proposes a first method for reducing the false alarm rate of target detection, which may include the following steps: S101. Input a first image to be detected into a trained target detection model to perform target detection, and obtain a first detection result, where the first detection result includes a first category identifier and first bounding box information.
[0025] The first image may be an image to be subjected to target detection, and may include an object such as a person, a cat, a car, or a flower.
[0026] The object detection model can be used to detect whether a certain type of object exists in an image, and can assign a bounding box to the type of object in the image. Specifically, the type of object can be a person, a cat, a car, or a flower.
[0027] Specifically, the first detection result is the detection result obtained and output by the target detection model when performing target detection on the first image.
[0028] The first category identifier is a category identifier to which the object belongs, such as a person, a cat, or a car, after the target detection model performs target detection on the object in the first image.
[0029] Specifically, the first bounding box information is the relevant information of the bounding box assigned to the object in the first image after the target detection model performs target detection on the object in the first image, and can be used to uniquely identify the bounding box. It is understandable that the first bounding box information may include coordinates of the upper left corner, lower left corner, upper right corner, and lower right corner of the bounding box. Optionally, the first bounding box information may also include information such as the coordinates of the upper left corner, the coordinates of the upper right corner, the width, and the height of the bounding box.
[0030] It is understandable that the first category identifier and the first bounding box information may correspond to each other. Specifically, the first category identifier is the category identifier to which the object framed by the first bounding box corresponding to the first bounding box information in the first image belongs.
[0031] It should be noted that the target detection model can be a multi-type target detection model, which can be used to detect whether there are different types of objects in the image, and to apply bounding boxes to different types of objects. In this case, the first image may include multiple types of objects, and the first detection result may include a one-to-one correspondence between multiple category identifiers and multiple bounding box information. In this case, each correspondence can be regarded as a detection result, and the first detection result includes multiple detection results. In this case, the first category identifier may include multiple category identifiers, and the first bounding box information may include multiple bounding box information. The multiple category identifiers in the first category identifier are in a one-to-one correspondence with the multiple bounding box information in the first bounding box information.
[0032] Specifically, the target detection model may be a target detection model built based on the target detection algorithm yolov5.
[0033] S102: Determine whether the first category identifier in the first detection result is a correct identifier.
[0034] Specifically, the present embodiment may first obtain the real category identifier corresponding to the first bounding box information, and the real category identifier may be input by a technician. Afterwards, it may be determined whether the first category identifier is a correct identifier based on the real category identifier. When the first category identifier is consistent with the real category identifier, it may be determined that the first category identifier is a correct identifier. When the first category identifier is inconsistent with the real category identifier, it may be determined that the first category identifier is an incorrect identifier.
[0035] Specifically, when the first category identifier includes multiple category identifiers, this embodiment can respectively obtain the real category identifiers corresponding to the multiple bounding box information in the first bounding box information, and determine whether each category identifier in the first category identifier is a correct identifier based on the real category identifiers corresponding to the multiple bounding box information.
[0036] S103: If it is determined that the first category identifier is a correct identifier, the first category identifier and first bounding box information are output.
[0037] Specifically, in this embodiment, when the first category identifier is determined to be a correct identifier, the first detection result may be determined to be a correct detection result, and the first category identifier and the first bounding box information may be output accordingly.
[0038] Specifically, when the first category identifier includes multiple category identifiers, this embodiment can determine that when a certain category identifier is determined to be a correct identifier, the detection result of the category identifier and the corresponding bounding box information is a correct detection result, and output the category identifier and the corresponding bounding box information accordingly.
[0039] S104: If it is determined that the first category identifier in the first detection result is an erroneous identifier, outputting the first category identifier and the first bounding box information is prohibited.
[0040] Specifically, in this embodiment, when it is determined that the first category identifier is an erroneous identifier, the first detection result may be determined to be an erroneous detection result, and the output of the first detection result is prohibited, so as to reduce the false alarm rate of target detection.
[0041] Specifically, when the first category identifier includes multiple category identifiers, this embodiment can determine that one of the category identifiers is an incorrect identifier, determine that the detection result of the category identifier and the corresponding bounding box information is an incorrect detection result, and prohibit the output of the category identifier and the corresponding bounding box information to reduce the false alarm rate of target detection.
[0042] S105: Obtain a first region image corresponding to the first bounding box information in the first image.
[0043] The first region image may be a region image corresponding to the first boundary box information in the first image.
[0044] Optionally, when the first bounding box information includes multiple bounding box information, this embodiment can obtain corresponding regional images in the first image according to the multiple bounding box information. In this case, the first regional image includes the regional images corresponding to the multiple bounding box information.
[0045] S106: Extract first image features from the first region image.
[0046] The first image feature is the image feature of the first region image.
[0047] Optionally, when the first region image includes multiple region images, this embodiment may extract image features of the multiple region images respectively. In this case, the first image features include the extracted image features of the multiple region images.
[0048] S107: Save the first image feature as an error image feature in a database.
[0049] Specifically, in this embodiment, the first image feature may be used as an image feature detected incorrectly by the target detection model and saved in a database.
[0050] S108: Input the second image to be detected into the target detection model for target detection until the set error feature acquisition termination condition is met.
[0051] Specifically, the second image may be an image to be subjected to target detection. The first image may include an object, such as a person, a cat, a car, or a flower, etc. The second image may include multiple types of objects.
[0052] Specifically, this embodiment may process the second image by using the above-mentioned process of processing the first image based on the target detection model.
[0053] Optionally, the termination condition for error feature acquisition may be that the number of image detections of the target detection model is not less than a preset number threshold, and the detection accuracy of the target detection model is not less than a preset accuracy threshold.
[0054] The detection accuracy of the target detection model may be the proportion of correct detection results among all the detected detection results.
[0055] It is understandable that, in this embodiment, the image to be detected can be continuously input into the target detection model for target detection, thereby enriching the erroneous image features in the database, until the error feature acquisition termination condition is met.
[0056] Optionally, the error feature acquisition termination condition may also only require that the number of image detections of the target detection model is not less than a preset number threshold.
[0057] It should be noted that the preset quantity threshold and the preset accuracy threshold can be set by technical personnel according to actual conditions, and this embodiment does not limit this.
[0058] S109: Determine the current database as the target feature error database.
[0059] It can be understood that a plurality of erroneous image features may be stored in the target feature error library.
[0060] S110, inputting the image to be detected into the target detection model to perform target detection and obtain a detection result.
[0061] Specifically, after constructing the target feature error library, this embodiment can perform image detection and decide whether to report the detection result based on the target detection model and the target feature error library.
[0062] The image to be detected may be an image that needs to perform target detection.
[0063] Specifically, in this embodiment, the image to be detected can be input into the target detection model to perform target detection and obtain a detection result.
[0064] S111. If it is determined that the detection result is an erroneous detection result according to the erroneous image features stored in the target feature error library, outputting the detection result is prohibited to reduce the false alarm rate of target detection.
[0065] Specifically, when the detection result is determined to be an erroneous detection result based on multiple erroneous image features stored in the target feature error library, this embodiment may prohibit outputting the detection result, thereby reducing the false alarm rate of target detection.
[0066] Optionally, in other methods for reducing the false alarm rate of target detection proposed in this embodiment, the detection result includes the corresponding category identification and bounding box information. In this case, the above step S111 may include: Obtaining a region image corresponding to the bounding box information in the image to be detected, and extracting image features in the region image; respectively determining the similarity between the image feature and each erroneous image feature stored in the target feature error library; If it is determined that at least one similarity is not less than a preset similarity threshold, the detected category identifier is determined to be an erroneous identifier, and the detection result is determined to be an erroneous detection result.
[0067] The preset similarity threshold may be set by a technician according to actual conditions, and is not limited in this embodiment.
[0068] Specifically, if at least one similarity is not less than a preset similarity threshold, it can be explained that the image object included in the acquired regional image has a high similarity with an image object that was previously detected incorrectly by the target detection model. At this time, the present embodiment can determine that the category identifier of this detection is an incorrect identifier, determine that the detection result is an incorrect detection result, prohibit the output of the incorrect detection result, and reduce the false alarm rate of target detection.
[0069] It should be noted that when the target detection model detects multiple corresponding category identifiers and multiple bounding box information in the image to be detected, this embodiment can take the corresponding category identifiers and bounding box information as a detection result, and process each detection result separately with reference to the above processing procedure. When a detection result is determined to be an erroneous detection result, it is prohibited to output the detection result.
[0070] Optionally, after respectively determining the similarity between the image feature and each erroneous image feature stored in the target feature error library, the above method may further include: If it is determined that each similarity is less than a preset similarity threshold, the detected category identification is determined to be a correct identification, the detection result is determined to be a correct result, and the detection result is output.
[0071] Specifically, if each similarity is less than the preset similarity threshold, this embodiment can determine that the category identification detected this time is the correct identification, and the detection result is the correct result. The correct result can be output to ensure the normal implementation of target detection and the accuracy of target detection.
[0072] It should be noted that when the target detection model detects multiple corresponding category identifiers and multiple bounding box information in the image to be detected, this embodiment can take the corresponding category identifiers and bounding box information as a detection result, and process each detection result separately with reference to the above processing procedure. When a detection result is determined to be a correct detection result, the detection result can be output.
[0073] The method for reducing the false alarm rate of target detection proposed in this embodiment can use a trained target detection model to perform target detection on multiple images to be detected, build a target feature error library according to the detection results, and then continue to perform target detection on the images to be detected based on the target detection model to obtain detection results. When the detection result is determined to be an erroneous detection result according to the target feature error library, the output of the detection result can be prohibited to reduce the false alarm rate of target detection.
[0074] based on Figure 1 This embodiment proposes a second method for reducing the false alarm rate of target detection. In this method, the target detection model is obtained by training the target detection model to be trained according to the expanded training data set, and the expanded training data set is obtained by data expansion of the original training data set; The original training data set includes N sample images, where N is an integer greater than 2; the process of performing data expansion on the original training data set to obtain an expanded training data set includes: Perform small target occlusion on each sample image respectively to obtain the occluded image corresponding to each sample image; Splicing any M blocked images to obtain a spliced image; where M is an integer greater than 1 and less than N; Reduce the scale of each stitched image to obtain a reduced image; All the reduced images and N sample images are taken as an expanded training data set.
[0075] Specifically, in this embodiment, during the training stage of the target detection model, before the image is input into the Yolov5 algorithm, the small-sized targets in the sample images of the original training data set are occluded to obtain the corresponding occluded images, and then every M occluded images are spliced into a large image, for example, every 4 occluded images are spliced into a large image, and the large image is scaled down to construct a new data set, which is then trained together with the original training data set.
[0076] The method for reducing the false alarm rate of target detection proposed in this embodiment can expand the training data, increase the amount of training data, enhance the training effect of the target detection model, and improve the model performance of the target detection model.
[0077] like Figure 2 As shown, this embodiment proposes a third method for reducing the false alarm rate of target detection, which may include the following steps: S1. Collect images through Real Time Streaming Protocol (RTSP).
[0078] S2. Input the image into the Yolov5 target detection model for target detection.
[0079] S3. Obtain the detection result output by the Yolov5 target detection model, where the detection result includes the corresponding category identification and bounding box information. The bounding box information includes bounding box coordinates.
[0080] S7, the technicians perform manual screening and execute step S8 to determine whether the detection result is correct. If the judgment result is yes, that is, the detection result is a correct detection result, step S6 can be executed to output the detection result. If the judgment result is no, that is, the detection result is an erroneous detection result, the regional image corresponding to the bounding box information can be obtained, and image features can be extracted from the regional image, and the image features are added as erroneous image features to the target feature error library.
[0081] After the target feature error library is constructed, the present embodiment can continue to use the target detection model to detect the image to be detected. After obtaining the detection result including the corresponding category identification and bounding box information, it is no longer necessary to execute steps S7 and S8, but to execute step S4, obtain the regional image corresponding to the bounding box information in the image to be detected, extract the image features in the regional image, and respectively determine the similarity between the image features and each erroneous image feature stored in the target feature error library. Then execute step S5 to determine whether there is a similarity greater than the error library distance threshold, that is, the preset similarity threshold, among these similarities. If the judgment result is yes, that is, there is a similarity greater than the error library distance threshold, then the output of the detection result can be prohibited. If the judgment result is no, that is, there is no similarity greater than the error library distance threshold, then the detection result can be output. The process ends.
[0082] like Figure 3 As shown, this embodiment provides a device for reducing the false alarm rate of target detection, which may include: A first detection unit 301 is used to input a first image to be detected into a trained target detection model to perform target detection and obtain a first detection result, wherein the first detection result includes a first category identifier and first bounding box information; A judging unit 302 is used to judge whether the first category identifier in the first detection result is a correct identifier; A first determining unit 303 is used to determine that the first category identifier is a correct identifier, and then output the first category identifier and first bounding box information; A second determining unit 304 is configured to determine that the first category identifier in the first detection result is an erroneous identifier, and prohibit outputting the first category identifier and the first bounding box information; An acquiring unit 305 is configured to acquire a first region image corresponding to the first bounding box information in the first image; An extraction unit 306, configured to extract a first image feature from the first region image; As unit 307, for saving the first image feature as an erroneous image feature in a database; The second detection unit 308 is used to input the second image to be detected into the target detection model for target detection until a set error feature acquisition termination condition is met; A third determining unit 309 is used to determine the current database as a target feature error database; The third detection unit 310 is used to input the image to be detected into the target detection model to perform target detection and obtain a detection result; The fourth determining unit 311 is used to determine that the detection result is an erroneous detection result according to the erroneous image features stored in the target feature error library, and then prohibit outputting the detection result to reduce the false alarm rate of target detection.
[0083] It should be noted that the processing processes of the first detection unit 301, the judgment unit 302, the first determination unit 303, the second determination unit 304, the acquisition unit 305, the extraction unit 306, the as unit 307, the second detection unit 308, the third determination unit 309, the third detection unit 310 and the fourth determination unit 311 and the beneficial effects thereof can be respectively referred to Figure 1 Steps S101 to S111 in the above are not described in detail.
[0084] Optionally, the detection result includes corresponding category identification and bounding box information; The fourth determining unit 311 is further configured to: Obtaining a region image corresponding to the bounding box information in the image to be detected, and extracting image features in the region image; respectively determining the similarity between the image feature and each erroneous image feature stored in the target feature error library; If it is determined that at least one similarity is not less than a preset similarity threshold, the detected category identifier is determined to be an erroneous identifier, and the detection result is determined to be an erroneous detection result.
[0085] Optionally, the device further comprises: The fifth determination unit is used to determine the similarity between the image feature and each erroneous image feature stored in the target feature error library respectively, and if each similarity is less than a preset similarity threshold, then determine that the detected category identifier is a correct identifier, determine that the detection result is a correct result, and output the detection result.
[0086] Optionally, the termination condition for error feature collection is that the number of image detections of the target detection model is not less than a preset number threshold, and the detection accuracy of the target detection model is not less than a preset accuracy threshold.
[0087] Optionally, the target detection model is obtained by training the target detection model to be trained according to the expanded training data set, and the expanded training data set is obtained by data expansion of the original training data set; The original training data set includes N sample images, where N is an integer greater than 2; the process of performing data expansion on the original training data set to obtain an expanded training data set includes: Perform small target occlusion on each sample image respectively to obtain the occluded image corresponding to each sample image; Splicing any M blocked images to obtain a spliced image; where M is an integer greater than 1 and less than N; Reduce the scale of each stitched image to obtain a reduced image; All the reduced images and N sample images are taken as an expanded training data set.
[0088] The device for reducing the false alarm rate of target detection proposed in this embodiment can use a trained target detection model to perform target detection on multiple images to be detected, build a target feature error library according to the detection results, and then continue to perform target detection on the images to be detected based on the target detection model to obtain detection results. When the detection result is determined to be an erroneous detection result according to the target feature error library, the output of the detection result can be prohibited to reduce the false alarm rate of target detection.
[0089] The device for reducing the false alarm rate of target detection in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0090] The embodiment of the present invention also provides a computer device having the above Figure 3 The device shown is used to reduce the false alarm rate of target detection.
[0091] See also Figure 4 , a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are connected to each other using different buses for communication, and can be installed on a common motherboard or installed in other ways as needed. The processor can process instructions executed in the computer device, including instructions stored in or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 4 A processor 10 is taken as an example.
[0092] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0093] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.
[0094] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function. The data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage devices. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0095] The memory 20 may include a volatile memory, such as a random access memory. The memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive. The memory 20 may also include a combination of the above-mentioned types of memory.
[0096] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.
[0097] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0098] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for reducing the false alarm rate of target detection, characterized in that: include: Inputting a first image to be detected into a trained target detection model to perform target detection, and obtaining a first detection result, wherein the first detection result includes a first category identifier and first bounding box information; Determining whether the first category identifier in the first detection result is a correct identifier; Determining that the first category identifier is a correct identifier, outputting the first category identifier and the first bounding box information; If it is determined that the first category identifier in the first detection result is an error identifier, outputting the first category identifier and the first bounding box information is prohibited, and a first region image corresponding to the first bounding box information is obtained in the first image, a first image feature is extracted from the first region image, and the first image feature is saved as an error image feature in a database; Inputting the second image to be detected into the target detection model for target detection until the set error feature acquisition termination condition is met, and determining the current database as the target feature error library; Inputting the image to be detected into the target detection model to perform target detection and obtain a detection result; If the detection result is determined to be an erroneous detection result based on the erroneous image features stored in the target feature error library, the detection result is prohibited from being output to reduce the false alarm rate of target detection.
2. The method according to claim 1, characterized in that The detection result includes corresponding category identification and bounding box information; The step of determining, based on the erroneous image features stored in the target feature error library, that the detection result is an erroneous detection result comprises: Acquire a region image corresponding to the bounding box information in the image to be detected, and extract image features from the region image; Respectively determining the similarity between the image feature and each of the erroneous image features stored in the target feature error library; If it is determined that at least one of the similarities is not less than a preset similarity threshold, the detected category identifier is determined to be an erroneous identifier, and the detection result is determined to be an erroneous detection result.
3. The method according to claim 2, characterized in that After respectively determining the similarity between the image feature and each of the erroneous image features stored in the target feature error library, the method further includes: It is determined that each of the similarities is less than the preset similarity threshold, then the detected category identifier is determined to be a correct identifier, the detection result is determined to be a correct result, and the detection result is output.
4. The method according to claim 1, characterized in that The error feature acquisition termination condition is that the number of image detections of the target detection model is not less than a preset number threshold, and the detection accuracy of the target detection model is not less than a preset accuracy threshold.
5. The method according to claim 1, characterized in that: The target detection model is obtained by training the target detection model to be trained according to the expanded training data set, and the expanded training data set is obtained by expanding the original training data set; The original training data set includes N sample images, where N is an integer greater than 2; and the process of performing data expansion on the original training data set to obtain the expanded training data set includes: Performing small object occlusion on each of the sample images respectively to obtain an occluded image corresponding to each of the sample images; Splicing any M of the blocked images to obtain a spliced image, wherein M is an integer greater than 1 and less than N; Reducing the scale of each stitched image to obtain a reduced image; All the reduced images and the N sample images are taken as a whole as the expanded training data set.
6. A device for reducing the false alarm rate of target detection, characterized in that: include: A first detection unit, configured to input a first image to be detected into a trained target detection model to perform target detection, and obtain a first detection result, wherein the first detection result includes a first category identifier and first bounding box information; A judging unit, configured to judge whether the first category identifier in the first detection result is a correct identifier; a first determining unit, configured to determine that the first category identifier is a correct identifier, and output the first category identifier and the first bounding box information; a second determining unit, configured to determine that the first category identifier in the first detection result is an error identifier, and then prohibit outputting the first category identifier and the first bounding box information; an acquisition unit, configured to acquire, in the first image, a first region image corresponding to the first bounding box information; An extraction unit, configured to extract a first image feature from the first region image; as a unit, for storing the first image feature as an erroneous image feature in a database; A second detection unit, used for inputting the second image to be detected into the target detection model for target detection until a set error feature acquisition termination condition is met; A third determining unit, used to determine the current database as a target feature error database; A third detection unit is used to input the image to be detected into the target detection model to perform target detection and obtain a detection result; The fourth determination unit is used to determine that the detection result is an erroneous detection result based on the erroneous image features stored in the target feature error library, and then prohibit outputting the detection result to reduce the false alarm rate of target detection.
7. The device according to claim 6, characterized in that The detection result includes corresponding category identification and bounding box information; The fourth determining unit is further configured to: Acquire a region image corresponding to the bounding box information in the image to be detected, and extract image features from the region image; Respectively determining the similarity between the image feature and each of the erroneous image features stored in the target feature error library; If it is determined that at least one of the similarities is not less than a preset similarity threshold, the detected category identifier is determined to be an erroneous identifier, and the detection result is determined to be an erroneous detection result.
8. The device according to claim 7, characterized in that The device also includes: A fifth determination unit is used to, after respectively determining the similarities between the image features and each of the erroneous image features stored in the target feature error library, determine that each of the similarities is less than the preset similarity threshold, then determine that the detected category identifier is a correct identifier, determine that the detection result is a correct result, and output the detection result.
9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method for reducing the false alarm rate of target detection according to any one of claims 1 to 5 by executing the computer instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method for reducing the false alarm rate of target detection according to any one of claims 1 to 5.
Citation Information
Patent Citations
Configuration method and verification method of error information injection capability, equipment and medium
CN116185689A
Bird image recognition method and system for preventing misjudgment
CN116740758A
Target detection method and device, electronic equipment and computer readable medium
CN118196547A
Automatic bug classification using machine learning
US10740216B1
Automatic knowledge database generation for classifying objects and systems therefor
US6104835A
Cited By
Animal detection method, device, equipment, storage medium and product
CN121145045A
