Visual inspection method for automobile fuse assembly

By using an adaptive threshold Bayesian fusion method, combining traditional and deep learning features, the robustness and accuracy issues in automotive fuse box assembly inspection are solved, achieving stable inspection and high-precision recognition in complex environments.

CN121746802APending Publication Date: 2026-03-27NANJING FORESTRY UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-24
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing automotive fuse box assembly and inspection technologies suffer from problems such as human error, high time consumption, high cost, strong feature dependence, high sensitivity to light and environment, limited detection accuracy, and poor robustness of fixed thresholds, making it difficult to maintain high robustness and high accuracy in complex environments.

Method used

An adaptive threshold Bayesian fusion method is adopted, which combines traditional histogram similarity features with deep learning Siamese network features. Through Bayesian classification model, multi-source feature fusion and threshold adaptive adjustment are performed to achieve stable detection.

Benefits of technology

It maintains stable detection performance in complex lighting and cross-domain scenarios, significantly improves the consistency and reliability of detection results, reduces the probability of false detection and false negative detection, and improves the system's generalization ability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121746802A_ABST
    Figure CN121746802A_ABST
Patent Text Reader

Abstract

The invention discloses an automobile fuse assembly visual detection method based on adaptive threshold Bayesian fusion. The method comprises the following steps: data acquisition; carrying out Siamese model training; self-adaptive threshold Bayesian classification model training is carried out; making a detection rule; cutting out a detected target and a corresponding standard image; and judging the type of the cut detection image through a Bayesian classification model. The method can still maintain stable detection performance in complex illumination and cross-domain scenes, has the characteristic of data-driven adaptive threshold, and also has the advantages of strong generalization ability, more stable result, strong expandability and the like.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer image processing, and particularly relates to a visual detection method for automobile fuse assembly based on adaptive threshold value Bayesian fusion. BACKGROUND

[0002] The automobile fuse box assembly detection technology is a key detection technology closely related to automobile safety, and the core goal is to effectively detect and verify the assembly quality of the fuse box and its internal components to ensure the reliability and safety of the automobile electrical system.

[0003] The traditional automobile fuse box assembly detection method is manual visual inspection, which has human error: manual inspection is easily affected by the subjective judgment and fatigue of the operator, thereby leading to inconsistency and errors. Time consumption: manual inspection takes a lot of time, especially in large-scale automobile production; high cost; in addition, product traceability is difficult to achieve and the like.

[0004] With the development of computers, video monitoring technology is becoming more and more popular, and the automobile assembly detection based on image processing is gradually applied. The existing common processing methods include color contrast, character recognition, Sift, Surf feature point matching, deep learning and the like. However, these methods have the following problems: 1. Strong feature dependence and poor universality: the traditional computer vision method needs to manually select key features, and the feature extraction depends on expert experience and a large number of trial and error, which is difficult to maintain consistent performance in different environments and scenes; 2. High sensitivity to light and environment: the detection based on color contrast is strongly dependent on the light condition, and insufficient light or reflection may lead to unstable detection results; 3. Limited matching accuracy: the SIFT and SURF feature point matching methods have insufficient robustness when facing changes such as light, rotation and scaling, and are prone to mismatching; 4. Limitations of deep learning method: although deep learning has superior detection performance, it still faces problems such as the need for a large amount of labeled data, high training computation cost and poor model interpretability.

[0005] In addition, the existing detection algorithm is mostly in a single-source information processing mode, ignoring the complementary information between features from different modalities (such as color, shape, texture, etc.), thereby limiting the improvement of detection accuracy. More importantly, the existing detection model based on confidence generally uses a fixed threshold to determine whether a target exists, and cannot adaptively adjust the threshold according to the distribution change of input data or the noise intensity, resulting in insufficient robustness of the system under cross-domain scenes or noise interference, and easy to produce false detection or missed detection. Therefore, how to construct a kind of automobile fuse box assembly detection technology capable of fusing multi-source feature information, having adaptive threshold adjustment capability, and still maintaining high robustness and high accuracy in complex environment, becomes a technical problem to be solved in the field. SUMMARY

[0006] The purpose of the present application is to provide an automobile fuse assembly visual detection method based on adaptive threshold Bayesian fusion, aiming to overcome the problems of existing automobile fuse box assembly detection technology, such as feature extraction depending on manual experience, fixed threshold detection poor robustness, and insufficient cross-domain adaptability.

