A clip and traditional image processing fusion method for automobile fuse box assembly detection
By combining the CLIP multimodal deep learning model with traditional image processing methods, the problems of light sensitivity and poor robustness in automotive fuse box assembly inspection are solved, achieving more efficient and interpretable inspection results that are adaptable to different lighting and contamination conditions.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HEFEI UNIV OF TECH
- Filing Date
- 2025-04-02
- Publication Date
- 2026-04-24
AI Technical Summary
Existing technologies are sensitive to lighting conditions and have poor robustness in automotive fuse box assembly and inspection. Deep learning requires a large amount of labeled data and has poor interpretability, while traditional methods do not perform well in recognition under conditions of changing lighting and pollution.
The CLIP multimodal deep learning model is combined with traditional image processing methods. The CLIP model is used to match image and text features, and histogram similarity and cosine similarity are used to determine the fuse type. The ResNet18 network is used to calculate feature vectors to realize fuse box assembly detection.
It improves the robustness and interpretability of detection, adapts to different lighting conditions and contamination situations, reduces the need for labeled data, and improves the accuracy and efficiency of detection.
Smart Images

Figure CN120259265B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, specifically to a method for fusing Clip image processing with traditional image processing for automotive fuse box assembly inspection. Background Technology
[0002] Automotive fuse box assembly and testing technology is a key technology related to automotive safety. It can effectively detect and verify the correct assembly of fuse boxes and their internal components to ensure the reliability and safety of automotive electrical systems.
[0003] Traditional automotive fuse box assembly and inspection methods rely on manual visual inspection, which is susceptible to human error: manual inspection is easily affected by operator subjectivity and fatigue, leading to inconsistencies and errors. It is also time-consuming, especially in large-scale automotive production, and costly; furthermore, product traceability is difficult to achieve. With the development of computers and the increasing prevalence of video surveillance technology, image processing has become a solution for automotive fuse box assembly and inspection. Currently, commonly used processing methods include color comparison, character recognition, SIFT, SURF feature point matching, and deep learning.
[0004] Traditional computer vision methods require selecting key features from images as a necessary step, but feature extraction relies on human judgment and long-term trial and error. This approach is not universally applicable, resulting in poor robustness. Specifically, color contrast methods are highly sensitive to good lighting conditions; insufficient illumination or strong light reflection affects detection performance and limits their application. Feature point methods like SIFT and SURF are sensitive to changes in lighting, rotation, and scaling, leading to lower matching accuracy. Character recognition methods cannot distinguish between fuse types without text, and their recognition rate for positive and negative characters is low. Furthermore, detection performance significantly decreases when fuses have dirt, fading, or discoloration. While deep learning performs excellently, it still faces challenges such as requiring large amounts of labeled data, high computational costs, and poor interpretability. Summary of the Invention
[0005] This invention addresses the problem of overly simplistic solutions in existing technologies by providing a significantly different approach. Specifically, the invention aims to offer a method that integrates Clip technology for automotive fuse box assembly inspection with traditional image processing. This addresses the shortcomings of existing technologies, which are highly sensitive to lighting conditions, rely on human experience for color threshold selection, and suffer from poor recognition performance and robustness when encountering color fading or contamination. While deep learning offers superior performance, it still faces challenges such as the need for large amounts of labeled data, high computational costs, and poor interpretability.
[0006] To achieve the above objectives, the present invention provides the following technical solution: a method for fusing Clip image processing with traditional image processing for automotive fuse box assembly inspection, comprising the following steps:
[0007] Step 1: Acquire images of the fuse box, crop out m types of fuses from the images, n images for each type, and then perform image scale normalization.
[0008] Step 2, CLIP model transfer training: Load the pre-trained CLIP model, use the contrastive loss function, select the optimizer Adam and set the learning rate to 1e-6. On the cropped fuse image dataset, input the images and corresponding fuse label text into the CLIP model, calculate the similarity between the image and text features output by the model, and optimize the model parameters through the contrastive loss function until the model converges on the training set, and determine the corresponding network model.
[0009] Step 3, Develop detection rules: Based on the image of a correctly installed fuse box, mark the location of all fuses, and then give the category label of the fuse image for each location;
[0010] Step 4, crop out the target and corresponding standard image for inspection: Take a picture of the fuse box assembled on the production line, and crop out the image of each position from the photo according to the position marked in the reference image;
[0011] Step 5: The CLIP transfer model determines the type of the cropped image: The cropped detection image is input into the image encoder of the CLIP transfer model to obtain the image embedding vector. Simultaneously, the fuse type text label is input into the text encoder of the CLIP transfer model to obtain the text embedding vector. The cosine similarity between the detection image embedding vector and the embedding vectors of each type of text label is calculated, and the detection image is classified into the type text label with the highest cosine similarity. When the highest cosine similarity is greater than a certain threshold, if the type text label with the highest cosine similarity matches the fuse type at the same position in the standard image, the fuse is correctly installed; otherwise, an incorrect installation is indicated with an error message. When the highest cosine similarity is less than a certain threshold, proceed to step 6.
[0012] Step 6: Histogram similarity determination of the cropped image type: First, divide the cropped image into left and right halves, and simultaneously divide the image corresponding to the reference image into left and right halves; calculate the histogram similarity between the left half of the cropped image and the left half of the image corresponding to the reference image, and simultaneously calculate the histogram similarity between the right half of the cropped image and the right half of the image corresponding to the reference image; if the histogram similarity of the left half and the right half cannot both exceed a certain threshold, the type is inconsistent with the target type, an incorrect installation is indicated, and an error message is given; otherwise, proceed to step 7;
[0013] Step 7: Cosine similarity determination of the cropped detection image type: Using ResNet18 and removing the last fully connected layer, obtain the feature vectors of the cropped detection image, the corresponding standard image, and the standard image flipped 180 degrees. Calculate the cosine similarity between the feature vectors of the cropped detection image and the standard image at the corresponding position, and simultaneously calculate the cosine similarity between the feature vectors of the cropped detection image and the standard image at the corresponding position flipped 180 degrees. If the cosine similarity with the feature vector of the standard image is greater than the cosine similarity with the feature vector of the standard image flipped 180 degrees, then the fuse type at the same position is consistent with the reference image, and it is installed correctly. If the cosine similarity with the feature vector of the standard image is less than the cosine similarity with the feature vector of the standard image flipped 180 degrees, then the fuse type at the same position is inconsistent with the reference image, and it is installed incorrectly with an error message.
[0014] Preferably, in step 1, the specific steps for data acquisition are as follows:
[0015] Step 1.1: First, acquire images of the fuse box, and then crop images of various types of fuses from the fuse box images. Let there be m types of fuses, and n images of each type of fuse.
[0016] Step 1.2: Normalize the image scale and divide the image dataset into a training set and a test set.
[0017] Preferably, in step 2, the specific steps of CLIP model transfer training are as follows:
[0018] Step 2.1: Load the pre-trained CLIP model (using the ViT-B / 32 model architecture), adopt the contrastive loss function, select the optimizer Adam and set the learning rate to 1e-6;
[0019] Step 2.2: On the cropped fuse image dataset, input the images and corresponding fuse label text into the CLIP model, calculate the similarity between the image and text features output by the model, and optimize the model parameters by using the contrastive loss function until the model converges on the training set, thus determining the corresponding network model.
[0020] Preferably, in step 3, the specific steps for formulating the detection rules are as follows:
[0021] Step 3.1: Place the correctly installed fuse box into the system and take a picture; use this picture as a reference image.
[0022] Step 3.2: Manually label the location and type of all fuses in the reference image.
[0023] Preferably, in step 4, the specific steps for cropping the detection image and the corresponding standard image are as follows:
[0024] Step 4.1: Take photos of the fuse boxes on the production line;
[0025] Step 4.2: Based on the positions marked in the reference image, crop out the detection image and the standard image at each position from the photo and the reference image respectively.
[0026] Preferably, in step 5, the CLIP transfer model determines the type of the cropped detection image as follows:
[0027] Step 5.1: Input the cropped detection image into the image encoder of the CLIP transfer model to obtain the image embedding vector. At the same time, input the fuse type text label into the text encoder of the CLIP transfer model to obtain the text embedding vector.
[0028] Step 5.2: Calculate the cosine similarity between the embedded vector of the detected image and the embedded vector of each type of text label, and classify the detected image into the type of text label with the highest cosine similarity.
[0029] Step 5.3: When the highest cosine similarity is greater than a certain threshold, if the type text label with the highest cosine similarity matches the fuse type at the same position in the reference image, then the installation is correct; otherwise, the installation is incorrect and an error message is given. When the highest cosine similarity is less than a certain threshold, proceed to step 6.
[0030] Preferably, in step 6, the specific steps for determining the type of the cropped detection image based on histogram similarity are as follows:
[0031] Step 6.1: First, divide the cropped detection image into left and right halves, and at the same time, divide the standard image at the corresponding position into left and right halves.
[0032] Step 6.2: Calculate the histogram similarity between the cropped left half of the detection image and the corresponding left half of the standard image, and simultaneously calculate the histogram similarity between the cropped right half of the detection image and the corresponding right half of the standard image.
[0033] Step 6.3: If the similarity of the left half histogram and the similarity of the right half histogram cannot both exceed a certain threshold, then the fuse type at the same position as the reference image is inconsistent, and an error message is given for incorrect installation; otherwise, proceed to step 7.
[0034] Preferably, in step 7, the specific steps for determining the type of the detected image based on cosine similarity are as follows:
[0035] Step 7.1: Use ResNet18 and remove the last fully connected layer to obtain the feature vectors of the cropped detection image, the standard image at the corresponding position, and the standard image flipped 180 degrees.
[0036] Step 7.2: Calculate the cosine similarity of the feature vectors of the cropped detection image and the standard image at the corresponding position, and at the same time calculate the cosine similarity of the feature vectors of the cropped detection image and the standard image at the corresponding position after flipping 180 degrees.
[0037] Step 7.3: Calculate the cosine similarity between the feature vectors of the cropped detection image and the corresponding standard image. Simultaneously, calculate the cosine similarity between the feature vectors of the cropped detection image and the corresponding standard image flipped 180 degrees. If the cosine similarity with the feature vectors of the standard image is greater than the cosine similarity with the feature vectors of the standard image flipped 180 degrees, then the fuse type at the same position in the reference image is consistent, and the installation is correct. If the cosine similarity with the feature vectors of the standard image is less than the cosine similarity with the feature vectors of the standard image flipped 180 degrees, then the fuse type at the same position in the reference image is inconsistent, and an error message is given.
[0038] Compared with the prior art, the beneficial effects of the present invention are:
[0039] 1. The multimodal deep learning model CLIP uses contrastive learning to match images and text. By combining the characteristics of fuse box assembly images and descriptive text, CLIP can determine whether fuses are assembled in accordance with the prescribed method. CLIP's zero-shot capability makes it well adaptable to some new and unknown classification tasks.
[0040] 2. For categories with low classification similarity implemented in CLIP, traditional image processing methods are used as supplementary processing. First, histogram similarity is used to filter out detection images that are inconsistent with the standard image. Then, based on the cosine similarity method, the similarity between the detection image and the standard image, and between the detection image and the standard image rotated 180 degrees, is calculated respectively. This determines whether the detection image and the standard image are installed correctly or reversed, thus completing the detection of fuse assembly. This approach effectively enhances the adaptability of the deep learning model and improves its interpretability.
[0041] 3. This invention combines deep learning methods with traditional image processing methods, possessing the advantages of both. It effectively solves the problems of poor recognition caused by poor lighting, fading, color loss, and smudges, achieving better performance, stronger robustness, and improved interpretability of deep learning models. Attached Figure Description
[0042] Figure 1 For flowcharts;
[0043] Figure 2 To ensure that the highest value of the cosine similarity between the detected image and the type text label calculated using the CLIP transfer model is greater than a certain threshold, and that the corresponding type text label is consistent with the fuse type at the same position in the reference image, a correct installation example image is provided.
[0044] Figure 3 To demonstrate an incorrect installation example, the highest value of the cosine similarity between the detected image and the type text label calculated using the CLIP transfer model is greater than a certain threshold, and the corresponding type text label is inconsistent with the fuse type at the same position in the reference image.
[0045] Figure 4 To ensure that the similarity of the left half histogram and the right half histogram cannot both exceed a certain threshold, an example of incorrect installation is shown in the image.
[0046] Figure 5 To ensure that the cosine similarity of the feature vector with the standard image is greater than the cosine similarity of the feature vector with the standard image flipped 180 degrees, the example image is correctly installed;
[0047] Figure 6 To ensure that the cosine similarity of the feature vector with the standard image is greater than the cosine similarity of the feature vector with the standard image flipped 180 degrees, the example image is correctly installed.
[0048] Figure 7 Example of incorrect installation: The cosine similarity of the feature vector with the standard image is less than the cosine similarity of the feature vector with the standard image flipped 180 degrees.
[0049] Figure 8 Example of incorrect installation: The cosine similarity of the feature vector with the standard image is less than the cosine similarity of the feature vector flipped 180 degrees from the standard image. Detailed Implementation
[0050] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0051] like Figure 1 As shown, the present invention discloses a method for fusing Clip image processing with traditional image processing for automotive fuse box assembly inspection, comprising the following steps:
[0052] Step 1: Acquire images of the fuse box, crop out m types of fuses from the images, n images for each type, and then perform image scale normalization.
[0053] Step 2, CLIP model transfer training: Load the pre-trained CLIP model (using the ViT-B / 32 model architecture), adopt the contrastive loss function, select the optimizer Adam and set the learning rate to 1e-6. On the cropped fuse image dataset, input the images and corresponding fuse label text into the CLIP model, calculate the similarity between the image and text features output by the model, and optimize the model parameters through the contrastive loss function until the model converges on the training set, thus determining the corresponding network model.
[0054] Step 3, define the detection rules: Based on the image of a correctly installed fuse box, mark the location of all fuses, and then give the category label of the fuse image for each location.
[0055] Step 4, crop out the target and corresponding standard image for inspection: Take a picture of the fuse box assembled on the production line, and crop out the image of each position from the photo according to the position marked in the reference image.
[0056] Step 5: The CLIP transfer model determines the type of the cropped image: The cropped image is input into the image encoder of the CLIP transfer model to obtain the image embedding vector. At the same time, the fuse type text label is input into the text encoder of the CLIP transfer model to obtain the text embedding vector. The cosine similarity between the image embedding vector and the embedding vectors of each type of text label is calculated, and the image is classified into the type text label with the highest cosine similarity. When the highest cosine similarity is greater than a certain threshold, if the type text label with the highest cosine similarity is consistent with the fuse type at the same position in the reference image, it is installed correctly; otherwise, it is installed incorrectly and an error message is given. When the highest cosine similarity is less than a certain threshold, proceed to step 6.
[0057] Step 6: Histogram similarity determination of the cropped image type: First, divide the cropped image into left and right halves, and simultaneously divide the image corresponding to the reference image into left and right halves; calculate the histogram similarity between the left half of the cropped image and the left half of the image corresponding to the reference image, and simultaneously calculate the histogram similarity between the right half of the cropped image and the right half of the image corresponding to the reference image; if the histogram similarity of the left half and the right half cannot both exceed a certain threshold, the type is inconsistent with the target type, an incorrect installation is indicated, and an error message is given; otherwise, proceed to step 7.
[0058] Step 7: Cosine similarity determination of the cropped detection image type: Using ResNet18 and removing the last fully connected layer, obtain the feature vectors of the cropped detection image, the corresponding standard image, and the standard image flipped 180 degrees. Calculate the cosine similarity between the feature vectors of the cropped detection image and the standard image at the corresponding position, and simultaneously calculate the cosine similarity between the feature vectors of the cropped detection image and the standard image at the corresponding position flipped 180 degrees. If the cosine similarity with the feature vector of the standard image is greater than the cosine similarity with the feature vector of the standard image flipped 180 degrees, then the fuse type at the same position is consistent with the reference image, and it is installed correctly. If the cosine similarity with the feature vector of the standard image is less than the cosine similarity with the feature vector of the standard image flipped 180 degrees, then the fuse type at the same position is inconsistent with the reference image, and it is installed incorrectly with an error message.
[0059] In this embodiment, the specific steps for data acquisition in step 1 are as follows:
[0060] Step 1.1: First, acquire the fuse box image, and then crop out the images of various fuses from the fuse box image. Let there be m types of fuses, and n images of each type of fuse.
[0061] Step 1.2: Normalize the image scale and divide the image dataset into a training set and a test set;
[0062] In this embodiment, the specific steps of CLIP model transfer training in step 2 are as follows.
[0063] Step 2.1: Load the pre-trained CLIP model (using the ViT-B / 32 model architecture), adopt the contrastive loss function, select the optimizer Adam, and set the learning rate to 1e-6.
[0064] Step 2.2: On the cropped fuse image dataset, input the images and corresponding fuse label text into the CLIP model, calculate the similarity between the image and text features output by the model, and optimize the model parameters by using the contrastive loss function until the model converges on the training set, thus determining the corresponding network model.
[0065] In this embodiment, the specific steps for formulating the detection rules in step 3 are as follows:
[0066] Step 3.1: Place the correctly installed fuse box into the system and take a picture, using this picture as a reference image.
[0067] Step 3.2: Manually label the location and type of all fuses in the reference image.
[0068] In this embodiment, the specific steps for cropping the detection image and the corresponding standard image in step 4 are as follows:
[0069] Step 4.1: Take a photo of the fuse box on the production line.
[0070] Step 4.2: Based on the positions marked in the reference image, crop out the detection image and the standard image at each position from the photo and the reference image respectively.
[0071] In this embodiment, the specific steps for the CLIP transfer model to determine the type of the cropped detection image in step 5 are as follows:
[0072] Step 5.1: Input the cropped detection image into the image encoder of the CLIP transfer model to obtain the image embedding vector. At the same time, input the fuse type text label into the text encoder of the CLIP transfer model to obtain the text embedding vector.
[0073] Step 5.2: Calculate the cosine similarity between the detected image embedding vector and the embedding vectors of each type of text, and classify the detected image into the type of text label with the highest cosine similarity.
[0074] Step 5.3: When the highest cosine similarity is greater than a certain threshold, if the type text label with the highest cosine similarity matches the fuse type at the same position in the reference image, then the installation is correct. Figure 2 As shown, otherwise an incorrect installation will occur, such as... Figure 3 As shown; when the highest cosine similarity is less than a certain threshold, proceed to step 6.
[0075] In this embodiment, the specific steps for determining the type of the cropped detection image based on histogram similarity in step 6 are as follows:
[0076] Step 6.1: First, divide the cropped detection image into left and right halves, and at the same time, divide the standard image at the corresponding position into left and right halves.
[0077] Step 6.2: Calculate the histogram similarity between the cropped left half of the detection image and the corresponding left half of the standard image, and simultaneously calculate the histogram similarity between the cropped right half of the detection image and the corresponding right half of the standard image.
[0078] Step 6.3: If the similarity of the left half histogram and the right half histogram cannot both exceed a certain threshold, then the fuse type at the same location as the reference image is inconsistent, indicating an incorrect installation and providing an error message, such as... Figure 4 As shown; otherwise, proceed to step 7.
[0079] In this embodiment, the specific steps for cropping the detected image to its type based on image cosine similarity in step 7 are as follows:
[0080] Step 7.1: Calculate the cosine similarity between the cropped detection image and the standard image at the corresponding position, and simultaneously calculate the cosine similarity between the cropped detection image and the standard image at the corresponding position flipped by 180 degrees.
[0081] Step 7.2: If the cosine similarity to the standard image is greater than the cosine similarity to the image flipped 180 degrees from the standard image, then the fuse at the same position as the reference image is of the same type, and the installation is correct. Figure 5 , Figure 6 As shown; if the cosine similarity to the standard image is less than the cosine similarity to the standard image flipped 180 degrees, then the fuse type at the same position as the reference image is inconsistent, indicating incorrect installation, and an error message will be given, such as... Figure 7 , Figure 8 As shown in the figure.
[0082] In summary, this invention combines the multimodal deep learning model CLIP with traditional image processing methods, combining the advantages of both methods. It effectively solves the problems of poor recognition caused by poor lighting, fading, color loss, and smudges. At the same time, the CLIP multimodal model can exhibit good classification performance with fewer annotations. CLIP's zero-shot capability makes it more adaptable to some new and unknown classification tasks, resulting in better interpretability and stronger robustness.
[0083] The CLIP multimodal model maps images and text to the same semantic space and uses contrastive learning to match images with text. In this invention, CLIP compares an image with a set of text labels (fuse image categories) and selects the most matching label as the fuse image classification result, thereby determining whether the fuse belongs to the same category as a baseline fuse. CLIP demonstrates good classification performance with fewer labels; CLIP's zero-shot capability makes it adaptable to some new and unknown classification tasks, eliminating the need for retraining from scratch like traditional image classification models, thus providing a possibility for detecting new fuse types in the future; compared to traditional deep learning networks that require a large amount of labeled data for training, CLIP can perform task transfer with less labeled data in many cases. Furthermore, for types with low confidence in CLIP classification, traditional image processing methods such as histograms combined with cosine similarity are used for supplementary processing. Traditional methods do not require a large amount of labeled data, and their combination maintains good performance even with limited data; traditional methods serve as a post-processing step, improving the adaptability of the deep learning model in different scenarios; traditional methods are generally easier to interpret, and their combination enhances the interpretability of the deep learning model.
[0084] Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for fusing Clip image processing with traditional image processing for automotive fuse box assembly inspection, characterized in that, Includes the following steps: Step 1: Acquire images of the fuse box, crop out m types of fuses from the images, n images for each type, and then perform image scale normalization. Step 2, CLIP model transfer training: Load the pre-trained CLIP model, use the contrastive loss function, select the optimizer Adam and set the learning rate to 1e-6. On the cropped fuse image dataset, input the images and corresponding fuse label text into the CLIP model, calculate the similarity between the image and text features output by the model, and optimize the model parameters through the contrastive loss function until the model converges on the training set, and determine the corresponding network model. Step 3, Develop detection rules: Based on the image of a correctly installed fuse box, mark the location of all fuses, and then give the category label of the fuse image for each location; Step 4, crop out the inspection image and corresponding standard image: Take a picture of the fuse box assembled on the production line, and according to the position marked in the reference image, crop out the inspection image of each position from the photo, and crop out the standard image of the same position from the reference image. Step 5: The CLIP transfer model determines the type of the cropped image: The cropped detection image is input into the image encoder of the CLIP transfer model to obtain the image embedding vector. At the same time, the fuse type text label is input into the text encoder of the transfer CLIP model to obtain the text embedding vector. The cosine similarity between the detection image embedding vector and the embedding vectors of each type text label is calculated, and the detection image is classified into the type text label with the highest cosine similarity. When the highest cosine similarity is greater than a certain threshold, if the type text label with the highest cosine similarity is consistent with the fuse type at the same position in the reference image, then it is installed correctly; otherwise, it is installed incorrectly and an error message is given. If the highest cosine similarity is less than a certain threshold, proceed to step 6; Step 6: Histogram similarity determination of the cropped image type: First, divide the cropped image into left and right halves, and simultaneously divide the image corresponding to the reference image into left and right halves; calculate the histogram similarity between the left half of the cropped image and the left half of the image corresponding to the reference image, and simultaneously calculate the histogram similarity between the right half of the cropped image and the right half of the image corresponding to the reference image; if the histogram similarity of the left half and the right half cannot both exceed a certain threshold, the type is inconsistent with the fuse type at the same position in the reference image, indicating incorrect installation and providing an error message; otherwise, proceed to step 7; Step 7, cosine similarity to determine the type of the cropped detection image: use ResNet18 and remove the last fully connected layer to obtain the feature vectors of the cropped detection image, the standard image at the corresponding position, and the standard image flipped 180 degrees. Calculate the cosine similarity of the feature vectors of the cropped detection image and the standard image at the corresponding position, and at the same time calculate the cosine similarity of the feature vectors of the cropped detection image and the standard image at the corresponding position flipped by 180 degrees. If the cosine similarity of the fuse to the feature vector of the standard image is greater than the cosine similarity of the fuse to the feature vector of the standard image flipped 180 degrees, then the fuse type at the same position as the reference image is consistent, and the fuse is installed correctly. If the cosine similarity of the fuse to the feature vector of the standard image is less than the cosine similarity of the fuse to the feature vector of the standard image flipped 180 degrees, then the fuse type at the same position as the reference image is inconsistent, the fuse is installed incorrectly, and an error message is given.
2. The method for fusing Clip image processing with traditional image processing for automotive fuse box assembly inspection according to claim 1, characterized in that: In step 1, the specific steps for data acquisition are as follows: Step 1.1: First, acquire images of the fuse box, and then crop images of various types of fuses from the fuse box images. Let there be m types of fuses, and n images of each type of fuse. Step 1.2: Normalize the image scale and divide the image dataset into a training set and a test set.
3. The method for fusing Clip image processing with traditional image processing for automotive fuse box assembly inspection according to claim 1, characterized in that: In step 2, the specific steps of CLIP model transfer training are as follows: Step 2.1: Load the pre-trained CLIP model using the ViT-B / 32 model architecture, adopt the contrastive loss function, select the optimizer Adam and set the learning rate to 1e-6; Step 2.2: On the cropped fuse image dataset, input the images and corresponding fuse label text into the CLIP model, calculate the similarity between the image and text features output by the model, and optimize the model parameters by using the contrastive loss function until the model converges on the training set, thus determining the corresponding network model.
4. The method for fusing Clip image processing with traditional image processing for automotive fuse box assembly inspection according to claim 1, characterized in that: In step 3, the specific steps for formulating the detection rules are as follows: Step 3.1: Place the correctly installed fuse box into the system and take a picture; use this picture as a reference image. Step 3.2: Manually label the location and type of all fuses in the reference image.
Citation Information
Patent Citations
Vehicle-mounted-fuse-box relay-installing error-proof recognition device special for production line
CN107132476A
In-stream advertisement matching method implementing search for advertisement space in middle of stream of the digital contents
KR102784742B1