A detection method for automobile fuse box assembly based on machine vision

By combining Siamese network and Resnet classification network and combining multiple detection methods, the problems of poor light sensitivity and robustness of traditional automobile fuse box assembly detection technology are solved, and efficient and accurate fuse box detection is achieved, especially in poor light and under contaminated conditions.

CN117893495BActive Publication Date: 2024-12-27NANJING FORESTRY UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410048494.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-12
Publication Date
2024-12-27
Estimated Expiration
2044-01-12

AI Technical Summary

Technical Problem

Traditional automotive fuse box assembly detection technology has problems such as sensitive light conditions, poor robustness, poor identification effect during color fading and pollution, resulting in inconsistency in detection and time-consuming and labor-intensive.

Method used

Using machine vision-based detection methods, combined with Siamese network and Resnet classification network, through data acquisition, model training and detection rules formulation, multiple detection methods (similarity discrimination, classification recognition and text recognition) are used to identify fuse images, and select The most suitable detection method for improved robustness and accuracy.

Benefits of technology

It realizes efficient and accurate detection of car fuse boxes, improves robustness and detection accuracy, and can effectively identify fuse types under poor light and pollution conditions, especially positive and inverted 5, significantly improving the performance and efficiency of detection .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117893495B_ABST
    Figure CN117893495B_ABST
Patent Text Reader

Abstract

The present invention discloses a detection method for automobile fuse box assembly based on machine vision, which belongs to the field of automobile production detection technology, including data collection, model training, formulation of detection rules, detection and other steps. In the model training step, based on the fuse image data set, Siamese network and Resnet classification network training are respectively performed; in the formulation of detection rules step, based on the standard fuse box image, for the fuse image at each position, a detection and recognition test is performed through multiple detection methods to determine the detection method applicable to the fuse at each position. The present invention comprehensively uses Siamese network to perform similarity matching on fuse images, and Resnet classification network to classify fuse images, so as to realize the detection of fuse images. These two deep learning networks effectively solve the recognition problems caused by poor light, discoloration, stains, etc., and obtain better performance and stronger robustness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention mainly relates to the technical field of automobile production detection, and in particular to a detection method for automobile fuse box assembly based on machine vision. Background Art

[0002] Automobile fuse box assembly detection technology is a key technology involving automobile safety. It can effectively detect and verify the correct assembly of the fuse box and its internal components to ensure the reliability and safety of the automobile electrical system.

[0003] Traditional methods of automobile fuse box assembly inspection include manual visual inspection. However, manual inspection is easily affected by the operator's subjective judgment and fatigue, which leads to inconsistencies and errors, and there are human errors. In addition, manual inspection takes a lot of time, especially in large-scale automobile production, which is time-consuming, labor-intensive, and costly, and there are also problems such as difficulty in tracing products.