[0007] The technical scheme provided by the present application is as follows: An automobile fuse assembly visual detection method based on adaptive threshold Bayesian fusion, the method comprising the following steps: S1, data acquisition; S2, Siamese model training; S3, adaptive threshold Bayesian classification model training; S4, formulating detection rules; S5, cropping out the detection target and the corresponding standard image; S6, determining the type to which the cropped detection image belongs through the Bayesian classification model.

[0008] Preferably, in step S1, the data acquisition comprises the following steps: S1.1, acquiring fuse box images, cropping out fuse images of various types from the fuse box images, setting the fuse type as m types, and n images of each type of fuse; S1.2, normalizing the image scale, and dividing the image data set into a training set, a test set and a validation set.

[0009] Preferably, in step S2, the process of Siamese model training is as follows: the Siamese network uses VGG16 for feature extraction, selects an SGD optimizer for parameter optimization, trains the Siamese network on the fuse image data set until the model parameters converge, and obtains the converged Siamese network model.

[0010] Preferably, in step S3, the process of training the adaptive threshold Bayesian classification model comprises the following steps: S3.1, multi-source feature extraction: extract image pairs from the image training set, respectively divide the two images into left and right half images, calculate the histogram similarity between the left half images and the histogram similarity between the right half images of the image pairs, and calculate the similarity value of the image pairs by Siamese model; S3.2, feature fusion: calibrate the histogram similarity m1 between the left half images, the histogram similarity m3 between the right half images of the image pairs, and the similarity m3 obtained by Siamese using a probability calibration method; take the three calibrated probabilities as features to construct a feature vector X, and pair it with the binary label y (1 represents the same class of image pairs, and 0 represents different classes of image pairs) from the image pairs to form a data sample. Based on the data sample, a complete data set is constructed, which is then divided into a training set and a validation set; S3.3, Bayesian classification model training: train a Gaussian naive Bayesian classification model using the training set; S3.4, initial threshold setting stage: calculate the recall rate under different thresholds using the validation set, automatically search for the minimum threshold that meets the target recall rate as the initial decision threshold, and record the initial performance indicators; S3.5, online prediction and feedback stage: after the model is deployed, real-time prediction is performed on new input samples, and prediction probability and classification results are output; S3.6, threshold adaptive adjustment stage: when receiving feedback data containing true labels, dynamically adjust the threshold according to the recall rate, precision and F1 score of the current batch: if the current recall rate is lower than the target value, reduce the threshold to improve sensitivity; if the recall rate is too high (more than the target value + 0.05), increase the threshold to reduce false positives; otherwise, keep the threshold unchanged.

[0011] Preferably, after step S3.6, it further comprises: S3.7, model saving and loading: the trained Bayesian classification model, calibrator and meta-information file including threshold, adaptation rate, target recall rate, etc. can be saved regularly.

[0012] Preferably, in step S4, the specific steps of formulating the detection rule are: taking the image of the correctly installed fuse box as the reference, marking the positions of all fuses, and giving the fuse image class label of each position.

[0013] Preferably, in step S5, the cropped detection target and corresponding standard image are: taking a photo of the fuse box assembled on the production line, and cropping the image of each position from the photo according to the marked positions in the reference image.

[0014] Preferably, in step S6, the specific step of determining the type to which the cropped detection image belongs through the Bayesian classification model is: S6.1, respectively calculating the similarity m1 between the left half histograms of the detected image and the template image at the corresponding position, and the similarity m2 between the right half histograms, and training the Siamese model to calculate the similarity m3 between the detected image and the template image at the corresponding position; S6.2, respectively calibrating m1, m2 and m3 through the trained calibrator, and combining the calibrated features; S6.3, classifying and detecting the combined data through the Bayesian classification model, and if the template image and the detected image belong to the same type, the installation is correct.

[0015] The present application overcomes the shortcomings of the prior art and provides a vehicle fuse assembly visual detection method based on an adaptive threshold Bayesian fusion, comprising the steps of data acquisition, Siamese model training, adaptive threshold Bayesian classification model training, detection rule formulation, cropping of the detected target and the corresponding standard image, and determination of the type to which the cropped detection image belongs through the Bayesian classification model.

