Sample detection control method and system
By constructing a sample detection model and an outlier sample feature library, and combining manual review and DBSCAN clustering analysis, the problem of high false positive rate in medical sample detection was solved, the generalization and detection accuracy of the model were improved, and it was adapted to diverse detection scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XUZHOU FIRST PEOPLES HOSPITAL
- Filing Date
- 2026-03-12
- Publication Date
- 2026-05-05
AI Technical Summary
Existing medical sample testing technologies suffer from problems such as heterogeneity, imbalance, high noise, low contrast, and complex structure, resulting in insufficient model generalization, high misjudgment rate, and lack of effective mechanisms for identifying and managing misjudged samples, making it difficult to meet the high sensitivity and high specificity requirements of clinical diagnosis.
By constructing a sample detection model and combining it with the results of manual review to identify misjudged samples, a feature library of outliers is constructed using DBSCAN clustering analysis and cosine similarity analysis to reduce the misjudgment rate. The YOLOv8 model is used for feature extraction and data augmentation, and a three-layer structured storage architecture is established to standardize sample features and judgment information.
It improves the generalization and stability of the sample detection model, reduces the false positive rate, enhances the ability to identify rare and special feature samples, and adapts to the needs of diverse detection scenarios.
Smart Images

Figure CN121983207A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of sample detection technology, specifically a sample detection control method and system. Background Technology
[0002] In the field of medical sample testing, such as pathological slide analysis, medical imaging diagnosis, and in vitro diagnostic reagent interpretation, the accuracy and reliability of test results are directly related to disease diagnosis, treatment decisions, and patient safety. With the development of precision medicine and smart healthcare, clinical and laboratory settings have placed unprecedented demands on the generalization ability, robustness, and error control capabilities of automated testing systems.
[0003] Currently, medical sample detection technology faces multiple inherent challenges: First, medical image data exhibits significant heterogeneity, with samples from different devices, imaging protocols, and acquisition conditions showing variations in quality and features. Existing preprocessing procedures lack targeted standardization and enhancement strategies, leading to an unstable foundation for model training. Second, positive and negative samples in medical scenarios often exhibit severe imbalance, especially with a scarcity of samples from rare lesions, complex cases, or early lesions. General data augmentation methods struggle to effectively simulate subtle morphological and textural changes, resulting in weak model recognition capabilities for "long-tailed" samples. Third, most detection models directly adopt general architectures and parameters without fine-tuning for the high noise, low contrast, and structural complexity of medical images, limiting their basic performance. Fourth, and most critically, existing systems lack a systematic mechanism for identifying, attributing, and managing misjudged samples. When a model misjudges a sample, it struggles to quickly distinguish whether the misjudgment stems from confusion with common features or from encountering "outlier" features (such as special variant morphologies, rare artifacts, or very early lesions) that were not fully expressed in the training set. This lack of capability makes model iteration and optimization directionless, and it is impossible to effectively accumulate and utilize those valuable error cases. As a result, when dealing with complex, blurry or rare medical images, the model has insufficient generalization ability and a high misjudgment rate, making it difficult to meet the dual stringent requirements of high sensitivity and high specificity for clinical diagnosis. It also brings risks to laboratory quality control and automated review.
[0004] Therefore, the present invention provides a sample detection control method and system. Summary of the Invention
[0005] In order to overcome the shortcomings of the prior art, at least one technical problem raised in the background art is solved.
[0006] In a first aspect, the present invention provides a sample detection control method, comprising: Based on historical sample detection data, a sample detection model is constructed. Based on the sample detection model and combined with the results of manual review of the samples, the misjudged samples of the sample detection model are identified, and the degree of sample misjudgment by the sample detection model is evaluated. If the sample misclassification rate is high, the misclassified samples are classified according to the misclassification type, and the outlier samples in the misclassified samples are identified by combining the clustering analysis results of historical detection image samples. Based on outlier samples, we determine whether features deviate from interference features, construct an outlier sample feature library, and match sample features with the outlier sample feature library during subsequent sample detection to reduce the sample misclassification rate.
[0007] As a further aspect of the present invention: the process of constructing the sample detection model is as follows: Historical detection image samples are collected. The sample detection results data are historically judged qualified and unqualified labeled samples. The sample detection results data are preprocessed to remove duplicate samples. The multi-scale features of indoor images are automatically extracted by relying on YOLOv8 backbone. At the same time, data augmentation strategies such as random flipping, illumination adjustment, Gaussian blur, and angle rotation are added to reduce noise in blurred images, resulting in a standardized historical image sample dataset. The standardized historical image sample dataset was divided into training, validation, and test sets in a 7:2:1 ratio. The YOLOv8 model was selected as the sample detection model, with the features of the historical detected image samples as input and the qualified and unqualified labeled samples corresponding to the historical detected image samples as output labels for training. By fine-tuning the model's learning rate, detection box threshold, and sample confidence threshold on the validation set, the model's detection accuracy on the validation set reached 92%. The model was then validated using a test set, outputting the predicted detection box, predicted label, and sample confidence for the test set samples. Based on these results, the model's effectiveness was validated, and the sample detection model was obtained.
[0008] As a further aspect of the present invention: the process of identifying misjudged samples by the sample detection model is as follows: Collect indoor target detection image samples, perform preprocessing and feature extraction, input the sample detection model, and output the preliminary detection label and sample confidence corresponding to the target detection image sample. The preliminary detection label includes qualified labeled samples and unqualified labeled samples corresponding to the target detection image sample. Manual blind labeling verification is performed on the target detection image samples. Stratified sampling is used to determine the manual verification labels of the target detection image samples. The manual verification labels include qualified labeled samples and unqualified labeled samples corresponding to the target detection image samples. If the manually verified label differs from the initial detection label output by the sample detection model, the corresponding target detection image sample will be recorded as a misjudged sample.
[0009] As a further aspect of the present invention: the process of evaluating the sample detection model's sample misjudgment degree is as follows: The sample misclassification rate of the sample detection model is obtained by statistically analyzing the percentage of misclassified samples in all target detection image samples. If the false positive rate of the sample detection model is greater than or equal to the false positive rate threshold, it indicates that the false positive rate of the sample detection model is high; otherwise, it indicates that the false positive rate of the sample detection model is low.
[0010] As a further aspect of the present invention: the process for determining the clustering analysis results of the historical detection image samples is as follows: The DBSCAN clustering algorithm is used to perform cluster analysis on historical detection image samples, and output historical qualified sample clusters and historical unqualified sample clusters.
[0011] As a further aspect of the present invention: the process of identifying outliers among the misjudged samples is as follows: Using a standardized historical image sample dataset as a baseline distribution, feature vectors of misjudged samples are extracted and analyzed to identify outlier candidate samples. Extract the confidence score of outlier candidate samples. If the confidence score of an outlier candidate sample is less than the confidence score threshold, then the corresponding outlier candidate sample is recorded as an outlier sample.
[0012] As a further aspect of the present invention: the process of identifying outlier candidate samples is as follows: The Euclidean distance between the sample and each sample in the historical qualified sample cluster is calculated using the Euclidean distance formula. The sum of all Euclidean distances with the samples in the historical qualified sample cluster is then taken as the average to obtain the average Euclidean distance of the historical qualified sample cluster. Similarly, the Euclidean distance between the sample and each sample in the historical unqualified sample cluster is calculated using the same formula. The sum of all Euclidean distances with the samples in the historical unqualified sample cluster is then taken as the average to obtain the average Euclidean distance of the historical unqualified sample cluster. Set a threshold for judging historical qualified sample clusters and a threshold for judging historical unqualified sample clusters. If the average Euclidean distance of historical qualified sample clusters is greater than or equal to the threshold for judging historical qualified sample clusters, and the average Euclidean distance of historical unqualified sample clusters is greater than or equal to the threshold for judging historical unqualified sample clusters, then the misjudged sample is recorded as an outlier candidate sample.
[0013] As a further aspect of the present invention: the process of judging feature deviation from interference features based on outlier samples is as follows: Extract the multi-layer feature fusion results of YOLOv8, taking into account both pixel features and semantic features, to obtain the feature vectors of outlier samples, the feature vectors of all data in the historical qualified sample cluster and the historical unqualified sample cluster. Integrate the pixel feature vectors of all data in the historical qualified sample cluster into a set of pixel feature vectors of the historical qualified sample cluster. Take the arithmetic mean of each dimension of all vectors in the set of pixel feature vectors of the historical qualified sample cluster to obtain the center vector of the historical qualified sample cluster. Calculate the cosine similarity between the feature vector of the outlier sample and the center vector of the historical qualified sample cluster. If the cosine similarity is less than the mean cosine similarity of the historical qualified sample cluster, the outlier sample is determined to have feature deviation interference. If the cosine similarity is greater than or equal to the mean cosine similarity of the historical qualified sample cluster, the outlier sample is determined to not have feature deviation interference.
[0014] As a further aspect of the present invention: the process of constructing the outlier sample feature library is as follows: The sample basic information layer is used to store the basic association information of outlier samples. As the core index foundation of the feature library, its stored content includes the sample unique identifier ID, sample type, misjudgment type, collected metadata and manual review notes. It is stored in a relational database with the sample unique identifier ID as the unique primary key. The core feature layer is used to store core feature data that are directly related to outlier samples and feature deviation judgment. The stored content includes the Conv5 layer pixel feature vector of a single outlier sample, the cluster center vector of historical qualified samples, the cosine similarity, and the mean cosine similarity of historical qualified sample clusters. Among them, the pixel feature vector and the cluster center vector are both high-dimensional vectors and are stored in a vector database. The judgment result layer is used to store the judgment information related to the feature deviation of outliers. The stored content includes the feature deviation judgment results. It is stored in a relational database and is associated with the sample basic information layer and core feature layer through the sample's unique identifier ID.
[0015] Secondly, the present invention also provides a sample detection and control system, the system comprising: False positive assessment module: Based on historical sample detection data, a sample detection model is constructed. Based on the sample detection model and combined with the results of manual review of the samples, the false positive samples of the sample detection model are identified, and the degree of false positives of the sample detection model is evaluated. Outlier sample screening module: If the sample misclassification rate is high, the misclassified samples are classified according to the misclassification type, and the outlier samples in the misclassified samples are identified by combining the clustering analysis results of historical detection image samples. Outlier Sample Feature Library Construction Module: Based on outlier samples, this module determines whether features deviate from interfering features, constructs an outlier sample feature library, and then matches sample features with the outlier sample feature library during subsequent sample detection to reduce the false positive rate.
[0016] The beneficial effects of this invention are as follows: Standardized data preprocessing and enhancement strategies improve sample quality; YOLOv8 model training and hyperparameter tuning ensure basic detection accuracy; manual blind labeling verification accurately identifies misjudged samples and quantifies the degree of misjudgment, providing a clear direction for model optimization; for high misjudgment rate scenarios, misjudgment classification and core metadata annotation, standardized feature extraction, and DBSCAN clustering analysis accurately screen outlier samples, avoiding interference from invalid samples; based on cosine similarity analysis, outlier sample feature deviation interference features are mined, and a three-layer structured architecture is used to construct an outlier sample feature library, realizing standardized storage and association of sample basic information, core features, and judgment results. Subsequent feature matching provides targeted support for model retraining, effectively improving the model's ability to identify rare and special feature samples, continuously reducing the misjudgment rate, enhancing the generalization, stability, and detection accuracy of the sample detection model, and adapting to diverse scenario requirements for indoor target detection. Attached Figure Description
[0017] The invention will now be further described with reference to the accompanying drawings.
[0018] Figure 1 This is a flowchart of the steps of a sample detection control method according to an embodiment of the present invention; Figure 2 This is a system block diagram of a sample detection and control system according to an embodiment of the present invention. Detailed Implementation
[0019] To make the technical means, creative features, objectives and effects of this invention easier to understand, the invention will be further described below in conjunction with specific embodiments.
[0020] Please see Figure 1 As shown in the figure, a sample detection control method according to an embodiment of the present invention includes the following steps: Step 1: Based on historical sample detection data, construct a sample detection model. Based on the sample detection model and the results of manual review of the samples, identify the misjudged samples by the sample detection model and evaluate the degree of sample misjudgment by the sample detection model. Historical detection image samples are collected. The sample detection results data are the qualified and unqualified labeled samples in the past. The sample detection results data are preprocessed to remove duplicate samples. The multi-scale features (pixel, texture, semantic features) of indoor images are automatically extracted by relying on YOLOv8 backbone. At the same time, data augmentation strategies such as random flipping, illumination adjustment, Gaussian blur, and angle rotation are added to denoise the blurred images and obtain a standardized historical image sample dataset. The standardized historical image sample dataset was divided into training, validation, and test sets in a 7:2:1 ratio. The YOLOv8 model was selected as the sample detection model, with the features of the historical detected image samples as input and the qualified and unqualified labeled samples corresponding to the historical detected image samples as output labels for training. The model's learning rate, detection box threshold, and sample confidence threshold were fine-tuned on the validation set, achieving a detection accuracy of 92% on the validation set. The model was then validated on the test set, outputting the predicted detection box, predicted label, and sample confidence for the test set samples. Based on these results, the model's effectiveness was validated, and the sample detection model was obtained. Collect indoor target detection image samples, perform preprocessing and feature extraction, input the sample detection model, and output the preliminary detection label and sample confidence corresponding to the target detection image sample. The preliminary detection label includes qualified labeled samples and unqualified labeled samples corresponding to the target detection image sample. Manual blind labeling verification is performed on the target detection image samples. Stratified sampling is used to determine the manual verification labels of the target detection image samples. The manual verification labels include qualified labeled samples and unqualified labeled samples corresponding to the target detection image samples. If the manually verified label is the same as the preliminary detection label output by the sample detection model, the corresponding target detection image sample is recorded as a non-false positive sample. If the manually verified label differs from the initial detection label output by the sample detection model, the corresponding target detection image sample will be recorded as a misjudged sample. The sample misclassification rate of the sample detection model is obtained by statistically analyzing the percentage of misclassified samples in all target detection image samples. If the false positive rate of the sample detection model is greater than or equal to the false positive rate threshold, it indicates that the false positive rate of the sample detection model is high. If the false positive rate of the sample detection model is less than the false positive rate threshold, it means that the false positive rate of the sample detection model is low. Step 2: If the sample misclassification rate is high, classify the misclassified samples according to the misclassification type, and combine the results of cluster analysis of historical detection image samples to identify outliers among the misclassified samples; From the target detection image samples, samples with misclassified labels that differ from the labels initially detected by the model are screened out and classified according to the type of misclassification: Type 1: Samples initially identified as having qualified labels by the model, but manually reviewed and found to have unqualified labels (missed detection). Type 2: Samples initially identified as unqualified by the model but manually verified as qualified by manual review (false alarm); For each misclassified sample, label the core metadata: image ID, preprocessing record (whether noise reduction and deduplication are used), model output (confidence score, bounding box coordinates), manual review notes (such as "defect blurry" or "sample rare"), defect type (such as indoor target damage or displacement), and target category (such as indoor furniture or equipment). All misclassified samples undergo the same preprocessing (deduplication and noise reduction) and CNN feature extraction (pixel features and texture features) as the standardized historical image sample dataset. The features are normalized to [0,1] using Min-Max normalization to ensure that the feature dimensions and normalization methods of the misclassified samples are consistent with the training set, validation set, and test set. The DBSCAN clustering algorithm is used to perform cluster analysis on historical detection image samples, outputting historical qualified sample clusters and historical unqualified sample clusters. Specifically: Set a core point threshold and calculate the "K-nearest neighbor distance" of all historical detected image samples (K is temporarily set as the initial value of the core point threshold). Sort all K-nearest neighbor distances from smallest to largest, plot the distance-sample number curve, and take the distance value corresponding to the inflection point of the curve as the neighborhood radius; It should be noted that the inflection point is the point where the curve changes from a steep rise to a gentle rise. This represents the nearest neighbor distance threshold for most samples. If the threshold is exceeded, the samples enter the sparse region. For each historical detected image sample, calculate its Euclidean distance to all other historical detected image samples, and count the number of neighbors whose distance is less than or equal to the neighborhood radius; If the number of neighbors is greater than or equal to the core point threshold, it is marked as a core point; if the number of neighbors is less than the core point threshold, it is marked as a non-core point. Starting from any unclassified core point, all historical detection image samples within its neighborhood radius are assigned to the same cluster; repeat the above operation for other core points in the same cluster until no new samples can be added. If there are other core points within the neighborhood radius of a core point that have not been classified, they are merged into the same cluster, and the historical qualified sample cluster and the historical unqualified sample cluster are output. Using a standardized historical image sample dataset as the baseline distribution, feature vectors of misjudged samples are extracted. The Euclidean distance formula is used to calculate the Euclidean distance between the misjudged sample and each sample in the historical qualified sample cluster. The summation of all Euclidean distances with samples in the historical qualified sample cluster is taken as the average to obtain the average Euclidean distance of the historical qualified sample cluster. Similarly, the Euclidean distance formula is used to calculate the Euclidean distance between the misjudged sample and each sample in the historical unqualified sample cluster. The summation of all Euclidean distances with samples in the historical unqualified sample cluster is taken as the average to obtain the average Euclidean distance of the historical unqualified sample cluster. Set a threshold for judging historical qualified sample clusters and a threshold for judging historical unqualified sample clusters. If the average Euclidean distance of historical qualified sample clusters is greater than or equal to the threshold for judging historical qualified sample clusters, and the average Euclidean distance of historical unqualified sample clusters is greater than or equal to the threshold for judging historical unqualified sample clusters, then the misjudged sample is recorded as an outlier candidate sample; otherwise, the misjudged sample is recorded as a non-outlier candidate sample. It should be noted that the following other conditions apply: the average Euclidean distance of the historical qualified sample clusters is greater than or equal to the judgment threshold of the historical qualified sample clusters, and the average Euclidean distance of the historical unqualified sample clusters is less than the judgment threshold of the historical unqualified sample clusters; the average Euclidean distance of the historical qualified sample clusters is less than the judgment threshold of the historical qualified sample clusters, and the average Euclidean distance of the historical unqualified sample clusters is greater than or equal to the judgment threshold of the historical unqualified sample clusters; the average Euclidean distance of the historical qualified sample clusters is less than the judgment threshold of the historical qualified sample clusters, and the average Euclidean distance of the historical unqualified sample clusters is less than the judgment threshold of the historical unqualified sample clusters. Extract the confidence score of outlier candidate samples. If the confidence score of an outlier candidate sample is greater than or equal to the confidence score threshold, then the corresponding outlier candidate sample is recorded as a non-outlier sample. If the sample confidence score of an outlier candidate sample is less than the sample confidence score threshold, then the corresponding outlier candidate sample is recorded as an outlier sample. Step 3: Based on outlier samples, determine whether the features deviate from the interference features, construct an outlier sample feature library, and match the sample features with the outlier sample feature library in the subsequent sample detection process to reduce the sample misclassification rate. Extract the multi-layer feature fusion results of YOLOv8, taking into account both pixel features and semantic features, to obtain the feature vectors of outlier samples, the feature vectors of all data in the historical qualified sample cluster and the historical unqualified sample cluster. Integrate the pixel feature vectors of all data in the historical qualified sample cluster into a set of pixel feature vectors of the historical qualified sample cluster. Take the arithmetic mean of each dimension of all vectors in the set of pixel feature vectors of the historical qualified sample cluster to obtain the center vector of the historical qualified sample cluster. Calculate the cosine similarity between the feature vector of the outlier sample and the center vector of the historical qualified sample cluster. If the cosine similarity is less than the mean cosine similarity of the historical qualified sample cluster, the outlier sample is determined to have feature deviation interference. If the cosine similarity is greater than or equal to the mean cosine similarity of the historical qualified sample cluster, the outlier sample is determined to not have feature deviation interference. For example, for a small dark texture defect target in a valid rare outlier sample, the cosine similarity between its pixel feature vector and the center of the historical qualified sample cluster is 0.75, while the mean cosine similarity of the historical qualified sample cluster is 0.9. Based on this, it is determined that the sample has feature deviation interference features. A three-tier structured storage architecture is adopted to construct an outlier sample feature library, specifically: The sample basic information layer is used to store the basic association information of outlier samples. As the core index foundation of the feature library, its stored content includes the sample unique identifier ID, sample type (effective rare type, interference error type), misjudgment type (missed judgment, false alarm), collection metadata (including collection device ID, collection time, collection environment parameters) and manual review remarks. It is stored in a relational database with the sample unique identifier ID as the unique primary key. The core feature layer is used to store core feature data that are directly related to outlier samples and feature deviation judgment. The stored content includes the Conv5 layer pixel feature vector of a single outlier sample, the cluster center vector of historical qualified samples, the cosine similarity, and the mean cosine similarity of historical qualified sample clusters. Among them, the pixel feature vector and the cluster center vector are both high-dimensional vectors and are stored in a vector database. The judgment result layer is used to store the judgment information related to the feature deviation of outlier samples. The stored content includes the feature deviation judgment results. It is stored in a relational database and is associated with the sample basic information layer and core feature layer through the sample's unique identifier ID to ensure a one-to-one correspondence between the judgment information and the sample's basic information and core features. After extracting features from the samples to be detected, cosine similarity matching is performed with the outlier sample feature library; if the match is successful, the training weights of the corresponding sample type are increased and the model is retrained to improve the model's attention to that type of feature. The technical solution of this invention is as follows: Based on historical sample detection data, a sample detection model is constructed; based on the sample detection model and combined with the results of manual review of the samples, misjudged samples of the sample detection model are identified, and the degree of sample misjudgment by the sample detection model is evaluated; if the sample misjudgment rate is high, the misjudged samples are classified according to the misjudgment type, and outlier samples among the misjudged samples are identified by combining the results of cluster analysis of historical detection image samples; based on the outlier samples, the feature deviation from the interference features is judged, and an outlier sample feature library is constructed; based on the outlier sample feature library, the sample features are matched with the outlier sample feature library in subsequent sample detection processes to reduce the sample misjudgment rate; this invention improves sample quality through standardized data preprocessing and enhancement strategies, and ensures basic detection accuracy by relying on YOLOv8 model training and hyperparameter tuning. The system combines manual blind labeling to accurately identify misjudged samples and quantify the degree of misjudgment, providing a clear direction for model optimization. For scenarios with high misjudgment rates, it accurately filters outlier samples and avoids interference from invalid samples through misjudgment classification and core meta-information annotation, standardized feature extraction, and DBSCAN clustering analysis. Based on cosine similarity analysis, it mines the feature deviation interference characteristics of outlier samples and constructs an outlier sample feature library using a three-layer structured architecture. This achieves standardized storage and association of sample basic information, core features, and judgment results. Subsequently, feature matching provides targeted support for model retraining, which can effectively improve the model's ability to identify rare and special feature samples, continuously reduce the misjudgment rate, enhance the generalization, stability, and detection accuracy of the sample detection model, and adapt to the diverse scenario requirements of indoor target detection.
[0021] Example 2 Based on the same inventive concept as the sample detection control method in the foregoing embodiments, such as Figure 2 As shown, this application provides a sample detection and control system, wherein the system specifically includes: False positive assessment module: Based on historical sample detection data, a sample detection model is constructed. Based on the sample detection model and combined with the results of manual review of the samples, the false positive samples of the sample detection model are identified, and the degree of false positives of the sample detection model is evaluated. Outlier sample screening module: If the sample misclassification rate is high, the misclassified samples are classified according to the misclassification type, and the outlier samples in the misclassified samples are identified by combining the clustering analysis results of historical detection image samples. Outlier Sample Feature Library Construction Module: Based on outlier samples, this module determines whether features deviate from interfering features, constructs an outlier sample feature library, and then matches sample features with the outlier sample feature library during subsequent sample detection to reduce the false positive rate.
[0022] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of the present invention is defined by the appended claims and their equivalents.
Claims
1. A sample detection control method, characterized in that: include: Based on historical sample detection data, a sample detection model is constructed. Based on the sample detection model and combined with the results of manual review of the samples, the misjudged samples of the sample detection model are identified, and the degree of sample misjudgment by the sample detection model is evaluated. If the sample misclassification rate is high, the misclassified samples are classified according to the misclassification type, and the outlier samples in the misclassified samples are identified by combining the clustering analysis results of historical detection image samples. Based on outlier samples, we determine whether features deviate from interference features, construct an outlier sample feature library, and match sample features with the outlier sample feature library during subsequent sample detection to reduce the sample misclassification rate.
2. The sample detection control method according to claim 1, characterized in that: The process of constructing the sample detection model is as follows: Historical detection image samples are collected. The sample detection results data are historically judged qualified and unqualified labeled samples. The sample detection results data are preprocessed to remove duplicate samples. The multi-scale features of indoor images are automatically extracted by relying on YOLOv8 backbone. At the same time, data augmentation strategies such as random flipping, illumination adjustment, Gaussian blur, and angle rotation are added to reduce noise in blurred images, resulting in a standardized historical image sample dataset. The standardized historical image sample dataset was divided into training, validation, and test sets in a 7:2:1 ratio. The YOLOv8 model was selected as the sample detection model, with the features of the historical detected image samples as input and the qualified and unqualified labeled samples corresponding to the historical detected image samples as output labels for training. By fine-tuning the model's learning rate, detection box threshold, and sample confidence threshold on the validation set, the model's detection accuracy on the validation set reached 92%. The model was then validated using a test set, outputting the predicted detection box, predicted label, and sample confidence for the test set samples. Based on these results, the model's effectiveness was validated, and the sample detection model was obtained.
3. The sample detection control method according to claim 2, characterized in that: The process of identifying misclassified samples in the sample detection model is as follows: Collect indoor target detection image samples, perform preprocessing and feature extraction, input the sample detection model, and output the preliminary detection label and sample confidence corresponding to the target detection image sample. The preliminary detection label includes qualified labeled samples and unqualified labeled samples corresponding to the target detection image sample. Manual blind labeling verification is performed on the target detection image samples. Stratified sampling is used to determine the manual verification labels of the target detection image samples. The manual verification labels include qualified labeled samples and unqualified labeled samples corresponding to the target detection image samples. If the manually verified label differs from the initial detection label output by the sample detection model, the corresponding target detection image sample will be recorded as a misjudged sample.
4. The sample detection control method according to claim 3, characterized in that: The process for evaluating the sample detection model's sample misclassification rate is as follows: The sample misclassification rate of the sample detection model is obtained by statistically analyzing the percentage of misclassified samples in all target detection image samples. If the false positive rate of the sample detection model is greater than or equal to the false positive rate threshold, it indicates that the false positive rate of the sample detection model is high; otherwise, it indicates that the false positive rate of the sample detection model is low.
5. The sample detection control method according to claim 4, characterized in that: The process for determining the clustering analysis results of the historical detection image samples is as follows: The DBSCAN clustering algorithm is used to perform cluster analysis on historical detection image samples, and output historical qualified sample clusters and historical unqualified sample clusters.
6. The sample detection control method according to claim 5, characterized in that: The process of identifying outliers among the misjudged samples is as follows: Using a standardized historical image sample dataset as a baseline distribution, feature vectors of misjudged samples are extracted and analyzed to identify outlier candidate samples. Extract the confidence score of outlier candidate samples. If the confidence score of an outlier candidate sample is less than the confidence score threshold, then the corresponding outlier candidate sample is recorded as an outlier sample.
7. The sample detection control method according to claim 6, characterized in that: The process of identifying outlier candidate samples is as follows: The Euclidean distance between the sample and each sample in the historical qualified sample cluster is calculated using the Euclidean distance formula. The sum of all Euclidean distances with the samples in the historical qualified sample cluster is then taken as the average to obtain the average Euclidean distance of the historical qualified sample cluster. Similarly, the Euclidean distance between the sample and each sample in the historical unqualified sample cluster is calculated using the same formula. The sum of all Euclidean distances with the samples in the historical unqualified sample cluster is then taken as the average to obtain the average Euclidean distance of the historical unqualified sample cluster. Set a threshold for judging historical qualified sample clusters and a threshold for judging historical unqualified sample clusters. If the average Euclidean distance of historical qualified sample clusters is greater than or equal to the threshold for judging historical qualified sample clusters, and the average Euclidean distance of historical unqualified sample clusters is greater than or equal to the threshold for judging historical unqualified sample clusters, then the misjudged sample is recorded as an outlier candidate sample.
8. The sample detection control method according to claim 7, characterized in that: The process of judging whether features deviate from interfering features based on outlier samples is as follows: Extract the multi-layer feature fusion results of YOLOv8, taking into account both pixel features and semantic features, to obtain the feature vectors of outlier samples, the feature vectors of all data in the historical qualified sample cluster and the historical unqualified sample cluster. Integrate the pixel feature vectors of all data in the historical qualified sample cluster into a set of pixel feature vectors of the historical qualified sample cluster. Take the arithmetic mean of each dimension of all vectors in the set of pixel feature vectors of the historical qualified sample cluster to obtain the center vector of the historical qualified sample cluster. Calculate the cosine similarity between the feature vector of the outlier sample and the center vector of the historical qualified sample cluster. If the cosine similarity is less than the mean cosine similarity of the historical qualified sample cluster, the outlier sample is determined to have feature deviation interference features. If the cosine similarity is greater than or equal to the mean cosine similarity of the historical qualified sample clusters, then the outlier sample is determined to have no features that deviate from or interfere with its features.
9. The sample detection control method according to claim 8, characterized in that: The process of constructing the outlier sample feature library is as follows: The sample basic information layer is used to store the basic association information of outlier samples. As the core index foundation of the feature library, its stored content includes the sample unique identifier ID, sample type, misjudgment type, collected metadata and manual review notes. It is stored in a relational database with the sample unique identifier ID as the unique primary key. The core feature layer is used to store core feature data that are directly related to outlier samples and feature deviation judgment. The stored content includes the Conv5 layer pixel feature vector of a single outlier sample, the cluster center vector of historical qualified samples, the cosine similarity, and the mean cosine similarity of historical qualified sample clusters. Among them, the pixel feature vector and the cluster center vector are both high-dimensional vectors and are stored in a vector database. The judgment result layer is used to store the judgment information related to the feature deviation of outliers. The stored content includes the feature deviation judgment results. It is stored in a relational database and is associated with the sample basic information layer and core feature layer through the sample's unique identifier ID.
10. A sample detection and control system, characterized in that, The system is used to perform the method according to any one of claims 1-9, the system comprising: False positive assessment module: Based on historical sample detection data, a sample detection model is constructed. Based on the sample detection model and combined with the results of manual review of the samples, the false positive samples of the sample detection model are identified, and the degree of false positives of the sample detection model is evaluated. Outlier sample screening module: If the sample misclassification rate is high, the misclassified samples are classified according to the misclassification type, and the outlier samples in the misclassified samples are identified by combining the clustering analysis results of historical detection image samples. Outlier Sample Feature Library Construction Module: Based on outlier samples, this module determines whether features deviate from interfering features, constructs an outlier sample feature library, and then matches sample features with the outlier sample feature library during subsequent sample detection to reduce the false positive rate.