[0004] With the development of computers, video surveillance technology has become more and more popular. Identifying water levels through image processing has become a solution. Currently, commonly used processing methods include color contrast, character recognition, Sift, Surf feature point matching and other methods. These traditional computer vision methods are necessary steps to select important features from images, and feature extraction depends on manual judgment and long-term trial and error. This method of extracting features is not universal, resulting in the defect of poor robustness. Specifically, the color contrast method is very sensitive to good lighting conditions. Insufficient lighting or strong light reflection will affect the detection performance and limit the scope of use; while feature point methods such as Sift and Surf are more sensitive to changes in lighting, rotation, scaling, etc., and the matching accuracy is low; the character recognition method cannot distinguish between fuse types without text, and the recognition rate of positive 5 and inverted 5 is not high (such as Figure 1 (a) and (b) show that the detection effect is significantly reduced when there are dirt, fading and discoloration on the insurance film. Summary of the invention

[0005] The technical solution of the present invention aims at the technical problem that the existing technical solutions are too single, and provides a solution that is significantly different from the existing technology. It mainly provides a detection method for automobile fuse box assembly based on machine vision, which is used to solve the technical problems mentioned in the above background technology that the existing technology detection is very sensitive to light conditions; and the recognition effect is poor when fading or contamination occurs, and the robustness is poor.

[0006] The technical solution adopted by the present invention to solve the above technical problems is:

[0007] A method for detecting automobile fuse box assembly based on machine vision comprises the following steps:

[0008] Step 1, data collection: collect fuse box images, crop m types of fuses from the images, and obtain image datasets with n images for each type. The image datasets are divided into training sets and test sets.

[0009] Step 2, model training: on the fuse image dataset, Siamese network and Resnet classification network training are performed respectively until the model parameters converge, and the corresponding network models are obtained, namely Siamese network model and Resnet classification network model;

[0010] Step 3, formulate detection rules: take the standard fuse box image as the reference, mark the position and type of all fuses therein, and perform detection and recognition tests on the fuse image at each position using multiple detection methods until a correct recognition result is obtained, and determine the detection method used last as the detection method for the fuse at this position; the multiple detection methods include (1) using the Siamese network model trained in step 2 for similarity judgment; (2) using the Resnet classification network model for classification and recognition; (3) performing text recognition based on the Paddle OCR model framework; (4) graying the image, then selecting a suitable threshold to binarize the image, and then counting the white point data of each row in the upper and lower parts of the image respectively, and judging whether the row with the largest white point falls in the upper or lower part to be positive 5 or negative 5;

[0011] Step 4, detection: take a photo of the fuse box assembled on the production line, crop the image of the same position from the photo according to the position marked in the reference image in step 3, and perform detection according to the detection method determined by the detection rule of this position.

[0012] Furthermore, in step 1, the specific steps of data collection are:

[0013] Step 1.1, first collect the fuse box image, and crop various fuse images from the fuse box image. Suppose there are m types of fuses, and there are n images of each type of fuse;

[0014] In step 1.2, the image scale is converted into the same size, an image dataset is obtained, and the image dataset is divided into a training set and a test set.

[0015] Furthermore, in step 2, the specific steps of model training are:

[0016] Step 2.1, the Siamese network uses VGG16 for feature extraction, selects the SGD optimizer for parameter optimization, and trains on the fuse image dataset until the model parameters converge to obtain a converged Siamese network model;

[0017] In step 2.2, the Resnet classification network adopts the Resnet18 network structure, selects the Adam optimizer for parameter optimization, uses the cross entropy loss function, and trains on the fuse image dataset until the model parameters converge to obtain the Resnet classification network model.

[0018] Furthermore, in step 3, the specific steps for formulating the detection rules are:

[0019] Step 3.1, put the standard fuse box into the system and take a photo, and use this photo as a reference image;

[0020] Step 3.2, manually mark the location and type of all fuses in the reference image;

[0021] Step 3.3, at each position marked in the reference image, cut out the fuse image, and then select the detection method for this image, wherein the implementation steps are as follows:

[0022] Step 3.3.1, if the surface of the fuse only contains the text information of the word "5", first grayscale the image, then select a suitable threshold to binarize the image, and then divide the image into two parts, respectively count the number of white dots in each row of the upper and lower parts of the image, and judge according to whether the row with the largest number of white dots falls in the upper half or the lower half: if the row with the largest number of white dots falls in the lower half, the fuse is positive 5, otherwise it is inverted 5; if this method is correct, then the detection rule for this position adopts this detection method; otherwise, go to step 3.3.2;

[0023] Step 3.3.2, using the Siamese network model obtained in step 2 to perform similarity detection on the fuse image. If the detection type is correct and the similarity exceeds a certain threshold, the fuse image at this position is determined to be detected using the Siamese model. Otherwise, go to step 3.3.3;

[0024] Step 3.3.3, use the Resnet classification network model obtained in step 2 to classify and detect the fuse image. If the detection type is correct and the predicted value exceeds a certain threshold, it is determined that the fuse image at this position is detected using the Resnet classification network model. Otherwise, go to step 3.3.4;

[0025] Step 3.3.4, if the fuse surface contains text information, first grayscale the image, then select a suitable threshold to binarize the image, and perform text recognition on the fuse image based on the Paddle OCR model framework. If the detected text is correct and the predicted probability exceeds a certain threshold, the type of fuse is determined based on the aspect ratio of the text and image. If correct, the fuse image at this position uses this threshold and text recognition method.

[0026] Furthermore, in step 4, the specific steps of the detection process are:

[0027] Step 4.1, take a photo of the fuse box on the production line to obtain a photo of the fuse box to be tested;

[0028] Step 4.2, based on the marked position in the reference image, crop the image at the same position of the fuse box photo to be tested;

[0029] Step 4.3, perform detection according to the detection method determined by the detection rule of this position. If the detection type is consistent with the fuse type at the same position of the reference image, it passes. Otherwise, it is marked as an error and prompted.

[0030] Furthermore, in step 4.3, if the detection type is inconsistent with the fuse type at the same position of the reference image, first determine whether the detection method used for the fuse at the current position is the detection method corresponding to the Siamese network model or the Resnet classification network model. If so, mark it as an error and give a prompt; if not, use the Resnet network for classification detection and the Siamese network for similarity detection in turn. If one of the detection results is that the detection type is consistent with the fuse type at the same position of the reference image, it passes; if the detection results are all inconsistent, mark it as an error and give a prompt.

[0031] Compared with the prior art, the present invention has the following beneficial effects:

[0032] (1) The present invention uses a Siamese network to perform similarity matching on fuse images and a Resnet classification network to classify fuse images, thereby realizing detection of most fuse images. These two deep learning networks effectively solve the problem of poor recognition caused by poor lighting, discoloration, stains, etc. In the present invention, most fuses in the automobile fuse box are detected by using Siamese network similarity detection or Resnet network classification detection; and for fuses using other detection methods, when the detection result is that the detection type is inconsistent with the fuse type at the same position of the reference image, the Resnet network is used for classification detection and the Siamese network is used for similarity detection to realize further detection, thereby more effectively solving the problem of poor recognition caused by poor lighting, discoloration, stains, etc., and obtaining better performance and stronger robustness.

[0033] (2) The present invention detects positive 5 and reverse 5 of a specific type of fuse with only slight differences in the image. The image is first grayed, then a suitable threshold is selected for binarization, and then the number of white dots in each row of the image is counted. The judgment is made based on whether the row with the largest number of white dots falls in the upper half or the lower half. If the row with the largest number of white dots falls in the lower half, the fuse is positive 5, otherwise it is reverse 5, achieving a high accuracy rate and solving the problem of fine-grained image classification. In addition, when the present invention uses multiple detection methods to perform detection and recognition tests in the step of formulating detection rules, it first determines whether the surface of the fuse contains only text information of the word "5". If so, the above-mentioned method is used to distinguish positive 5 / reverse 5. For this type of fuse, the steps of using other detection methods are directly avoided, because the recognition accuracy of other detection methods is not high and the reliability cannot be fully guaranteed. At the same time, such a setting can effectively save time.

[0034] (3) The present invention places the Paddle OCR model framework detection method at the end when selecting the detection method in the step of formulating the detection rules. This is because this method takes a long time to recognize and has a low efficiency. Therefore, this detection method is placed at the end to be used as a supplement to the previous method. When applied, most fuses can be detected by the previous detection method, so that the detection methods corresponding to the fuses in the car fuse box are mostly the previous detection methods, thereby improving the detection efficiency.

[0035] (4) The present invention selects the most suitable detection method for each fuse in the automobile fuse box, rather than using a unified detection method, thereby improving the detection accuracy and shortening the time consumption as much as possible, thereby achieving efficient and high-precision detection of the automobile fuse box.

[0036] The present invention will be explained in detail below with reference to the accompanying drawings and specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 (a) is a schematic diagram of a fuse with the character positive 5. Figure 1 (b) is a schematic diagram of a fuse with the character "5" in reverse order;

[0038] Figure 2 A flow chart of the detection method provided by the present invention;

[0039] Figure 3 is an identification diagram for the text 5 on the surface of the fuse, wherein Figure 3 (a) is positive 5, Figure 3 (b) is 5 in reverse order;

[0040] Figure 4 This is an example diagram of similarity detection based on the Siamese model;

[0041] Figure 5 This is an example diagram of classification detection of the Resnet classification network model;

[0042] Figure 6 This is an example of text recognition based on the Paddle OCR framework;

[0043] Figure 7 This is an example diagram of the final detection result based on the rules. DETAILED DESCRIPTION

[0044] To facilitate understanding of the present invention, the present invention will be described more comprehensively below with reference to the relevant drawings. Several embodiments of the present invention are given in the drawings, but the present invention can be implemented in different forms and is not limited to the embodiments described in the text. On the contrary, these embodiments are provided to make the content disclosed in the present invention more thorough and comprehensive.

[0045] It should be noted that when an element is referred to as being "fixed on" another element, it may be directly on the other element or there may be a central element. When an element is considered to be "connected to" another element, it may be directly connected to the other element or there may be a central element at the same time. The terms "vertical", "horizontal", "left", "right" and similar expressions used in this article are for illustrative purposes only.

[0046] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly connected by technicians in the technical field to which the present invention belongs. The terminology used in the specification of the present invention is for the purpose of describing specific embodiments and is not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more related listed items.

[0047] Please refer to the attached Figure 2 , a method for detecting automobile fuse box assembly based on machine vision, comprising the following steps:

[0048] Step 1, data collection: collect fuse box images, crop m types of fuses from the images, and obtain image datasets with n images for each type. The image datasets are divided into training sets and test sets.

[0049] Specifically,

[0050] Step 1.1, first collect the image of the fuse box by taking photos on site (not the image of the standard fuse box), and cut out various fuse images from the fuse box image (first cut out all the fuses in the fuse box, and then classify them; the classification is based on color and text, as well as positive and negative. The international standard for the color of automotive chip fuses is: 2A gray, 3A purple, 4A pink, 5A orange, 7.5A brown, 10A red, 15A blue, 20A yellow, 25A transparent colorless, 30A green and 40A dark orange, etc. According to the difference in color and text, the size of different amperes can be clearly distinguished. In this solution, the reverse insertion problem needs to be considered, and the category is expanded. For example, 5A orange is expanded into positive 5 and negative 5). Suppose the fuse type is m, and there are n images of each type of fuse;

[0051] In step 1.2, the image scale is converted into the same size, an image dataset is obtained, and the image dataset is divided into a training set and a test set.

[0052] Training Set: A dataset used to train a model. Machine learning models learn patterns and rules from samples in the training set so that they can make predictions on unseen data. The training set usually contains a large number of samples and covers various situations that the model may encounter in the application phase; Test Set: A dataset used to evaluate the performance of a model. After the model learns on the training set, it needs to be evaluated on the test set to understand its performance on unseen data. The test set should be independent of the training set to ensure that the model has not seen this data in advance.

[0053] Step 2, model training: on the fuse image dataset, Siamese network and Resnet classification network training are performed respectively until the model parameters converge, and the corresponding network models are obtained, namely Siamese network model and Resnet classification network model;

[0054] Specifically, in step 2.1, the Siamese network uses VGG16 for feature extraction, selects the SGD optimizer for parameter optimization, and trains on the fuse image dataset until the model parameters converge to obtain a converged Siamese network model;

[0055] In step 2.2, the Resnet classification network adopts the Resnet18 network structure, selects the Adam optimizer for parameter optimization, uses the cross entropy loss function, and trains on the fuse image dataset until the model parameters converge to obtain the Resnet classification network model.

[0056] Model training process: First, train the model through the training set, and then use the test set to evaluate the performance of the model. If the model does not work well, readjust and retrain, and continue to iterate this process. When the model achieves performance close to the expected results on the test set and there is no significant change, the model training is considered to have converged, and the training process can be stopped.

[0057] Step 3, formulate detection rules: take the standard fuse box image as the reference, mark the position and type of all fuses therein, and perform detection and recognition tests on the fuse image at each position using multiple detection methods until a correct recognition result is obtained, and determine the detection method used last as the detection method for the fuse at this position; the multiple detection methods include (1) using the Siamese network model trained in step 2 for similarity judgment; (2) using the Resnet classification network model for classification and recognition; (3) performing text recognition based on the Paddle OCR model framework; (4) graying the image, then selecting a suitable threshold to binarize the image, and then counting the white point data of each row in the upper and lower parts of the image respectively, and judging whether the row with the largest white point falls in the upper or lower part to be positive 5 or negative 5;

[0058] Specifically,

[0059] Step 3.1, put the standard fuse box into the system and take a photo, and use this photo as a reference image;

[0060] Step 3.2, manually mark the location and type of all fuses in the reference image;

[0061] Step 3.3, at each position marked in the reference image, cut out the fuse image, and then select the detection method for this image, wherein the implementation steps are as follows:

[0062] Step 3.3.1, if the surface of the fuse contains only the text information of the word "5" (in this rule-making stage, whether it contains only the word 5 is completely manually determined; in the subsequent detection stage, whether it contains only the word 5 is automatically detected), first grayscale the image, and then select a suitable threshold (in the rule-making stage, the threshold is selected between 0-255 and is manually selected through the scroll bar; the threshold value will be different in different situations; in the detection stage, the image is automatically binarized with the threshold determined in the rule-making stage) Binarize the image, then divide the image into two parts, and count the number of white dots in each row of the upper and lower parts of the image respectively, and judge according to whether the row with the largest number of white dots falls in the upper half or the lower half: if the row with the largest number of white dots falls in the lower half, then the fuse is positive 5 (such as Figure 3 (a)); otherwise, it is reversed 5 (such as Figure 3(b)); if this method is correct, then the detection rule for this position adopts this detection method; otherwise, go to step 3.3.2;

[0063] Step 3.3.2, using the Siamese network model obtained in step 2 to perform similarity detection on the fuse image. If the detection type is correct and the similarity exceeds a certain threshold, the fuse image at this position is determined to be detected using the Siamese model. Otherwise, go to step 3.3.3; Figure 4 An example diagram of similarity detection of Siamese model is given;

[0064] Step 3.3.3, use the Resnet classification network model obtained in step 2 to classify and detect the fuse image. If the detection type is correct and the predicted value exceeds a certain threshold, it is determined that the fuse image at this position is detected using the Resnet classification network model. Otherwise, go to step 3.3.4; Figure 5 An example diagram of classification detection of the Resnet classification network model is given;

[0065] Step 3.3.4, if the fuse surface contains text information (in this rule-making stage, the method of determining whether it contains text is completely manual; in the subsequent detection stage, whether it contains text is detected automatically), first grayscale the image, then select a suitable threshold to binarize the image, and perform text recognition on the fuse image based on the Paddle OCR model framework. If the detected text is correct and the predicted probability exceeds a certain threshold, the type of fuse is determined based on the aspect ratio of the text and image. If it is correct, the fuse image at this position uses this threshold and text recognition method; if it is inaccurate, it is usually caused by reflection or too far away, and external physical conditions need to be adjusted, such as shooting distance, lighting angle, etc. Figure 6 An example image of text recognition based on the Paddle OCR framework is given.

[0066] Step 4, detection: take a photo of the fuse box assembled on the production line, crop the image of the same position from the photo according to the position marked in the reference image in step 3, and perform detection according to the detection method determined by the detection rule of this position; if the detected fuse type is consistent with the fuse type at the same position of the reference image, it passes, otherwise, an error prompt is given.

[0067] Specifically,

[0068] Step 4.1, take a photo of the fuse box on the production line to obtain a photo of the fuse box to be tested;

[0069] Step 4.2, based on the marked position in the reference image, crop the image at the same position of the fuse box photo to be tested;

[0070] Step 4.3, perform detection according to the detection method determined by the detection rule of this position. If the detection type is consistent with the fuse type at the same position of the reference image, it passes; if the detection type is inconsistent with the fuse type at the same position of the reference image, first determine whether the detection method used for the fuse at the current position is the detection method corresponding to the Siamese network model or the Resnet classification network model. If so, mark it as an error and give a prompt; if not, first use the Resnet classification network model for classification detection. If the detection result shows that the detection type is consistent with the fuse type at the same position of the reference image, it passes; if the detection results are inconsistent, use the Siamese network model for similarity detection. If the detection result shows that the detection type is consistent with the fuse type at the same position of the reference image, it passes; if the detection results are inconsistent, mark it as an error and give a prompt. Figure 7 An example diagram of the final detection result based on the rules is given.

[0071] The present invention realizes the combination of traditional machine vision technology and deep learning methods, and has the advantages of both methods, effectively solving the problem of poor recognition caused by poor lighting, discoloration, stains, etc., and obtaining better performance and stronger robustness. Specifically, the present invention uses the Siamese neural network to achieve similarity matching between the target fuse image and the reference fuse image. This image matching method based on deep learning can learn higher-level features and has good matching accuracy and robustness; the deep residual network Resnet, a classic deep learning model for image classification, is applied to fuse image classification and recognition to determine whether the fuse is of the same category as the reference fuse. The deep residual network has shown high performance in the task of fuse image classification. In addition, in view of the fact that many fuses have text on their surfaces, text recognition is performed based on the Paddle OCR framework as a supplement to detection; at the same time, for the special characters positive 5 and inverted 5 (the difference in the images is very subtle, and the human eye can distinguish them by careful distinction, such as Figure 3 As shown in (a) and (b), when the accuracy of the previous method is not high, the image is first grayed out, and then a suitable threshold is selected to binarize the image. Then, the white point data of each row in the upper and lower parts of the image are counted separately. The positive 5 or the negative 5 is judged according to whether the row with the largest white point falls in the upper part or the lower part, which solves the problem of fine-grained image classification very well.

[0072] The above is an exemplary description of the present invention in combination with the accompanying drawings. It is obvious that the specific implementation of the present invention is not limited to the above-mentioned method. As long as such non-substantial improvements are made by adopting the method concept and technical solution of the present invention, or the concept and technical solution of the present invention are directly applied to other occasions without improvement, they are all within the protection scope of the present invention.

Claims

1. A method for detecting automobile fuse box assembly based on machine vision, characterized in that: The steps include: Step 1, data collection: collect fuse box images, crop m types of fuses from the images, and obtain image datasets with n images for each type. The image datasets are divided into training sets and test sets. Step 2, model training: on the fuse image dataset, Siamese network and Resnet classification network training are performed respectively until the model parameters converge, and the corresponding network models are obtained, namely Siamese network model and Resnet classification network model; Step 3, formulate detection rules: take the standard fuse box image as the reference, mark the position and type of all fuses therein, and perform detection and recognition tests on the fuse image at each position using multiple detection methods until the correct recognition result is obtained, and then determine the detection method used last as the detection method for the fuse at this position; the multiple detection methods include (1) using the Siamese network model trained in step 2 for similarity judgment; (2) using the Resnet classification network model trained in step 2 for classification and recognition; (3) performing text recognition based on the Paddle OCR model framework; (4) graying the image, then selecting a suitable threshold to binarize the image, and then counting the white point data of each row in the upper and lower parts of the image respectively, and judging whether the row with the largest white point falls in the upper or lower part to be positive 5 or negative 5; Step 4, detection: take a photo of the fuse box assembled on the production line, crop the image of the same position from the photo according to the position marked in the reference image in step 3, and perform detection according to the detection method determined by the detection rule of this position; In step 4, the specific steps of the detection process are: Step 4.1, take a photo of the fuse box on the production line to obtain a photo of the fuse box to be tested; Step 4.2, based on the marked position in the reference image, crop the image of the same position from the photo of the fuse box to be tested; Step 4.3, perform detection according to the detection method determined by the detection rule of this position. If the detection type is consistent with the fuse type at the same position of the reference image, it passes; otherwise, an error is marked and a prompt is given.

2. The method for detecting automobile fuse box assembly based on machine vision according to claim 1, characterized in that: In step 1, the specific steps of data collection are: Step 1.1, first collect the fuse box image, and crop various fuse images from the fuse box image. Suppose there are m types of fuses, and there are n images of each type of fuse; In step 1.2, the image scale is converted into the same size, an image dataset is obtained, and the image dataset is divided into a training set and a test set.

3. The method for detecting automobile fuse box assembly based on machine vision according to claim 1, characterized in that: In step 2, the specific steps of model training are: Step 2.1, the Siamese network uses VGG16 for feature extraction, selects the SGD optimizer for parameter optimization, and trains on the fuse image dataset until the model parameters converge to obtain a converged Siamese network model; In step 2.2, the Resnet classification network adopts the Resnet18 network structure, selects the Adam optimizer for parameter optimization, uses the cross entropy loss function, and trains on the fuse image dataset until the model parameters converge to obtain the Resnet classification network model.

4. The method for detecting automobile fuse box assembly based on machine vision according to claim 1, characterized in that: In step 3, the specific steps for formulating detection rules are as follows: Step 3.1, put the standard fuse box into the system and take a photo, and use this photo as a reference image; Step 3.2, manually mark the location and type of all fuses in the reference image; Step 3.3, at each position marked in the reference image, cut out the fuse image, and then select the detection method for this image, wherein the implementation steps are as follows: Step 3.3.1, if the surface of the fuse only contains the text information of the word 5, first grayscale the image, then select a suitable threshold to binarize the image, and then divide the image into two parts, respectively count the number of white dots in each row of the upper and lower parts of the image, and judge according to whether the row with the largest number of white dots falls in the upper half or the lower half: if the row with the largest number of white dots falls in the lower half, the fuse is positive 5, otherwise it is inverted 5. If this method is correct, then the detection rule for this position adopts this detection method; otherwise, go to step 3.3.2; Step 3.3.2, use the Siamese network model obtained in step 2 to perform similarity detection on the fuse image. If the detection type is correct and the similarity exceeds a certain threshold, the fuse image at this position is determined to be detected using the Siamese model. Otherwise, go to step 3.3.3; Step 3.3.3, use the Resnet classification network model obtained in step 2 to classify and detect the fuse image. If the detection type is correct and the predicted value exceeds a certain threshold, it is determined that the fuse image at this position is detected using the Resnet classification network model. Otherwise, go to step 3.3.4; Step 3.3.4, if there is text information on the surface of the fuse, first grayscale the image, then select a suitable threshold to binarize the image, and perform text recognition on the fuse image based on the Paddle OCR model framework. If the detected text is correct and the prediction probability exceeds a certain threshold, the type of fuse is determined based on the aspect ratio of the text and image. If correct, the fuse image at this position uses this threshold and text recognition method.

5. The method for detecting automobile fuse box assembly based on machine vision according to claim 1, characterized in that: Step 4.3 is replaced by: perform detection according to the detection method determined by the detection rule of this position. If the detection type is consistent with the fuse type at the same position of the reference image, it passes; if the detection type is inconsistent with the fuse type at the same position of the reference image, first determine whether the detection method used for the fuse at the current position is the detection method corresponding to the Siamese network model or the Resnet classification network model. If so, mark it as an error and give a prompt; if not, first use the Resnet classification network model for classification detection. If the detection result shows that the detection type is consistent with the fuse type at the same position of the reference image, it passes; if the detection results are inconsistent, use the Siamese network model for similarity detection. If the detection result shows that the detection type is consistent with the fuse type at the same position of the reference image, it passes; if the detection results are inconsistent, mark it as an error and give a prompt.