[0016] The innovation of the present application lies in that: (1) Fusion of traditional and deep features to enhance robustness: The present application combines traditional features that can be explained by humans with deep semantic features, fully utilizes the complementary advantages of the two, and still maintains stable detection performance in complex cross-domain scenes; (2) Adaptive threshold mechanism to improve generalization ability: The present application automatically learns the discrimination threshold from data, replaces the traditional fixed threshold scheme, enables the detection system to adapt to different distributions and noise levels, and significantly improves the generalization ability under cross-domain and abnormal environment; (3) Improve robustness and generalization performance under cross-domain and noise conditions: Probability fusion and dynamic correction, the result is more stable: combine Bayesian inference to realize confidence fusion and posterior correction of multiple source features, effectively reduce the false detection and missed detection probability, and improve the consistency and reliability of the detection result.

[0017] The present application realizes the fusion of traditional machine vision features (histogram similarity) and deep learning features (image similarity obtained by Siamese network); the threshold is automatically learned from data (instead of fixed threshold); and the robustness and generalization performance under cross-domain and noise conditions are improved.

[0018] After the technical scheme of the present application is adopted, the present application has the following beneficial effects: (1) The histogram method of traditional machine vision is used to judge the similarity features between images, and the Siamese network of deep learning is used to fuse the similarity features between images, the traditional features of artificial explainability and the deep semantic features are combined, the complementary advantages of both are fully utilized, and stable detection performance can be maintained in complex illumination, angle change and cross-domain scenes; (2) Adaptive threshold mechanism, improve generalization ability: the application automatically learns the discrimination threshold from data, replaces the traditional fixed threshold scheme, enables the detection system to adapt to different distributions and noise levels, and significantly improves the generalization ability under cross-domain and abnormal environment; (3) Probability fusion and dynamic correction, the result is more stable: the confidence fusion and posterior correction of multiple source features are realized by combining Bayesian inference, the false detection and missed detection probability is effectively reduced, and the consistency and reliability of the detection result are improved; (4) Strong scalability: the framework of the application can be flexibly adapted to different types of detection objects and model structures, and can be applied to the fields of automobile electronic assembly, industrial part detection and complex environment visual detection. BRIEF DESCRIPTION OF DRAWINGS

[0019] Figure 1 is a step flow chart of the method of the application; Figure 2 is the detection result of the image blue 15 and the standard image blue 15; Figure 3 is the detection result of the image green 30 and the standard image green 30; Figure 4 is the detection result of the image blank 2814 and the blank 2814; Figure 5 is the detection result of the image red 10 and the standard image red 10; Figure 6 is the detection result of the image orange 5 and the standard image orange 5; Figure 7 is the detection result of the image yellow 20 and the standard image coffee 75. DETAILED DESCRIPTION

[0020] The technical solutions of the application will be further described in detail below in combination with specific embodiments, but do not constitute any limitation on the application.

[0021] The embodiment of the application discloses a kind of adaptive threshold bayesian fusion's automobile fuse assembly visual detection method, as shown in Figure Figure 1 It includes the following steps: S1, data acquisition.

[0022] In step S1, the fuse box image is collected, m classes of fuses are cropped from the image, n images of each class are cropped, and then image scale normalization is performed; then the image dataset is divided into test as divided into a training set, a test set and a validation set.

[0023] S2, Siamese model training.

[0024] In step S2, the Siamese network uses VGG16 for feature extraction, and in the training process, the SGD optimizer is selected for parameter optimization, and the fuse image dataset is trained until the model parameters converge, and the converged Siamese network model is obtained.

[0025] S3, adaptive threshold Bayesian classification model training.

