Target detection method, device and storage medium
Through the clustering processing of the false detection screening model and the application of cascade sub-models, the problem of false positives in target detection in the existing technology is solved, the accuracy and reliability of target detection are improved, and a more efficient target detection effect is achieved.
Patent Information
- Application Number
- CN202010529233.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-11
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2040-06-11
AI Technical Summary
In existing target detection technology, the positive and negative sample screening method of the training set has a false positive problem, resulting in inaccurate model performance. Especially when processing multiple targets in real time in complex scenes, automatic target extraction and recognition results are poor.
Using clustering processing and cascade sub-models based on the false detection screening model, the false detection results of the target detection model are screened, negative samples with unique characteristics are screened out, and a more targeted false detection screen is trained. Check model to improve the accuracy of false detection screening and the reliability of target detection results.
It effectively suppresses the false positive results generated by the target detection model, improves the accuracy and reliability of target detection, and improves the accuracy and detection rate of target detection by filtering out false positive results layer by layer.
Smart Images

Figure CN111814832B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to a target detection method, device and storage medium. Background Art
[0002] Object detection, also known as object extraction, is a kind of image segmentation based on the geometric and statistical features of the object. It combines the segmentation and recognition of the object into one. Its accuracy and real-time performance are important capabilities of the entire system. Especially in complex scenes, when multiple objects need to be processed in real time, automatic object extraction and recognition are particularly important.
[0003] With the development of computer technology and the widespread application of computer vision principles, the research on target detection using computer image processing technology has become increasingly popular. Target detection has a wide range of application values in intelligent transportation systems, intelligent monitoring systems, military target detection, and detection and positioning of lesions in medical images. The screening of positive and negative samples in the training set in the target detection task has a great impact on the performance of the trained deep learning model. Sample imbalance and mining of difficult samples are important factors affecting the performance of the model. In traditional target detection tasks, the positive and negative samples of the training set and validation set are screened based on the detection box whose overlap with the gold standard is greater than or less than a certain threshold. However, the model trained by the positive and negative samples screened in this way still often has some problems, such as false positives.
[0004] The existing methods for screening training samples include the Online Hard Example Mining method. The core idea is to screen out some difficult samples as training samples to improve the effect of the detection model, where difficult samples refer to samples with diversity and high loss. Difficult samples are selected based on the loss of each ROI (region of interest), and some regions of interest with the largest loss are selected as candidate regions. This method can improve the performance of the model to a certain extent, but it is not effective for all types of false positive results, and it is not targeted enough, so the target detection results are not accurate enough, so a more reliable solution is needed. Summary of the invention
[0005] In order to solve the problems of the prior art, the present invention provides a target detection method, device, computer equipment and storage medium. The technical solution is as follows:
[0006] On the one hand, the present application provides a target detection method, the method comprising:
[0007] Acquire the image to be detected;
[0008] Performing target detection on the image to be detected based on the target detection model to obtain a first target detection result;
[0009] Performing false detection screening on the first target detection result based on the false detection screening model to obtain a second target detection result;
[0010] The false detection screening model is obtained by clustering the false detection results obtained by testing the target detection model and then training, and the false detection screening model includes one or more cascaded false detection screening sub-models.
[0011] On the other hand, the present application provides another target detection method, the method comprising:
[0012] Acquire the image to be detected;
[0013] Performing target detection on the image to be detected based on the target detection model to obtain a first target detection result;
[0014] Performing target detection on the image to be detected based on the false detection screening model to obtain a third target detection result;
[0015] Determine an intersection of the first target detection result and the third target detection result;
[0016] Using the intersection of the first target detection result and the third target detection result as the target detection result after false detection screening;
[0017] The false detection screening model is obtained by clustering the false detection results obtained by testing the target detection model and then training them.
[0018] Another aspect of the present application provides a target detection device, the device comprising:
[0019] A first image acquisition module, used to acquire an image to be detected;
[0020] A first target detection module, used to perform target detection on the image to be detected based on a target detection model to obtain a first target detection result;
[0021] The first false detection screening module is used to perform false detection screening on the first target detection result based on a false detection screening model to obtain a second target detection result, wherein the false detection screening model is trained after clustering the false detection results obtained by testing the target detection model, and the false detection screening model includes one or more cascaded false detection screening sub-models.
[0022] On the other hand, the present application provides another target detection device, the device comprising:
[0023] A second image acquisition module, used to acquire an image to be detected;
[0024] A second target detection module is used to perform target detection on the image to be detected based on the target detection model to obtain a first target detection result;
[0025] A second false detection screening module is used to perform target detection on the image to be detected based on a false detection screening model to obtain a third target detection result, wherein the false detection screening model is obtained by training after clustering the false detection results obtained by testing the target detection model;
[0026] An intersection determination module, used to determine the intersection of the first target detection result and the third target detection result;
[0027] A detection result determination module is used to use the intersection of the first target detection result and the third target detection result as the target detection result after false detection screening.
[0028] On the other hand, the present application provides a device, which includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the above-mentioned target detection method.
[0029] On the other hand, the present application provides another device, which includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the above-mentioned another target detection method.
[0030] On the other hand, the present application provides a computer-readable storage medium, in which at least one instruction or at least one program is stored, and the at least one instruction or the at least one program is loaded and executed by a processor to implement the above-mentioned target detection method.
[0031] The target detection method, device, equipment and storage medium provided in the embodiments of the present application have the following technical effects:
[0032] The embodiment of the present application obtains an image to be detected; performs target detection on the image to be detected based on a target detection model to obtain a first target detection result, which is flexible, convenient and fast; and performs false detection screening on the first target detection result based on a false detection screening model to obtain a second target detection result, wherein the false detection screening model is trained after clustering the false detection results obtained by testing the target detection model, and can screen out negative samples with unique features, obtain negative samples that are most helpful to the model, and thus train a more targeted false detection screening model, improve the performance of the false detection screening model, and solve the more typical false positive problem; and the false detection screening model includes one or more cascaded false detection screening sub-models, which can filter out false positive results layer by layer when performing target detection, which is beneficial to improving the accuracy of false detection screening, and making the target detection result more reliable. Another target detection method, by acquiring an image to be detected, performing target detection on the image to be detected based on a target detection model, and obtaining a first target detection result, which is fast and flexible; performing target detection on the image to be detected based on a false positive screening model, and obtaining a third target detection result, determining the intersection of the first target detection result and the third target detection result, and using the intersection of the first target detection result and the third target detection result as the target detection result after false positive screening, wherein the false positive screening model is trained after clustering the false detection results obtained by testing the target detection model, and can screen out negative samples with unique characteristics, solve the more typical false positive problem, and is conducive to subsequently improving the detection rate of target detection.
[0033] Additional aspects and advantages of the embodiments of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0035] Figure 1 is a flow chart of a target detection method provided in an embodiment of the present application;
[0036] Figure 2 is a flow chart of a method for training a target detection model provided in an embodiment of the present application;
[0037] Figure 3It is a schematic diagram of the application of performing target detection on the image to be detected based on the false detection screening model when the false detection screening model includes two cascaded false detection screening sub-models provided in an embodiment of the present application;
[0038] Figure 4 It is a flow chart of a method for training a false detection screening model provided in an embodiment of the present application;
[0039] Figure 5 is a flow chart of another method for training a false detection screening model provided in an embodiment of the present application;
[0040] Figure 6 is a flow chart of another method for training a false detection screening model provided in an embodiment of the present application;
[0041] Figure 7 is a flow chart of another method for training a false detection screening model provided in an embodiment of the present application;
[0042] Figure 8 is a flow chart of another method for training a false detection screening model provided in an embodiment of the present application;
[0043] Fig. 9 is a schematic diagram of another target detection method provided in an embodiment of the present application;
[0044] Fig.10 is a schematic diagram of another target detection method provided in an embodiment of the present application;
[0045] Fig.11 is a schematic diagram of a target detection device provided in an embodiment of the present application;
[0046] Fig.12 is a schematic diagram of another target detection device provided in an embodiment of the present application;
[0047] Fig.13 This is a hardware structure block diagram of a server of the target detection method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0048] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work belong to the scope of protection of this application. Examples of the embodiments are shown in the drawings, where the same or similar reference numerals throughout represent the same or similar elements or elements with the same or similar functions.
[0049] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0050] Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology and machine learning / deep learning.
[0051] In recent years, with the research and progress of artificial intelligence technology, artificial intelligence technology has been widely used in many fields. The solution provided in the embodiment of the present application involves artificial intelligence machine learning / deep learning and other technologies, which are specifically described by the following embodiments:
[0052] Figure 1 This is a flow chart of a target detection method provided in an embodiment of the present application. Please refer to Figure 1 The target detection method provided in this embodiment includes the following steps:
[0053] S101, obtaining an image to be detected.
[0054] In practical applications, the images to be detected may include but are not limited to real-life photos (such as photos taken by mobile terminals such as mobile phones, monitoring images obtained by vehicle monitoring equipment or fixed monitoring equipment, and satellite remote sensing images, etc.), animated images (such as animated images produced by computers, artificially synthesized images, etc.) and medical images. In the embodiments of this specification, taking the medical images as an example, the medical images may include but are not limited to computed tomography images (CT images), wherein computed tomography images have the characteristics of fast scanning time and clear images, and can be used for the examination of various diseases; the images to be identified may also include but are not limited to magnetic resonance images, X-ray images, CT angiography images (CTA, CT angiography, which combines CT enhancement technology with thin-layer, large-range, and rapid scanning technology, and can clearly display the details of blood vessels in various parts of the body through processing), B-ultrasound images and MRI images.
[0055] In the embodiment of this specification, acquiring the image to be detected may include:
[0056] The image to be detected is preprocessed.
[0057] In a specific embodiment, when the image to be detected includes a medical image, such as a computed tomography image (CT image), the preprocessing of the image to be detected may include:
[0058] (1) Determine a target image in the image to be detected.
[0059] Specifically, the determining the target image in the image to be detected may include extracting the target image from the image to be detected; or eliminating non-target images from the image to be detected.
[0060] In practical applications, for example, when performing lung nodule detection, the lung parenchyma area in the image to be detected is determined, noise is removed, and only the area (lung area) that is beneficial to lung nodule detection is retained, which is beneficial to improving the efficiency and reliability of lung nodule detection; when performing brain tumor detection, non-brain tissues such as skull, eyes and muscle tissue are removed.
[0061] (2) Performing data enhancement on the image to be detected.
[0062] Specifically, the data enhancement of the image to be detected may include but is not limited to adding noise, translating and scaling the image to be detected.
[0063] (3) Performing normalization processing on the image to be detected.
[0064] Specifically, the normalization processing of the image to be detected may include performing maximum and minimum normalization on the image to be detected, and normalizing the pixel value of the image to be detected to within a preset pixel range, wherein the preset pixel range can be set according to actual application requirements.
[0065] In practical applications, the preprocessing of the image to be detected may also include but is not limited to: data format conversion, denoising, image cropping, and / or resampling of the image to be detected; and the embodiments of the present invention are not limited to medical images. For other types of images to be detected, obtaining the image to be detected may also include preprocessing the image to be detected. By performing image preprocessing on the image to be detected, some unfavorable factors can be eliminated, the efficiency and accuracy of target detection can be improved, and the result of target detection can be more reliable.
[0066] S102: Performing target detection on the image to be detected based on the target detection model to obtain a first target detection result.
[0067] Specifically, the target detection model is trained based on sample images to be detected and corresponding target annotation results.
[0068] In an embodiment of the present specification, the first target detection result may indicate a detection frame including the detected target, and the detection frame may be a regular shape or an irregular shape depending on the actual application requirements, such as detecting "puppy" and "pedestrian" from real-life photos, detecting lung nodules from medical images (such as computed tomography images), etc.
[0069] In a specific embodiment, the target detection model may include a lung nodule detection model, which is obtained by performing lung nodule detection training based on a sample image to be detected and a corresponding lung nodule annotation result.
[0070] Specifically, the training method of the target detection model may include:
[0071] S201: Obtain a first sample training set;
[0072] In this embodiment of the specification, obtaining the first sample training set may include:
[0073] (1) Obtain a first sample image set,
[0074] Specifically, the first sample image set includes a plurality of sample images to be detected and corresponding target annotation results;
[0075] (2) using a second neural network model to perform preliminary detection on the sample image set to generate a large number of candidate regions;
[0076] (3) Determine the degree of overlap between the candidate region and the corresponding target annotation result (preset gold standard detection frame);
[0077] (4) The candidate regions whose overlap with the preset gold standard detection frame is greater than or equal to a preset threshold are marked as positive samples for target detection model training, and the candidate regions whose overlap with the preset gold standard detection frame is less than a preset threshold are marked as negative samples for target detection model training. The positive samples for target detection model training and the negative samples for target detection model training are used as the first sample training set.
[0078] In the embodiment of this specification, after obtaining the first sample training set, the method further includes:
[0079] S202: Performing target detection training on a second neural network model based on the first sample training set;
[0080] S203: Calculating an error value between a first target detection result output by the second neural network model and a target labeling result corresponding to the sample training image based on a first loss function;
[0081] S204: Determine whether the error value satisfies a first preset condition;
[0082] S205: When the result of the judgment is no, adjusting the model parameters in the second neural network model based on the network optimization function, and repeating the above steps of target detection to judgment;
[0083] S206: When the result of the judgment is yes, the current second neural network model is used as the target detection model.
[0084] Specifically, the first loss function may include but is not limited to a Dice loss function, a Focal loss function or a joint loss function; the network optimization function used may adopt an Adam adaptive optimizer, which can automatically adjust the parameter update amplitude according to the training state.
[0085] In practical applications, the neural network used in the target detection model may include but is not limited to Faster R-CNN (Faster Region-CNN) network, FPN (Feature Pyramid Networks) network, YOLO (You Only Look Once) network, SSD (Single Shot MultiBox Detector) network, etc.
[0086] By performing target detection on the image to be detected based on the target detection model, a first target detection result is obtained, which is equivalent to obtaining a preliminary target detection result. It is flexible, convenient and fast. However, since the target detection network cannot fully learn relevant features during the training process, the model may mistakenly judge that a place that was not a target is a detection target, that is, the first target detection result may contain some false positive results. The false positive result may include the result of the model mistakenly judging that a place that was not a target was determined as a detection target, that is, a false detection result that was predicted to be a target but was not actually a target. In order to improve the reliability and accuracy of target detection, it is necessary to use a false detection screening model to perform false detection screening.
[0087] S103: Perform false detection screening on the first target detection result based on the false detection screening model to obtain a second target detection result.
[0088] The false detection screening model is obtained by clustering the false detection results obtained by testing the target detection model and then training, and the false detection screening model includes one or more cascaded false detection screening sub-models.
[0089] Specifically, the first target detection result may include an image to be detected marked with one or more detection boxes. When the first target detection result is screened for false detection based on the false detection screening model, the false detection screening model only performs false detection screening on the area in the image to be detected marked with the detection box. In one embodiment, the false detection screening of the first target detection result based on the false detection screening model may include resampling the first target detection result. In practical applications, the resampling may perform region selection on the image to be detected according to the detection box marked in the image to be detected. Specifically, the region selection may enlarge the detection box to a preset size according to the position of the marked detection box (in order to completely include the area of interest and improve the accuracy of false detection screening), use the enlarged area as the selected area, and perform false detection screening on the selected area based on the false detection screening model to obtain a second target detection result (i.e., the final output result). When the false detection screening model includes multiple false detection screening sub-models, the steps are similar. The latter-level false detection screening sub-model only performs false detection screening on the result output by the previous-level false detection screening sub-model cascaded with it, and the specific process is not repeated here.
[0090] In a specific embodiment, after the first target detection result is screened for false detection based on the false detection screening model, the obtained second target detection result may include the image to be detected after false positive results are screened out for one or more detection boxes in the first target detection result, that is, false detection screening is performed on the image to be detected marked with one or more detection boxes, and false positive results are determined for screening out (in one embodiment, false positive results are determined for screening out by determining results with a confidence level lower than a preset value and screening out them, that is, only results with a confidence level higher than a preset value in the first target detection result are retained). In actual applications, when the false detection screening model includes multiple cascaded false detection screening sub-models, please refer to Figure 3 , Figure 3 This is a schematic diagram of the application of target detection on the image to be detected based on the false detection screening model when the false detection screening model includes two cascaded false detection screening sub-models. At this time, the target detection may include lung nodule detection. After the target detection (pulmonary nodule detection) is performed on the image to be detected based on the target detection model, the first target detection result obtained includes the image to be detected marked with 6 lung nodule detection frames. After false detection screening is performed by the first false detection screening sub-model, 2 of the 6 lung nodule detection frames are determined to be false positive results and are screened out, that is, the image to be detected marked with 4 lung nodule detection frames is output, and then the false detection screening is performed by the second false detection screening sub-model cascaded with the first false detection screening sub-model, and 1 of the 4 lung nodule detection frames is determined to be a false positive result (a false positive result that cannot be filtered out by the first false detection screening sub-model) and is screened out, that is, the image to be detected marked with 3 lung nodule detection frames is finally output, and the final result is obtained by filtering layer by layer.
[0091] By performing false detection screening on the first target detection result based on the false detection screening model to obtain the second target detection result, the false positive results generated by the target detection model can be effectively suppressed. The false detection screening model is obtained by clustering the false detection results obtained by testing the target detection model and then training, which is conducive to screening out negative samples with unique characteristics, obtaining negative samples that are most helpful to the model, and thus training a more targeted false detection screening model, improving the performance of the false detection screening model, solving the more typical false positive problem, and improving the accuracy and reliability of target detection; and the false detection screening model includes one or more cascaded false detection screening sub-models, which can filter out false positive results layer by layer when performing target detection, which is equivalent to using the latter-level false detection screening sub-model to eliminate false positive targets from the detection results of the previous-level false detection screening sub-model, so that the accuracy of false detection screening is better; at this time, since the first target detection result is input into the false detection screening model, the false detection screening model only performs false detection screening on the first target detection result detected by the target detection model, and does not pay attention to other parts of the image to be detected, so that false positive results can be fully filtered and the false detection screening efficiency is high.
[0092] like Figure 4 As shown, in the embodiment of this specification, the false detection screening model is obtained by training after clustering the false detection results obtained by the target detection model test, and the false detection screening model may include one or more cascaded false detection screening sub-models. Specifically, the training method of the false detection screening model may include:
[0093] S401: Obtain a second sample training set;
[0094] like Figure 5 As shown, in this embodiment of the specification, obtaining the second sample training set may include:
[0095] S501: Obtain a first sample verification set;
[0096] Specifically, the first sample verification set includes a plurality of sample images to be detected and corresponding target annotation results (preset gold standard detection frames);
[0097] S502: Performing target detection on the first sample verification set based on the target detection model to determine a first false detection result;
[0098] Specifically, performing target detection on the first sample verification set based on the target detection model to determine a first false detection result may include:
[0099] Based on the target detection model, target detection is performed on the first sample verification set to obtain a target detection test result, and the target detection test result is compared with the corresponding target annotation result (preset gold standard detection frame) to obtain a first false detection result.
[0100] S503: Perform clustering processing on the first false detection results to obtain first false detection screening negative samples.
[0101] Specifically, the clustering of the first false detection results may include determining false detection results with similar features in the first false detection results, and marking the false detection results with similar features as the same category. In practical applications, in order to distinguish different categories, a unique identification information may be generated for each category so that the categories can be distinguished from each other. In practical applications, for example, the categories may be encoded using numbers, English letters, special symbols, or a combination thereof. Specifically, for example, the categories may be encoded in sequence using numbers 1, 2, 3, etc., but the embodiments of the present invention are not limited thereto.
[0102] In practical applications, the clustering method used when clustering the first false detection result may include but is not limited to K-Means (k-means clustering algorithm) and GMM (Gaussian mixture model).
[0103] By clustering the first false detection results, the false detection results with similar features are classified into the same category, which is helpful to screen out negative samples with unique features, obtain negative samples that are most helpful to the model, and thus train a more targeted false detection screening model, thereby improving the performance of the false detection screening model. In subsequent use, the false positive results that could not be screened out by the model in the previous stage of detection (target detection model detection) can be more targeted, thereby improving the accuracy and reliability of target detection.
[0104] In the embodiment of this specification, before clustering the first false detection result, the method may further include:
[0105] S601: Perform dimensionality reduction processing on the first false detection result.
[0106] Specifically, the dimensionality reduction processing performed on the first false detection result can remove redundant parts in the image, use fewer dimensions to represent features, speed up calculations, and improve the efficiency of model training.
[0107] In some embodiments, before performing dimensionality reduction processing on the first false detection result, the method also includes performing image cropping on the first false detection result to remove noise and improve model training efficiency.
[0108] In practical applications, the clustering method used when clustering the first false detection result may include but is not limited to PCA (Principal Components Analysis) and KPCA (Kernel Principal Component Analysis).
[0109] like Figure 7 As shown, in the embodiment of the present specification, in order to obtain more false positive screening negative samples, improve the performance of the false positive screening model, and make the false positive screening more accurate, after clustering the first false positive result, the clustered first false positive result can be used as the first clustered false positive result, and the method can also include:
[0110] S701: Obtain a third sample training set;
[0111] Specifically, the third sample training set may include a newly acquired sample training set. Specifically, the third sample training set includes multiple sample images to be detected and corresponding target annotation results. In some embodiments, the third sample training set may also directly use the first sample training set obtained during the target detection model training. The embodiments of this specification are not limited to this.
[0112] S702: Performing target detection on the third sample training set based on the target detection model to determine a supplementary sample false detection result;
[0113] Based on the target detection model, target detection is performed on the third sample training set to obtain a target detection test result, and the target detection test result is compared with the corresponding target annotation result (preset gold standard detection frame) to obtain a supplementary sample false detection result.
[0114] S703: performing clustering processing on the first clustering false detection result and the supplementary sample false detection result to obtain a supplementary clustering sample;
[0115] S704: Use the supplementary cluster samples as the first false positive screening negative samples.
[0116] By obtaining a third sample training set, performing target detection on the third sample training set based on the target detection model, determining the false detection results of the supplementary samples, and further clustering the first clustering false detection results and the supplementary sample false detection results to obtain supplementary clustering samples, and using the supplementary clustering samples as the first false detection screening negative samples, more false detection screening negative samples can be obtained (equivalent to supplementing more samples for each false detection category), which is beneficial to improving the performance of the false detection screening model and obtaining a better false detection screening model, thereby improving the accuracy of false detection screening.
[0117] In the embodiment of the present specification, before clustering the first clustering false detection result and the supplementary sample false detection result, the method further includes:
[0118] A dimensionality reduction process is performed on the false detection results of the supplementary samples.
[0119] Specifically, the dimensionality reduction processing performed on the false detection results of the supplementary samples can remove redundant parts in the image, use fewer dimensions to represent features, speed up calculations, and improve the efficiency of model training.
[0120] In some embodiments, before the dimensionality reduction processing is performed on the false detection results of the supplementary samples, image cropping of the false detection results of the supplementary samples may be performed to remove noise and improve the efficiency of model training.
[0121] In practical applications, the clustering method used when performing dimensionality reduction processing on the false detection results of the supplementary samples may include but is not limited to PCA (Principal Components Analysis) and KPCA (Kernel Principal component analysis).
[0122] like Figure 8 As shown, in the embodiment of this specification, after clustering the first false detection result, the method may further include:
[0123] S801: Perform weight configuration based on preset configuration information and / or the average confidence of each category in the first false detection result, and use the first false detection result after weight configuration as the first false detection screening negative sample.
[0124] Specifically, the preset configuration information can be set according to actual application needs. In a specific embodiment, for example, in the detection of lung nodules, there are more typical false positive results such as flocs and strips, and weight configuration can be performed according to actual application needs. For example, a higher weight is set for the more typical false positive categories (flocs and strips); in other embodiments, the weight configuration can be performed according to the average confidence of each category in the first false detection result, or the weight configuration can be performed in combination with the preset configuration information and the average confidence of each category in the first false detection result. In actual applications, after the weight configuration is performed based on the preset configuration information and / or the average confidence of each category in the first false detection result, the weights of the categories can also be ranked, and samples of a preset number of categories in the top ranking are determined as the first false detection screening negative samples.
[0125] By configuring weights based on preset configuration information and / or the average confidence of each category in the first false detection result, and using the first false detection result after weight configuration as the first false detection screening negative sample, it is possible to screen out negative samples that better meet the requirements of the false detection screening model, thereby determining on what types of data the current trained model has poor detection performance, and being able to screen out false positive results according to actual application needs, so as to train the next-level model in a targeted manner, allowing the next-level model to filter out false positive detection results in a targeted manner, which is more flexible and can improve the detection accuracy and reliability of the overall cascade target detection model.
[0126] S504: Obtain a first false positive screening positive sample, use the first false positive screening negative sample as a negative sample for training a first false positive screening sub-model, and use the first false positive screening positive sample and the first false positive screening negative sample as the second sample training set.
[0127] In the embodiment of this specification, obtaining the first false positive screening sample may include:
[0128] 1) using the first neural network model to perform preliminary detection on the first sample verification set to generate a large number of candidate regions;
[0129] 2) Determine the degree of overlap between the candidate region and the corresponding target annotation result (preset gold standard detection frame);
[0130] 3) The candidate regions whose overlap with the preset gold standard detection frame is greater than or equal to a preset threshold are marked as the first false detection screening positive samples.
[0131] In the embodiment of the present invention, after obtaining the second sample training set, the method further includes:
[0132] S402: Performing target detection training on the first neural network model based on the second sample training set;
[0133] S403: Calculating an error value between a second target detection result output by the first neural network model and a target labeling result corresponding to the sample training image based on a second loss function;
[0134] S404: Determine whether the error value satisfies a second preset condition;
[0135] S405: When the result of the judgment is no, adjusting the model parameters in the first neural network model based on the network optimization function, and repeating the above steps of target detection to judgment;
[0136] S406: When the result of the judgment is yes, the current first neural network model is used as the first false detection screening sub-model.
[0137] Specifically, the second loss function may include but is not limited to a Dice loss function, a Focal loss function or a joint loss function; the network optimization function used may adopt an Adam adaptive optimizer, which may automatically adjust the parameter update amplitude according to the training state.
[0138] In practical applications, the neural network used in the false detection screening model may include but is not limited to Faster R-CNN (Faster Region-CNN) network, FPN (Feature Pyramid Networks) network, YOLO (You Only Look Once) network, SSD (Single Shot MultiBox Detector) network, etc.
[0139] In one embodiment, when the false positive screening model includes only one false positive screening sub-model, the first false positive screening sub-model is used as the false positive screening model.
[0140] By clustering the false detection results obtained from the target detection model test and using them as negative samples for training the false detection screening model, it is helpful to screen out negative samples with unique features, obtain negative samples that are most helpful to the model, and thus train a more targeted false detection screening model, thereby improving the performance of the false detection screening model. In subsequent use, it can effectively suppress the false positive results generated by the target detection model, thereby improving the accuracy and reliability of target detection.
[0141] In another embodiment, when the false positive screening model includes a plurality of cascaded false positive screening sub-models, taking the false positive screening model including two false positive screening sub-models as an example, when the false positive screening model includes two false positive screening sub-models, the training method of the false positive screening model may further include:
[0142] (1) Obtaining a fourth sample training set;
[0143] In this embodiment of the specification, obtaining the fourth sample training set may include:
[0144] 1) Obtain a second sample verification set;
[0145] Specifically, the second sample verification set includes a plurality of sample images to be detected and corresponding target annotation results (preset gold standard detection frames);
[0146] 2) performing target detection on the second sample validation set based on the first false detection screening sub-model to determine a second false detection result;
[0147] Specifically, the specific process of performing target detection on the second sample verification set based on the first false detection screening sub-model and determining the second false detection result is similar to S502, and the relevant description of S502 can be referred to, which will not be repeated here.
[0148] 3) Clustering the second false detection results to obtain second false detection screening negative samples.
[0149] Specifically, the specific process of clustering the second false detection result to obtain the second false detection screening negative sample is similar to S503, and you can refer to the relevant description of S503. After the second false detection result is clustered, the method can also include: obtaining a fifth sample training set; performing target detection on the fifth sample training set based on the first false detection screening sub-model to determine the supplementary sample false detection result, and clustering the clustered second false detection result and the supplementary sample false detection result to obtain a supplementary cluster sample, and using the supplementary cluster sample as the second false detection screening negative sample. The specific steps are similar to S701~S704, and you can refer to the relevant description of S701~S704, which will not be repeated here.
[0150] 4) Obtain a second false positive screening positive sample, use the second false positive screening negative sample as a negative sample for training a second false positive screening sub-model, and use the second false positive screening positive sample and the second false positive screening negative sample as the fourth sample training set.
[0151] Specifically, obtaining the second false positive screening positive sample may include: using a third neural network model to perform preliminary detection on the second sample verification set to generate a large number of candidate regions; determining the degree of overlap between the candidate regions and the corresponding target annotation results (preset gold standard detection frames); and marking the candidate regions whose degree of overlap with the preset gold standard detection frames is greater than or equal to a preset threshold as the second false positive screening positive sample.
[0152] (2) training the third neural network model for target detection based on the fourth sample training set;
[0153] (3) calculating an error value between a third target detection result output by the third neural network model and a target annotation result corresponding to the sample training image based on a third loss function;
[0154] (4) determining whether the error value satisfies a third preset condition;
[0155] (5) When the result of the judgment is no, adjusting the model parameters in the third neural network model based on the network optimization function, and repeating the above steps of target detection to judgment;
[0156] (6) When the result of the judgment is yes, the current third neural network model is used as the second false detection screening sub-model.
[0157] Specifically, the third loss function may include but is not limited to a Dice loss function, a Focal loss function or a joint loss function; the network optimization function used may adopt an Adam adaptive optimizer, which may automatically adjust the parameter update amplitude according to the training state.
[0158] In practical applications, the neural network used by each false positive screening sub-model may include but is not limited to FasterR-CNN (Faster Region-CNN) network, FPN (Feature Pyramid Networks) network, YOLO (You Only Look Once) network, SSD (Single Shot MultiBox Detector) network, etc.
[0159] By analogy, in an embodiment of the present specification, when the false detection screening model includes multiple cascaded false detection screening sub-models, a new verification set can be obtained, and target detection can be performed on the new verification set based on the Nth false detection screening sub-model (N is an integer greater than or equal to 1), to determine the (N+1)th false detection result, cluster the (N+1)th false detection result to obtain the (N+1)th false detection screening negative sample, use the (N+1)th false detection screening negative sample (i.e., the false positive result of the Nth false detection screening sub-model after clustering) as the negative sample for training the (N+1)th false detection screening sub-model, and obtain the (N+1)th false detection result. +1) false positive screening positive samples, (obtaining the (N+1)th false positive screening positive samples may include: using a neural network model to perform preliminary detection on the acquired new verification set to generate a large number of candidate regions; determining the overlap between the candidate regions and the corresponding target annotation results (i.e., the preset gold standard detection frame); marking the candidate regions whose overlap with the preset gold standard detection frame is greater than or equal to a preset threshold as the (N+1)th false positive screening positive samples.) The (N+1)th false positive screening positive samples and the (N+1)th false positive screening negative samples are used as sample training sets for training the (N+1)th false positive screening sub-model. In this way, the (N+1)th false positive screening sub-model can screen for defects in the previous false positive screening sub-model (the Nth false positive screening sub-model), that is, when used subsequently, the result of the target detection performed by the (N+1)th false positive screening sub-model does not include some false positive results that may be detected by the Nth false positive screening sub-model.
[0160] By training a false positive screening model, and the false positive screening model may include one or more cascaded false positive screening sub-models, false positive results can be filtered out layer by layer during target detection, and by clustering the false positive results obtained by the previous model test, it is beneficial to screen out negative samples with unique characteristics, obtain negative samples that are most helpful to the model, and thus train a more targeted false positive screening model, improve the performance of the false positive screening model, and in subsequent use, it is possible to more targetedly filter the false positive results that could not be screened out by the model in the previous stage of detection (target detection model detection), solve the more typical false positive problem, and improve the accuracy and reliability of target detection; by determining additional cluster samples, more false positive screening negative samples can be obtained (equivalent to adding more samples to each false detection category), which is beneficial to improving the performance of the false positive screening model, obtaining a better false positive screening model, and thus making the false detection screening more accurate; and at this time, since the first target detection result is input into the false detection screening model, the false detection screening model only performs false detection screening on the first target detection result detected by the target detection model, and does not pay attention to other parts of the image to be detected, so that false positive results can be fully filtered and the false detection screening efficiency is high.
[0161] The embodiment of the present invention performs target detection on the image to be detected based on the target detection model to obtain a first target detection result, which is equivalent to obtaining a preliminary target detection result, and is flexible, convenient and fast. By performing false detection screening on the first target detection result based on the false detection screening model to obtain a second target detection result, the false positive results generated by the target detection model can be effectively suppressed. The false detection screening model is trained after clustering the false detection results obtained by testing the target detection model, which is conducive to screening out negative samples with unique features, obtaining negative samples that are most helpful to the model, and thus training a more targeted false detection screening model, improving the performance of the false detection screening model, solving the more typical false positive problem, and improving the accuracy and reliability of target detection.
[0162] The false positive screening model includes one or more cascaded false positive screening sub-models, which can filter out false positive results layer by layer when performing target detection, which is equivalent to using the next-level false positive screening sub-model to eliminate false positive targets from the detection results of the previous-level false positive screening sub-model, so that the accuracy of false positive screening is better. By performing dimensionality reduction processing on the false detection results, the redundant parts in the image can be removed, and fewer dimensions can be used to represent features, speed up the calculation speed, and improve the efficiency of model training. By obtaining a third sample training set, performing target detection on the third sample training set based on the target detection model, determining the false positive results of the supplementary samples, clustering the first cluster false positive results and the supplementary sample false positive results, and obtaining supplementary cluster samples, the supplementary cluster samples are used as the false positive screening negative samples, and more false positive screening negative samples can be obtained, which is conducive to improving the performance of the false positive screening model and obtaining a better false positive screening model, thereby improving the accuracy of false positive screening. By configuring weights based on preset configuration information and / or the average confidence of each category in the first false detection result, negative samples that better meet the requirements of the false detection screening model can be screened out, so that it is possible to determine on what types of data the current trained model has poor detection performance, and to screen false positive results according to actual application needs, so as to train the next level model in a targeted manner.
[0163] like Fig. 9 As shown, in some other embodiments, the target detection method may include:
[0164] S901: Acquire an image to be detected.
[0165] Specifically, the specific process of acquiring the image to be detected is similar to S101, and reference may be made to the relevant description of S101, which will not be repeated here.
[0166] S902: Performing target detection on the image to be detected based on the target detection model to obtain a first target detection result.
[0167] Specifically, the specific process of performing target detection on the image to be detected based on the target detection model to obtain the first target detection result is similar to S102, and reference may be made to the relevant description of S102, which will not be repeated here.
[0168] Specifically, the target detection model is trained based on the sample image to be detected and the corresponding target annotation results, and the training method of the target detection model can refer to the relevant descriptions of S201 to S206. By performing target detection on the image to be detected based on the target detection model, a first target detection result is obtained, which is equivalent to obtaining a preliminary target detection result. It is flexible, convenient and fast. However, since the target detection network cannot fully learn relevant features during the training process, the model may mistakenly judge that a place that was not a target is a detection target, that is, the first target detection result may contain some false positive results. In order to improve the reliability and accuracy of target detection, it is necessary to use a false detection screening model to perform false detection screening.
[0169] S903: Performing target detection on the image to be detected based on the false detection screening model to obtain a third target detection result.
[0170] Specifically, the false detection screening model is obtained by training after clustering the false detection results obtained by testing the target detection model, and the false detection screening model may include one or more false detection screening sub-models.
[0171] In the embodiments of this specification, the training method of the false detection screening model can refer to the relevant descriptions of S401 to S406, which will not be repeated here.
[0172] S904: Determine the intersection of the first target detection result and the third target detection result.
[0173] S905: Taking the intersection of the first target detection result and the third target detection result as the target detection result after false detection screening.
[0174] In an embodiment of the present specification, the false detection results obtained by testing the target detection model after clustering processing can be used as negative samples of the false detection screening model, and the first false detection screening positive samples are obtained for false detection screening training to obtain the false detection screening model, that is, the false detection screening model is trained for the defects of the target detection model, so the third target detection result does not include some false positive results in the first target detection result obtained after target detection of the image to be detected based on the target detection model, but the third target detection result can include the correct results in the first target detection result and some erroneous results not included in the first target detection result, so by determining the intersection of the first target detection result and the third target detection result, the intersection of the first target detection result and the third target detection result is used as the target detection result after false detection screening, which can simultaneously exclude some false positive results in the first target detection result and some additional erroneous results generated in the third target detection result.
[0175] In a specific embodiment, for example, when the target detection includes lung nodule detection, the first target detection result obtained by performing target detection on the image to be detected based on the target detection model includes four lung nodule detection frames A, B, C, and D, and the third target detection result obtained after performing target detection on the image to be detected based on the false detection screening model includes five lung nodule detection frames B, C, D, E, and F. The intersection of the first target detection result and the third target detection result determined includes three lung nodule detection frames B, C, and D. These three lung nodule detection frames are the target detection results after false detection screening (i.e., the target detection results finally outputted). At this time, the lung nodule detection frame A is the false positive result that has been screened out.
[0176] By acquiring an image to be detected, target detection is performed on the image to be detected based on a target detection model to obtain a first target detection result, which is fast and flexible; target detection is performed on the image to be detected based on a false positive screening model to obtain a third target detection result, and the intersection of the first target detection result and the third target detection result is determined, and the intersection of the first target detection result and the third target detection result is used as the target detection result after false positive screening, wherein the false positive screening model is trained after clustering the false detection results obtained by testing the target detection model, and can screen out negative samples with unique characteristics, solve the more typical false positive problem, and is conducive to the subsequent improvement of the target detection rate.
[0177] In an embodiment of the present specification, when the false detection screening model includes multiple cascaded false detection screening sub-models, a new verification set can be obtained, and target detection can be performed on the new verification set based on the Nth false detection screening sub-model (N is an integer greater than or equal to 1), to determine the (N+1)th false detection result, cluster the (N+1)th false detection result to obtain the (N+1)th false detection screening negative sample, use the (N+1)th false detection screening negative sample (i.e., the false positive result of the Nth false detection screening sub-model after clustering) as the negative sample for training the (N+1)th false detection screening sub-model, and obtain the (N+1)th false detection result. +1) false positive screening positive samples, (obtaining the (N+1)th false positive screening positive samples may include: using a neural network model to perform preliminary detection on the acquired new verification set to generate a large number of candidate regions; determining the degree of overlap between the candidate regions and the corresponding target annotation results (i.e., the preset gold standard detection frame); marking the candidate regions whose degree of overlap with the preset gold standard detection frame is greater than or equal to a preset threshold as the (N+1)th false positive screening positive samples.) The (N+1)th false positive screening positive samples and the Nth false positive screening negative samples are used as sample training sets for training the (N+1)th false positive screening sub-model. In this way, the (N+1)th false positive screening submodel can screen for the defects of the previous false positive screening submodel (the Nth false positive screening submodel). That is, when the (N+1)th false positive screening submodel is used later for target detection, the result will not include some false positive results that may be detected by the Nth false positive screening submodel. However, because only the false positive results of the previous false positive screening submodel are selected as the training negative samples for the next false positive screening submodel in the cascade, the (N+1)th false positive screening submodel will not include the Nth false positive screening submodel in the result when performing target detection on the image to be detected. The sub-model may obtain false positive results when performing target detection on the image to be detected, but it may also include the correct results in the detection results of the target detection of the image to be detected by the Nth false detection screening sub-model and the error results that are not included in the detection results of the Nth false detection screening sub-model. Therefore, it is necessary to determine the intersection of the target detection results output by the Nth false detection screening sub-model and the target detection results output by the (N+1)th false detection screening sub-model, which is equivalent to using the target detection results of the latter level false detection screening sub-model to eliminate false positive targets from the target detection results of the previous level false detection screening sub-model.
[0178] like Fig.10 As shown, in the embodiment of this specification, after determining the intersection of the first target detection result and the third target detection result, the method may further include:
[0179] S1001: Determine the objects in the third target detection result whose confidence level is greater than a preset threshold.
[0180] Specifically, the preset threshold can be set according to application testing or actual application requirements.
[0181] S1002: taking the objects in the third target detection result whose confidence level is greater than a preset threshold and the intersection of the first target detection result and the third target detection result as the target detection result after false detection screening.
[0182] Since the third target detection result obtained after target detection of the image to be detected based on the false detection screening model contains some results that are not included in the first target detection result, these results that are not included in the first target detection result may include some additional correct detection results (correct results that the target detection model failed to detect) in addition to the false results not included in the first target detection result, therefore, by determining the objects in the third target detection result whose confidence is greater than the preset threshold (the higher the confidence, the greater the possibility of the target object to be detected), the objects in the third target detection result whose confidence is greater than the preset threshold and the intersection of the first target detection result and the third target detection result are used as the target detection result after false detection screening, which is equivalent to supplementing the final output result, improving the detection rate of the target, and is conducive to improving the reliability of the final target detection result. When the false detection screening model includes multiple cascaded false detection screening sub-models, the objects in each false detection screening sub-model with a confidence greater than the preset threshold can be determined, and the objects in each false detection screening sub-model with a confidence greater than the preset threshold can be added to the final output result to improve the detection rate of target detection. The specific process is similar to the above process and will not be repeated here.
[0183] Taking the above-mentioned lung nodule detection as an example, in one embodiment, the preset threshold may include 0.95, and the confidence of the lung nodule detection box E included in the second target detection result is determined to be 0.98. At this time, the lung nodule detection box E and the intersection of the first target detection result and the second target detection result (three lung nodule detection boxes B, C, and D) can be used as the target detection result after false detection screening (that is, the final output target detection result is four lung nodule detection boxes B, C, D, and E), which is equivalent to adding the additional detection result of the lung nodule detection box E as a supplementary result to the final output result, thereby improving the lung nodule detection rate.
[0184] The present application also provides a target detection device, such as Fig.11 As shown, the device comprises:
[0185] The first image acquisition module 1110 is used to acquire an image to be detected;
[0186] The first target detection module 1120 is used to perform target detection on the image to be detected based on the target detection model to obtain a first target detection result;
[0187] The first false detection screening module 1130 is used to perform false detection screening on the first target detection result based on a false detection screening model to obtain a second target detection result, wherein the false detection screening model is trained after clustering the false detection results obtained by testing the target detection model, and the false detection screening model includes one or more cascaded false detection screening sub-models.
[0188] It should be noted that the sequence of device modules provided in the above embodiments of the present invention is for description only and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0189] In one embodiment, the target detection device further includes:
[0190] Verification set acquisition module: used to obtain sample verification sets;
[0191] Target detection test module: used to perform target detection on the sample verification set based on the target detection model to determine a first false detection result;
[0192] A first clustering module: used for performing clustering processing on the first false detection result to obtain a first false detection screening negative sample;
[0193] A first model training module: used for performing false detection screening training on a first neural network model based on the first false detection screening negative sample, and adjusting the model parameters of the first neural network model in the false detection screening training until a first loss function of the first neural network model satisfies a first convergence condition;
[0194] The first model determination module is used to use the current first neural network model as the false detection screening model when the first loss function of the first neural network model meets the first convergence condition.
[0195] In another embodiment, the target detection device further includes:
[0196] Weight configuration module: used to perform weight configuration based on preset configuration information and / or the average confidence of each category in the first false detection result after clustering the first false detection result, and use the first false detection result after weight configuration as the first false detection screening negative sample.
[0197] In another embodiment, the target detection device further includes:
[0198] The first dimension reduction module is used to perform dimension reduction processing on the first false detection results before performing clustering processing on the first false detection results.
[0199] In another embodiment, the target detection device further includes:
[0200] A result determination module: configured to determine a first clustering false detection result after clustering the first false detection result;
[0201] Training set acquisition module: used to obtain sample training sets;
[0202] A supplementary false detection sample determination module is used to perform target detection on the sample training set based on the target detection model to determine the false detection result of the supplementary sample;
[0203] A second clustering module: used for clustering the first clustering false detection results and the supplementary sample false detection results to obtain supplementary clustering samples;
[0204] The supplementary negative sample determination module is used to use the supplementary cluster samples as the first false positive screening negative samples.
[0205] In another embodiment, the target detection device further includes:
[0206] Training sample acquisition module: used to obtain sample images to be detected and corresponding target annotation results;
[0207] A second model training module: used for training the second neural network model for target detection based on the sample image to be detected and the corresponding target annotation result, and adjusting the model parameters of the second neural network model in the target detection training until the second loss function of the second neural network model satisfies the second convergence condition;
[0208] The second model determination module is used to use the current second neural network model as the target detection model when the second loss function of the second neural network model meets the second convergence condition.
[0209] In another embodiment, the target detection device further includes:
[0210] The second dimension reduction module is used for performing a dimension reduction process on the false detection results of the supplementary samples after performing a target detection on the sample training set based on the target detection model and determining the false detection results of the supplementary samples.
[0211] The present application also provides another target detection device, such as Fig.12 As shown, the device comprises:
[0212] The second image acquisition module 1210 is used to acquire an image to be detected;
[0213] A second target detection module 1220 is used to perform target detection on the image to be detected based on the target detection model to obtain a first target detection result;
[0214] A second false detection screening module 1230 is used to perform target detection on the image to be detected based on a false detection screening model to obtain a third target detection result, wherein the false detection screening model is obtained by clustering the false detection results obtained by testing the target detection model and then training;
[0215] An intersection determination module 1240, configured to determine an intersection of the first target detection result and the third target detection result;
[0216] The first detection result determination module 1250 is used to use the intersection of the first target detection result and the third target detection result as the target detection result after false detection screening.
[0217] In one embodiment, the another target detection device may further include:
[0218] A threshold object determination module is used to determine an object in the third target detection result whose confidence is greater than a preset threshold after determining the intersection of the first target detection result and the third target detection result.
[0219] The second detection result determination module is used to use the objects in the third target detection result whose confidence is greater than a preset threshold and the intersection of the first target detection result and the third target detection result as the target detection result after false detection screening.
[0220] Specifically, the above modules of the target detection device can be coupled and communicated via a bus.
[0221] The device and method embodiments in the device embodiments are based on the same application concept.
[0222] An embodiment of the present application provides a target detection device, which includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement a target detection method provided in the above method embodiment.
[0223] An embodiment of the present application provides another target detection device, which includes a processor and a memory, in which at least one instruction or at least one program is stored, and the at least one instruction or the at least one program is loaded and executed by the processor to implement another target detection method provided in the above method embodiment.
[0224] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal, a server or a similar computing device. Taking running on a server as an example, Fig.13is a hardware structure block diagram of a server of a target detection method provided in an embodiment of the present application. Fig.13 As shown, the server 1300 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 1310 (the processor 1310 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 1330 for storing data, and one or more storage media 1320 (such as one or more mass storage devices) for storing application programs 1323 or data 1322. Among them, the memory 1330 and the storage medium 1320 can be short-term storage or permanent storage. The program stored in the storage medium 1320 may include one or more modules, each of which may include a series of instruction operations on the server. Furthermore, the central processing unit 1310 can be configured to communicate with the storage medium 1320 and execute a series of instruction operations in the storage medium 1320 on the server 1300. The server 1300 may also include one or more power supplies 1360, one or more wired or wireless network interfaces 1350, one or more input and output interfaces 1340, and / or one or more operating systems 1321, such as Windows Server 2003 or Windows Server 2008. TM , Mac OSX TM , Unix TM , Linux TM , FreeBSD TM etc.
[0225] The input / output interface 1340 may be used to receive or send data via a network. The specific example of the network may include a wireless network provided by a communication provider of the server 1300. In one example, the input / output interface 1340 includes a network adapter (Network Interface Controller, NIC), which may be connected to other network devices through a base station so as to communicate with the Internet. In one example, the input / output interface 1340 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0226] It can be understood by those skilled in the art that Fig.13 The structure shown is for illustration only and does not limit the structure of the above electronic device. Fig.13 More or fewer components as shown, or with Fig.13 Different configurations are shown.
[0227] An embodiment of the present application also provides a storage medium, which can be set in a server to store at least one instruction or at least one program related to a target detection method in a method embodiment. The at least one instruction or the at least one program is loaded and executed by the processor to implement the target detection method provided by the above method embodiment.
[0228] Optionally, in this embodiment, the storage medium may be located in at least one of the multiple network servers of the computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to, various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
[0229] It can be seen from the embodiments of the target detection method, device, server or storage medium provided by the present application that a target detection method in the present application can obtain a first target detection result by performing target detection on the image to be detected based on the target detection model, which is equivalent to obtaining a preliminary target detection result, which is flexible, convenient and fast. By performing false detection screening on the first target detection result based on the false detection screening model to obtain the second target detection result, the false positive result generated by the target detection model can be effectively suppressed. The false detection screening model is obtained by clustering the false detection results obtained by the target detection model test and then training, which is conducive to screening out negative samples with unique characteristics, obtaining negative samples that are most helpful to the model, and thus training a more targeted false detection screening model, improving the performance of the false detection screening model, solving the more typical false positive problem, and improving the accuracy and reliability of target detection. And the false detection screening model includes one or more cascaded false detection screening sub-models, which can filter out false positive results layer by layer when performing target detection, which is equivalent to being able to use the latter level false detection screening sub-model to remove false positive targets from the detection results of the previous level false detection screening sub-model, so that the accuracy of false detection screening is better. By performing dimensionality reduction processing on the false detection results, the redundant parts in the image can be removed, and the features can be represented by fewer dimensions, which can speed up the calculation speed and improve the efficiency of model training. By obtaining the third sample training set, performing target detection on the third sample training set based on the target detection model, determining the false detection results of the supplementary samples, clustering the first cluster false detection results and the supplementary sample false detection results, and obtaining the supplementary cluster samples, the supplementary cluster samples are used as the false detection screening negative samples, and more false detection screening negative samples can be obtained, which is conducive to improving the performance of the false detection screening model and obtaining a better false detection screening model, thereby making the false detection screening more accurate. By configuring weights based on the preset configuration information and / or the average confidence of each category in the first false detection result, negative samples that better meet the requirements of the false detection screening model can be screened out, so that it is possible to determine on what type of data the current model that has been trained has poor detection performance, and can screen the false positive results according to the actual application needs, so as to train the next level model in a targeted manner.
[0230] Another target detection device in the present application obtains an image to be detected, performs target detection on the image to be detected based on a target detection model, and obtains a first target detection result, which is fast and flexible; performs target detection on the image to be detected based on a false detection screening model, obtains a third target detection result, determines the intersection of the first target detection result and the third target detection result, and uses the intersection of the first target detection result and the third target detection result as the target detection result after false detection screening, wherein the false detection screening model is obtained by clustering the false detection results obtained by the target detection model test and then training, and can screen out negative samples with unique characteristics, solve the more typical false positive problem, and is conducive to the subsequent improvement of the target detection rate. After determining the intersection of the first target detection result and the third target detection result, determine the object whose confidence is greater than a preset threshold in the third target detection result. Using the object whose confidence is greater than the preset threshold in the third target detection result and the intersection of the first target detection result and the third target detection result as the target detection result after false detection screening is equivalent to supplementing the final output result, improving the detection rate of the target, and is conducive to improving the reliability of the final target detection result.
[0231] It should be noted that the above-mentioned sequence of the embodiments of the present application is for description only and does not represent the advantages and disadvantages of the embodiments. The above-mentioned specific embodiments of this specification are described. Other embodiments are within the scope of the attached claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0232] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, equipment and storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0233] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or may be accomplished by instructing the relevant hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0234] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. A target detection method, characterized in that: The method comprises: Acquire the image to be detected; Performing target detection on the image to be detected based on the target detection model to obtain a first target detection result; Performing false detection screening on the first target detection result based on the false detection screening model to obtain a second target detection result; The false positive screening model includes one or more cascaded false positive screening sub-models, and each level of the false positive screening sub-model in the false positive screening model is trained in the following manner: Obtain the false detection results obtained by testing the previous level model of each level of false detection screening sub-model, wherein the false detection results are detection results that are predicted as targets by the previous level model but are actually non-targets, and the previous level model of the first level false detection screening sub-model is the target detection model; Performing clustering processing on the false detection results; Perform weight configuration based on preset configuration information and / or the average confidence of each category in the false detection result, and use the false detection result after weight configuration as a negative sample for false detection screening at each level; Based on the false detection screening negative samples of each level, false detection screening training is performed on each level of the neural network model to obtain the false detection screening sub-model of each level.
2. The method according to claim 1, characterized in that The method further comprises: Get sample validation set; Performing target detection on the sample verification set based on the target detection model to determine a first false detection result; Performing clustering processing on the first false detection results to obtain false detection screening negative samples; Performing false detection screening training on the first neural network model based on the false detection screening negative samples, and adjusting the model parameters of the first neural network model during the false detection screening training until the first loss function of the first neural network model satisfies a first convergence condition; The current first neural network model is used as the false detection screening model.
3. The method according to claim 2, characterized in that The method further comprises: After clustering the first false detection results, determining a first cluster false detection result; Get sample training set; Performing target detection on the sample training set based on the target detection model to determine the false detection result of the supplementary samples; Performing clustering processing on the first clustering false detection result and the supplementary sample false detection result to obtain a supplementary clustering sample; The supplementary cluster samples are used as the false positive screening negative samples.
4. The method according to claim 1, characterized in that: The method further comprises: Obtain sample images to be detected and corresponding target annotation results; Performing target detection training on the second neural network model based on the sample image to be detected and the corresponding target annotation result, and adjusting the model parameters of the second neural network model during the target detection training until the second loss function of the second neural network model satisfies the second convergence condition; The current second neural network model is used as the target detection model.
5. A target detection method, characterized in that: The method comprises: Acquire the image to be detected; Performing target detection on the image to be detected based on the target detection model to obtain a first target detection result; Performing target detection on the image to be detected based on the false detection screening model to obtain a third target detection result; Determine an intersection of the first target detection result and the third target detection result; Using the intersection of the first target detection result and the third target detection result as the target detection result after false detection screening; The false positive screening model includes one or more cascaded false positive screening sub-models, and each level of the false positive screening sub-model in the false positive screening model is trained in the following manner: Obtain the false detection results obtained by testing the previous level model of each level of false detection screening sub-model, wherein the false detection results are detection results that are predicted as targets by the previous level model but are actually non-targets, and the previous level model of the first level false detection screening sub-model is the target detection model; Performing clustering processing on the false detection results; Perform weight configuration based on preset configuration information and / or the average confidence of each category in the false detection result, and use the false detection result after weight configuration as a negative sample for false detection screening at each level; Based on the false detection screening negative samples of each level, false detection screening training is performed on each level of the neural network model to obtain the false detection screening sub-model of each level.
6. The method according to claim 5, characterized in that The method further comprises: After determining the intersection of the first target detection result and the third target detection result, determining an object in the third target detection result whose confidence level is greater than a preset threshold; The objects in the third target detection result whose confidence is greater than a preset threshold and the intersection of the first target detection result and the third target detection result are used as the target detection results after false detection screening.
7. A target detection device, characterized in that: The device comprises: A first image acquisition module, used to acquire an image to be detected; A first target detection module, used to perform target detection on the image to be detected based on a target detection model to obtain a first target detection result; A first false positive screening module, configured to perform false positive screening on the first target detection result based on a false positive screening model to obtain a second target detection result, wherein the false positive screening model includes one or more cascaded false positive screening sub-models; The first module is a training module, which is used to obtain the false detection results obtained by testing the previous level model of each level of false detection screening sub-model, wherein the false detection results are the detection results that are predicted by the previous level model as targets but are actually non-targets, and the previous level model of the first level false detection screening sub-model is the target detection model; clustering the false detection results; weight configuration based on preset configuration information and / or the average confidence of each category in the false detection results, and use the false detection results after weight configuration as negative samples for false detection screening at each level; based on the false detection screening negative samples at each level, false detection screening training is performed on the neural network model at each level to obtain the false detection screening sub-model at each level.
8. A target detection device, characterized in that: The device comprises: A second image acquisition module, used to acquire an image to be detected; A second target detection module is used to perform target detection on the image to be detected based on the target detection model to obtain a first target detection result; a second false detection screening module, configured to perform target detection on the image to be detected based on a false detection screening model to obtain a third target detection result, wherein the false detection screening model includes one or more cascaded false detection screening sub-models; An intersection determination module, used to determine the intersection of the first target detection result and the third target detection result; A detection result determination module, configured to use the intersection of the first target detection result and the third target detection result as the target detection result after false detection screening; The second module is a training module, which is used to obtain the false detection results obtained by testing the previous level model of each level of false detection screening sub-model, wherein the false detection results are the detection results that are predicted by the previous level model as targets but are actually non-targets, and the previous level model of the first level false detection screening sub-model is the target detection model; clustering the false detection results; weight configuration based on preset configuration information and / or the average confidence of each category in the false detection results, and use the false detection results after weight configuration as negative samples for false detection screening at each level; based on the false detection screening negative samples at each level, false detection screening training is performed on the neural network model at each level to obtain the false detection screening sub-model at each level.
9. A computer-readable storage medium, characterized in that: The storage medium stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the target detection method as described in any one of claims 1 to 4 and 5 to 6.