[0026] In step S3, the adaptive threshold Bayesian classification model training process specifically includes the following steps: S3.1, multi-source feature extraction: extract image pairs from the image training set, respectively divide the two images into left and right half images, calculate the histogram similarity between the left half images and the histogram similarity between the right half images of the image pair, and the similarity value of the image pair calculated by the Siamese model is obtained; S3.2, feature fusion: using a probability calibration method to calibrate the histogram similarity m1 between the left half images of the image pair, the histogram similarity m3 between the right half images, and the similarity m3 obtained by the Siamese; take the three calibrated probabilities as features to construct a feature vector X, and pair it with the binary label y (1 indicates that the image pair is of the same class, and 0 indicates that the image pair is of different classes) from the image pair to form a data sample; based on the data sample, build a complete dataset, and then divide it into a training set and a validation set; S3.3, Bayesian classification model training: train the Gaussian naive Bayesian classification model using the training set; S3.4, initial threshold setting stage: calculate the recall rate under different thresholds using the validation set, automatically search for the minimum threshold that meets the target recall rate (Recall_target) as the initial decision threshold, and record the initial performance indicators; S3.5, online prediction and feedback stage: after the model is deployed, real-time prediction is performed on new input samples, and prediction probability and classification results are output; S3.6, threshold adaptive adjustment stage: when receiving feedback data containing true labels, dynamically adjust the threshold according to the recall rate, precision and F1 score of the current batch: if the current recall rate is lower than the target value, reduce the threshold to improve the sensitivity; if the recall rate is too high (more than the target value + 0.05), increase the threshold to reduce false positives; otherwise, keep the threshold unchanged; Specifically, the target recall rate is set as the safety constraint index, and a stable tolerance interval is introduced near it. When the current recall rate is lower than the target recall rate, it is determined that the system has a risk of missing detection, and the detection threshold is lowered to improve the detection sensitivity; when the current recall rate is higher than the target recall rate and exceeds the upper limit of the preset tolerance interval, it is determined that the system has a risk of false detection, and the detection threshold is raised to suppress false positives; when the current recall rate is within the range of the target recall rate and its tolerance interval, the detection threshold is kept unchanged to avoid frequent threshold adjustment caused by statistical fluctuations.

[0027] In the threshold adjustment process, the precision and F1 indicators are considered to weight or constrain the adjustment range to balance the relationship between the false detection rate and the missing detection rate, so as to ensure the stable optimization of the overall performance of the system under the premise of meeting the safety requirements of the recall rate.

[0028] The upper limit offset of the stable tolerance interval can be set to 5% of the target recall rate to suppress frequent changes of the threshold caused by sample noise or short-term statistical fluctuations.

[0029] S3.7, Model saving and loading: the system can regularly save the trained Bayesian classification model, calibrator and meta-information file (including threshold, adaptation rate, target recall rate, etc.).

[0030] S4, Formulate detection rules.

[0031] In step S4, the detection rules are as follows: place the correctly installed fuse box into the system for photographing, and use the photograph as a reference image. In the reference image, manually mark the positions and types of all fuses.

[0032] S5, Crop the detection target and the corresponding standard image.

[0033] In step S5, the fuse box assembled on the production line is photographed, and according to the marked positions in the reference image, the detection image of each position and the standard image of the same position are cropped from the photograph and the reference image respectively.

[0034] S6, Determine the type of the cropped detection image by the Bayesian classification model.

[0035] In step S6, the specific process of determining the type of the cropped detection image by the Bayesian classification model includes the following steps: S6.1, Calculate the similarity m1 between the left half histograms of the detection image and the template image of the corresponding position, the similarity m2 between the right half histograms, and the similarity m3 between the detection image and the template image of the corresponding position calculated by the Siamese model trained in the front; S6.2, respectively, m1, m2, m3 are calibrated by the trained calibrator, and the calibrated features are combined; S6.3, the combined data are classified by the trained Bayesian classification model, if the template image and the detection image belong to the same type, the installation is correct, otherwise, the installation is incorrect.

[0036] As Figure 2 , Figure 3 , Figure 4 shown. Figure 2 In the case of real type clockwise 90-blue 15, template clockwise 90-blue 15, the detection result of the application is the same type as the standard image, and the standard answer is clockwise 90-blue 15; the detection result shows that the application method can correctly identify the correct installation. Figure 3 In the case of real type clockwise 90-green 30, template clockwise 90-green 30, the detection result of the application is the same type as the standard image, and the standard answer is clockwise 90-green 30; the detection result shows that the application method can correctly identify the correct installation. Figure 4 In the case of real type blank 2814, template blank 2814, the detection result of the application is the same type as the standard image, and the standard answer is blank 2814; the detection result shows that the application method can correctly identify the correct installation.

[0037] As Figure 5 , Figure 6 , Figure 7 shown. Figure 5 In the case of real type clockwise 90-red 10, template clockwise 90-red 10, the detection result of the application is different from the standard image, and the standard answer is clockwise 90-red 10; the detection result shows that the application method can correctly identify the incorrect installation. Figure 6 In the case of real type clockwise 90-orange 5, template clockwise 90-orange 5, the detection result of the application is different from the standard image, and the standard answer is clockwise 90-orange 5; the detection result shows that the application method can correctly identify the incorrect installation. Figure 7 In the case of real type clockwise 90-yellow 20, template clockwise 90-coffee 75, the detection result of the application is different from the standard image, and the standard answer is clockwise 90-coffee 75; the detection result shows that the application method can correctly identify the incorrect installation.

[0038] The above embodiments are the preferred embodiments of the application, but the embodiments of the application are not limited by the above embodiments, and any changes, modifications, substitutions, combinations, simplifications made without departing from the spirit and principles of the application are equivalent replacement methods, which are all included in the protection scope of the application.

Claims

1. A method for visual inspection of automobile fuse assembly based on adaptive threshold Bayesian fusion, characterized in that, The method comprises the following steps: S1, data acquisition; S2, Siamese model training; S3, adaptive threshold Bayesian classification model training; S4, formulating detection rules; S5, cropping out the detected target and the corresponding standard image; S6, judging the type of the cropped out detected image through the Bayesian classification model.

2. The method of claim 1, wherein, In step S1, the data acquisition comprises the following steps: S1.1, collecting fuse box images, cropping out various fuse images from the fuse box images, setting the fuse type as m types, and n images for each type of fuse; S1.2, normalizing the image scale, and dividing the image data set into a test as a training set, a test set and a validation set.

3. The method of claim 1, wherein, In step S2, the process of Siamese model training is as follows: the Siamese network uses VGG16 for feature extraction, selects an SGD optimizer for parameter optimization, trains the Siamese network on the fuse image data set until the model parameters converge, and obtains the converged Siamese network model.

4. The method of claim 1, wherein, In step S3, the process of adaptive threshold Bayesian classification model training comprises the following steps: S3.1, multi-source feature extraction: extracting image pairs from the image training set, respectively dividing the two images into left and right half images, calculating the histogram similarity between the left half images and the histogram similarity between the right half images of the image pairs, and calculating the similarity value of the image pairs through the Siamese model; S3.2, feature fusion: using a probability calibration method to calibrate the histogram similarity m1 between the left half images, the histogram similarity m3 between the right half images, and the similarity m3 obtained by the Siamese; taking the three calibrated probabilities as features to construct a feature vector X, and pairing it with the binary label y from the image pair to form a data sample, and constructing a complete data set based on the data sample, and then dividing it into a training set and a validation set; S3.3, Bayesian classification model training: training a Gaussian naive Bayesian classification model using the training set; S3.4, initial threshold setting stage: calculating the recall rate under different thresholds using the validation set, automatically searching for the minimum threshold that meets the target recall rate as the initial decision threshold, and recording the initial performance indicators; S3.5, online prediction and feedback stage: after the model is deployed, real-time prediction is performed on new input samples, and prediction probability and classification results are output; S3.6, threshold adaptive adjustment stage: when feedback data containing true labels is received, the threshold is dynamically adjusted according to the recall rate, precision and F1 score of the current batch: if the current recall rate is lower than the target value, the threshold is lowered to improve the sensitivity; if the recall rate is too high, the threshold is increased to reduce false positives; otherwise, the threshold remains unchanged.

5. The method of claim 4, wherein, After step S3.6, it further comprises: S3.7, model saving and loading: the trained Bayesian classification model, calibrator and meta-information file including threshold, adaptation rate and target recall rate can be saved regularly.

6. The method of claim 1, wherein, In step S4, the specific steps of formulating the detection rule are: taking the image of the correctly installed fuse box as the reference, marking the positions of all fuses, and giving the fuse image category label of each position.

7. The method of claim 1, wherein, In step S5, the specific steps of cutting out the detected target and the corresponding standard image are: taking a photo of the fuse box assembled on the production line, and cutting out the image of each position from the photo according to the marked positions in the reference image.

8. The method of claim 1, wherein, In step S6, the specific steps of determining the type of the cut-out detection image through the Bayesian classification model are: S6.1, respectively calculating the similarity m1 between the left half histograms of the detected image and the corresponding position template image, the similarity m2 between the right half histograms, and the similarity m3 between the detected image and the corresponding position template image calculated by the trained Siamese model; S6.2, respectively calibrating m1, m2, and m3 through the trained calibrator, and combining the calibrated features; S6.3, classifying and detecting the combined data through the Bayesian classification model, and if the template image and the detected image belong to the same type, the installation is correct.