A classification method, device, and equipment applied to industrial inspection

By mapping image features into an angle space and adjusting boundaries based on similarity, the method improves the classification accuracy and robustness of deep learning models for industrial detection, addressing the issue of similar features in deep learning models.

CN115424074BActive Publication Date: 2025-07-15BEIJING LUSTER LIGHTTECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211087516.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-07
Publication Date
2025-07-15
Estimated Expiration
2042-09-07

AI Technical Summary

Technical Problem

When detecting parts, the high similarity of image features in deep learning models leads to poor classification detection capabilities, and the existing technology is difficult to effectively improve the classification detection accuracy of the model.

Method used

By mapping the feature vectors of image data to the linear feature space and converting it into an angle space, the classification model is trained, and the first boundary is added when the similarity is less than the preset threshold to reduce the class spacing, and the second boundary is added when the similarity is greater than the threshold to strengthen the coefficient. Gradually build the classification decision space, and use ArcLoss and CurricularLoss decision space to improve detection capabilities.

Benefits of technology

It improves the classification accuracy and robustness of parts in industrial inspection, and can more accurately distinguish qualified products from unqualified products.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115424074B_ABST
    Figure CN115424074B_ABST
Patent Text Reader

Abstract

This application relates to the field of industrial detection technology. Specifically, it relates to a classification method, device, and equipment for industrial detection, which can, to a certain extent, solve the problem of poor model classification and detection ability caused by the parts to be detected with relatively high similarity of the extracted image features. The classification method includes the following steps: inputting image data into a classification model and extracting the feature vector of the image data; mapping the multi-dimensional feature space of the feature vector to a linear feature space through the classification model, and the linear feature space is used to transform and form an angle space; based on the angle space, training the classification model to obtain a classification decision space, and the classification decision space is used to classify images of unknown categories and obtain the predicted classification results of the output.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of industrial inspection. Specifically, it relates to a classification method, device, and equipment for industrial inspection. Background Art

[0002] In recent years, the field of deep learning has continued to develop, and deep learning models have also begun to be applied in the field of industrial inspection. Industrial inspection images use classification models to detect parts, thereby classifying products into qualified and unqualified categories. Due to the diverse defect categories and forms in products, it is difficult for traditional algorithms to extract effective features, resulting in poor detection effects. Therefore, deep learning models have gradually been applied to the industrial field.

[0003] In the implementation of some deep learning model detection of parts, the deep learning model automatically learns the image features obtained by extracting the parts to be detected, and classifies the parts to be detected with unknown categories through the deep learning model.

[0004] However, when the similarity of the image features extracted from the parts to be detected is relatively high, it will lead to the problem of classification errors in the detection of parts by the deep learning model, and the classification and detection ability of the model is poor. Summary of the Invention

[0005] To solve the problem of poor classification and detection ability of the model caused by the relatively high similarity of the image features extracted from the parts to be detected, this application provides a classification method, device, and equipment for industrial inspection.

[0006] The embodiments of this application are implemented as follows:

[0007] The first aspect of the embodiments of this application provides a classification method for industrial inspection, including the following steps:

[0008] Input image data into a classification model and extract the feature vector of the image data;

[0009] Map the multi-dimensional feature space of the feature vector to a linear feature space through the classification model, and the linear feature space is used to transform and form an angular space;

[0010] Based on the angular space, train the classification model and obtain a classification decision space, which is used to classify images with unknown categories and obtain the classification result of the predicted output;

[0011] Among them, in the process of training the classification model, when the similarity of the image data is less than a preset threshold, add a first boundary in the angular space, and the first boundary is used to make the class-to-class spacing in the angular space smaller and the inter-class spacing larger;

[0012] When the similarity of the image data is greater than a preset threshold, a second boundary is added in the angular space, and the second boundary is obtained by calculating the first boundary and a reinforcement coefficient, where the reinforcement coefficient increases as the similarity of the image data increases, and the second boundary is the boundary of the classification decision space.

[0013] In some embodiments, training the classification model includes:

[0014] Initialize the weight matrix and set the angular space reinforcement interval;

[0015] Input image data with a small similarity and construct the first boundary;

[0016] Based on the first boundary, judge the similarity of the input image data. When the similarity of the input image data is large, obtain the second boundary through the reinforcement coefficient;

[0017] Among them, the reinforcement coefficient increases as the similarity of the image data increases.

[0018] In some embodiments, in the step of inputting image data into the classification model and extracting the feature vector of the image data:

[0019] The feature vector is specifically a one-dimensional vector extracted by the classification model and the known category vector of the input image data, and the category vector is a one-dimensional vector with the size of the number of classification categories.

[0020] In some embodiments, the construction process of the first boundary includes:

[0021] Obtain the angle between the one-dimensional vector extracted from the image data and the parameters of each category in the decision space by taking the dot product of the weight matrix and the one-dimensional vector extracted from the image data;

[0022] Obtain the cosine vector, and the cosine vector is the cosine of the sum of the angle in the angular space of the current image data category and the reinforcement angular space interval.

[0023] In some embodiments, the construction process of the second boundary includes:

[0024] Judge the similarity of the input image data;

[0025] When the similarity of the image data is large, obtain the second boundary and output the cosine vector of the image data with a large similarity to the classification model.

[0026] In some embodiments, in the step of judging the similarity of the input image data, the method includes:

[0027] Based on the first boundary, calculate the angular space of the current image category;

[0028] Compare with the angle vectors representing other categories through the angle space;

[0029] Among them, if it is smaller than the angle space of the current image category, it indicates a large similarity of the image data.

[0030] In some embodiments, in the process of obtaining the classification result of the prediction output, the method includes:

[0031] Input the image data of the unknown category to be predicted, and extract the feature vector of the image data of the unknown category through the classification model;

[0032] Input the feature vector into the classification model and output the cosine value of the angle to each category decision space; among them, the larger the cosine value of the angle, the more similar it is to the category;

[0033] The category decision space with a large cosine value of the angle of the image data feature vector represents the predicted output category of the image data.

[0034] In some embodiments, using the following formula, obtain the first boundary according to the angles of different categories of the image data and the spacing of the angle space:

[0035] cos(θ1 + m) - cos(θ2) = 0,

[0036] Or cos(θ1 × m) - cos(θ2) = 0,

[0037] Among them, θ1 and θ2 respectively represent the angles of image data category 1 and image data category 2, and m is the spacing of the increased angle space.

[0038] The second aspect of the embodiments of the present application provides a classification device applied to industrial inspection, including:

[0039] An acquisition unit, configured to acquire the image data of the input image and extract the feature vector of the image data;

[0040] A conversion unit, configured to map the multi-dimensional feature space of the feature vector to a linear feature space through the classification model, and the linear feature space is used to form an angle space through conversion;

[0041] A processing unit, configured to train the classification model based on the angle space and obtain a classification decision space, and the decision space is used to classify the image of the unknown category and obtain the classification result of the prediction output;

[0042] Among them, in the process of training the classification model, when the similarity of the image data is less than a preset threshold, a first boundary is added to the angle space, and the first boundary is used to make the class-class spacing of the angle space smaller and the inter-class spacing larger;

[0043] When the similarity of the image data is greater than a preset threshold, a second boundary is added in the angular space, and the second boundary is obtained by calculating the first boundary and the enhancement coefficient; wherein, the enhancement coefficient increases as the similarity of the image data increases, and the second boundary is the boundary of the classification decision space.

[0044] A third aspect of the embodiments of the present application provides a classification device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the steps of the classification method applied to industrial inspection in the above technical solution.

[0045] The beneficial effects of the present application; by gradually constructing the classification decision space from weak to strong during the training and learning process of the classification model, the classification boundary for detecting industrial products and parts with higher enhanced similarity can be determined; further, by transforming the multi-dimensional feature space into an angular space, it is convenient to detect industrial products and parts, and the qualified and unqualified products in industrial products and parts can be detected in a targeted manner, and further the effect of improving the detection accuracy and robustness can be achieved. Description of the Drawings

[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0047] Figure 1 It is a flowchart of the classification method applied to industrial inspection for one or more embodiments of the present application;

[0048] Figure 2 It is a flowchart of training the classification model in the classification method for one or more embodiments of the present application;

[0049] Figure 3 It is a flowchart of constructing the first boundary in the training of the classification model in the classification method for one or more embodiments of the present application;

[0050] Figure 4 It is a flowchart of constructing the second boundary in the training of the classification model in the classification method for one or more embodiments of the present application;

[0051] Figure 5 It is a flowchart of judging the similarity of image data in the training of the classification model in the classification method for one or more embodiments of the present application;

[0052] Figure 6 Flow chart of the classification method for outputting the category of image data of unknown category in one or more embodiments of the present application;

[0053] Figure 7 Schematic diagram of the first boundary and the second boundary obtained by the classification method in one or more embodiments of the present application. Detailed implementation manners

[0054] To make the objectives, implementation manners, and advantages of the present application clearer, the following will clearly and completely describe the exemplary implementation manners of the present application with reference to the accompanying drawings in the exemplary embodiments of the present application. Obviously, the described exemplary embodiments are only a part rather than all of the embodiments of the present application.

[0055] It should be noted that the brief description of the terms in the present application is only for facilitating the understanding of the following described implementation manners, rather than intending to limit the implementation manners of the present application. Unless otherwise specified, these terms should be understood in their ordinary and general meanings.

[0056] The terms "first", "second", "third", etc. in the specification, claims, and the above-mentioned drawings of the present application are used to distinguish similar or homogeneous objects or entities, and do not necessarily mean to limit a specific order or sequence, unless otherwise noted. It should be understood that such used terms can be interchanged under appropriate circumstances.

[0057] The terms "comprising" and "having" and any variations thereof are intended to cover but not exclude inclusion. For example, a product or device comprising a series of components does not necessarily have to be limited to all the clearly listed components, but may include other components that are not clearly listed or are inherent to these products or devices.

[0058] The classification model for industrial inspection generally includes four parts: input image, backbone model, classifier, and output prediction probability. The backbone model is used to extract image features, and the classifier is used to map the multi-dimensional feature space to the linear feature space, and after exponential normalization, it represents the probability of belonging to a certain class.

[0059] As Figure 1 shown Figure 1 Flow chart of the classification method for industrial inspection in one or more embodiments of the present application.

[0060] In some embodiments, a classification method for industrial inspection provided by the present application is used to enhance the separability between qualified product images and unqualified product images. At the same time, for samples that are difficult to detect, with the continuous learning during the training process, it enhances the detection of difficult samples and improves the classification and detection ability of the model. The classification method specifically includes the following steps:

[0061] The image data is input into the classification model, and the feature vector of the image data is extracted;

[0062] The multi-dimensional feature space of the feature vector is mapped to a linear feature space through the classification model, and the linear feature space is used to transform and form an angular space;

[0063] Based on the angular space, the classification model is trained to obtain a classification decision space, and the decision space is used to classify images of unknown classes and obtain the predicted classification results;

[0064] Among them, during the process of training the classification model, when the similarity of the image data is less than the preset threshold, a first boundary is added to the angular space, and the first boundary is used to make the inter-class distance in the angular space smaller and the distance between classes larger;

[0065] When the similarity of the image data is greater than the preset threshold, a second boundary is added to the angular space, and the second boundary is obtained by calculating the first boundary and the reinforcement coefficient, where the reinforcement coefficient increases as the similarity of the image data increases, and the second boundary is the boundary of the classification decision space.

[0066] By gradually constructing the classification decision space from weak to strong during the training and learning process of the classification model, the classification boundaries for detecting industrial products and components with higher similarity are strengthened; in the application of the industrial inspection industry, it is possible to determine the qualified and unqualified industrial products and components that can be further detected specifically, and further achieve the effect of improving the detection accuracy and robustness.

[0067] As Figure 2 shown, Figure 2 is a flowchart for training the classification model in the classification method of one or more embodiments of the present application.

[0068] In some embodiments, the process of training the classification model specifically includes:

[0069] Construct a weight matrix W, and the weight matrix W is set to be n rows and d columns, where n represents the number of categories to be classified; d is the feature size obtained by extracting the image data through the classification model; each row represents the parameters of the current category in the classification decision space, and the angular space reinforcement distance is set;

[0070] Input image data with a relatively small similarity, construct the classification decision space of ArcLoss, and obtain the first boundary;

[0071] Based on the classification decision space of ArcLoss, construct the classification decision space of CurricularLoss;

[0072] Among them, in the process of constructing the classification decision space of CurricularLoss, the similarity of the input image data is judged. When the similarity of the input image data is large, a second boundary is obtained through a strengthening coefficient, and the strengthening coefficient increases as the similarity of the image data increases.

[0073] By constructing the classification decision space of CurricularLoss on the basis of the classification decision space of ArcLoss, the classification decision space of CurricularLoss is used for parts with high similarity and prone to errors in the detection process; in the training process of the classification model, the image data with smaller similarity is gradually transformed into the image data with larger similarity in sequence; so that the training process of the entire classification model is more stable and effective, and at the same time, the effect of improving the correct classification and detection ability of the image data with larger similarity can be achieved.

[0074] In some embodiments, in the process of inputting image data into the classification model and extracting the feature vector of the image data, the feature vector obtained by the image data through the classification model specifically includes:

[0075] The feature x extracted by the classification model, a one-dimensional vector of size d;

[0076] The known category vector s of the input image data, the category vector s is a one-dimensional vector of size n, where n represents the number of classification categories. In this embodiment, n represents two categories of qualified and unqualified; the current marked category is represented by setting the value of the current category index bit to 1 and the values of the index bits of other categories to 0.

[0077] As Figure 3 shown, Figure 3 It is a flowchart of constructing the first boundary in the training of the classification model for the classification method of one or more embodiments of the present application.

[0078] In some embodiments, the specific steps of constructing the classification decision space of ArcLoss through the first boundary include:

[0079] Through the dot product of the weight matrix W and the feature x of the image data extracted by the classification model, the angle t between the feature x of the image data and the parameters of each category in the decision space is obtained; where the rows of the weight matrix W are set as the parameters of each category in the classification decision space, and at the same time, the angle t is a one-dimensional vector of size n.

[0080] Obtain the cosine vector m_t, and the cosine vector m_t is the cosine of the sum of the angle t in the angle space of the current image data category and the spacing m in the strengthening angle space.

[0081] As Figure 4 shown, Figure 4Flowchart of constructing the second boundary in training a classification model for the classification method of one or more embodiments of the present application.

[0082] In some embodiments, the specific content of constructing the classification decision space of CurricularLoss through the second boundary includes:

[0083] Set a smoothing factor ν. The smoothing factor is dynamically changing, initialized to 0, and gradually increases to 1 as the similarity of the input image data increases, to facilitate the gradual deepening of the classification model. The calculation process of the smoothing factor ν is as follows;

[0084]

[0085] where θ i represents the angle of the current image data in each category decision space, and n represents the number of categories to be classified.

[0086] Judge the similarity of the input image data, so as to gradually increase the smoothing factor to 0 as the similarity of the input image data increases;

[0087] When the similarity of the image data is large, obtain the second boundary and output the cosine vector m_t of the image data with large similarity to the classification model;

[0088] where the calculation principle of the second boundary for constructing the classification decision space of CurricularLoss is as follows:

[0089] cos(m + θ1) - (v + cos(θ2)) × cos(θ2) = 0,

[0090] where m represents the increased angular space spacing, θ1 and θ2 respectively represent the angles of image data category 1 and image data category 2, v is the smoothing factor, and ν + cos(θ2) represents the reinforcement coefficient. As the smoothing factor v increases, the reinforcement coefficient is greater than 1.

[0091] As Figure 5 shown, Figure 5 Flowchart of judging the similarity of image data in training a classification model for the classification method of one or more embodiments of the present application.

[0092] In some embodiments, the method for judging the similarity of image data includes:

[0093] Based on the classification decision space of ArcLoss constructed by the first boundary, calculate the angular space t of the current image category m ;

[0094] Through t m and the angular vector t representing other categories iMake a comparison;

[0095] Among them, the data smaller than the angle space t of the current image category m indicates that the similarity of the image data represented by this data is large.

[0096] As Figure 6 shown, a schematic diagram of the first boundary and the second boundary obtained by the classification method of one or more embodiments of the present application.

[0097] In some embodiments, the process of predicting the output result of image data of an unknown category by a classification model specifically includes:

[0098] Based on the classification decision space of CurricularLoss constructed by the second boundary, input the image data of the unknown category to be predicted, and extract the feature vector of the image data of the unknown category through the classification model;

[0099] The classification model inputs the feature vector of the image data into the angle spaces corresponding to different categories and outputs the cosine value of the angle to each category decision space; among them, when the cosine value of the angle representing this category is larger, it means that it is more similar to this category;

[0100] Output the category decision space with the largest cosine value of the angle of the feature vector, and this category decision space represents the predicted output category of the image data of the unknown category.

[0101] In some embodiments, the ArcLoss decision classification space obtained through the first boundary can be represented by the following formula:

[0102] cos(θ1 + m) - cos(θ2) = 0,

[0103] or cos(θ1 × m) - cos(θ2) = 0,

[0104] where θ1 and θ2 respectively represent the angles of image data category 1 and image data category 2, and m is the spacing of the increased angle space.

[0105] In some embodiments, the classification decision space of CurricularLoss constructed through the second boundary can be represented by the following formula:

[0106] cos(m + θ1) - (V × cos(θ2) + d) = 0,

[0107] where θ1 and θ2 respectively represent the angles of image data category 1 and image data category 2, m is the spacing of the increased angle space, and V and d represent any calculation form including the gradually increasing v.

[0108] Refer to Figure 7 , Figure 7Schematic diagram of the first boundary and the second boundary obtained by the classification method of one or more embodiments of the present application.

[0109] The classification decision space of ArcLoss is shown by line 1 in the figure and remains unchanged during the training process; the decision boundary of the classification decision space of CurricularLoss is shown by line 2 in the figure, with a small boundary in the early stage and a gradually increasing boundary in the later stage.

[0110] Deep learning is performed on the classification decision space of CurricularLoss based on the classification decision space of ArcLoss, and the classification boundaries of industrial products and components that are difficult to detect are gradually strengthened from easy to difficult, enabling more targeted detection and classification of industrial products and components, thereby achieving the effect of improving the accuracy and robustness of detecting and classifying qualified and unqualified products.

[0111] Based on the above classification method, the present application also discloses a classification device for industrial inspection, which includes:

[0112] An acquisition unit for obtaining the image data of the input image and obtaining the feature vector of the input image data based on the classification model;

[0113] A conversion unit for mapping the multi-dimensional feature space of the feature vector to a linear feature space through the classification model, and the linear feature space is used to form an angle space;

[0114] A processing unit, based on the angle space formed by the conversion unit, gradually trains the classification model from simple to complex and obtains a classification decision space, and the decision space is used to classify images of unknown categories and obtain the classification results of the predicted output;

[0115] Among them, during the process of training the classification model, when the similarity of the image data is less than the preset threshold, a first boundary is added on the basis of the angle space, and the first boundary is used to make the class-to-class spacing in the angle space smaller and the inter-class spacing larger;

[0116] When the similarity of the image data is greater than the preset threshold, a second boundary is added to the angle space, and the second boundary is obtained by calculating the first boundary and the reinforcement coefficient; among them, the reinforcement coefficient increases as the similarity of the image data increases, and the second boundary, that is, the boundary of the classification decision space, is obtained after training is completed.

[0117] Based on the above classification method, the present application also provides a classification device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by one processor, and when the instructions are executed by the at least one processor, the at least one processor is caused to execute the steps of the classification method applied to industrial inspection in the above technical solution, so as to classify industrial products or parts of unknown categories.

[0118] The beneficial effect of this part of the embodiments is that, in the process of training and learning the classification model, the classification decision space is gradually constructed from weak to strong, so as to determine the classification boundaries of industrial products and parts with higher enhanced similarity; further, in the application of the industrial inspection industry, it is possible to determine the qualified and unqualified products among industrial products and parts that can be detected and classified specifically, and further achieve the effect of improving the accuracy and robustness of detection.

[0119] For the sake of convenience of explanation, the above description has been made in combination with specific embodiments. However, the above discussion in some embodiments is not intended to be exhaustive or to limit the embodiments to the specific forms disclosed above. According to the above teachings, various modifications and variations can be obtained. The selection and description of the above embodiments are for better explaining the principles and practical applications, so that those skilled in the art can better use the embodiments and various different deformed embodiments suitable for specific use considerations.

Claims

1. A classification method applied to industrial inspection, characterized in that, The method includes: Inputting image data into a classification model and extracting a feature vector of the image data; Mapping the multi-dimensional feature space of the feature vector to a linear feature space through the classification model, where the linear feature space is used to transform and form an angular space; Based on the angular space, training the classification model and obtaining a classification decision space, where the classification decision space is used to classify images of unknown classes and obtain a predicted output classification result; Among them, during the process of training the classification model, when the similarity of the image data is less than a preset threshold, a first boundary is added to the angular space, and the first boundary is used to make the inter-class spacing in the angular space smaller and the inter-class spacing larger; When the similarity of the image data is greater than the preset threshold, a second boundary is added to the angular space, and the second boundary is obtained by calculating the first boundary and a reinforcement coefficient, where the reinforcement coefficient increases as the similarity of the image data increases, and the second boundary is the boundary of the classification decision space; Training the classification model includes: Initializing a weight matrix and setting an angular space reinforcement spacing; Inputting image data with a small similarity and constructing a first boundary; Based on the first boundary, judging the similarity of the input image data. When the similarity of the input image data is large, obtaining a second boundary through the reinforcement coefficient; Among them, the reinforcement coefficient increases as the similarity of the image data increases; The construction process of the first boundary includes: Obtaining the angle between the one-dimensional vector extracted from the image data and the parameters of each category in the decision space through the dot product of the weight matrix and the one-dimensional vector extracted from the image data; Obtaining a cosine vector, where the cosine vector is the cosine of the sum of the angle in the angular space of the current image data category and the angular space spacing of the reinforcement angular space.

2. The classification method applied to industrial inspection according to claim 1, wherein In the step of inputting image data into the classification model and extracting the feature vector of the image data: The feature vector is specifically a one-dimensional vector extracted by the classification model and a known category vector of the input image data, and the category vector is a one-dimensional vector with the size of the number of classification categories.

3. The classification method applied to industrial inspection according to claim 1, characterized in that, The construction process of the second boundary includes: Judging the similarity of the input image data; When the similarity of the image data is large, obtaining the second boundary and outputting the cosine vector of the image data with a large similarity to the classification model.

4. The classification method applied to industrial inspection according to claim 3, wherein, In the step of judging the similarity of the input image data, the method includes: Based on the first boundary, calculating the angular space of the current image category; Comparing the angular space with the angular vectors representing other categories; Among them, those smaller than the angular space of the current image category indicate that the similarity of the image data is large.

5. The classification method applied to industrial inspection as described in claim 1, wherein In the process of obtaining the predicted output classification result, the method includes: Inputting image data of an unknown class to be predicted, and extracting the feature vector of the image data of the unknown class through the classification model; Inputting the feature vector into the classification model and outputting the cosine value of the angle to each category decision space; among them, when the cosine value of the angle is larger, it means that it is more similar to that category; The category decision space with a large cosine value of the angle of the image data feature vector represents the predicted output category of the image data.

6. The classification method applied to industrial inspection according to claim 1, characterized in that, Using the following formula, obtain the first boundary according to the angles of different categories of the image data and the angular spatial spacing: cos(θ1 + m) - cos(θ2) = 0, or cos(θ1 × m) - cos(θ2) = 0, where θ1 and θ2 respectively represent the angles of image data category 1 and image data category 2, and m is the spacing of the increased angular space.

7. A classification device applied to industrial inspection, characterized in that, It includes: An acquisition unit, configured to obtain the image data of the input image and extract the feature vector of the image data; A conversion unit, configured to map the multi-dimensional feature space of the feature vector to a linear feature space through a classification model, and the linear feature space is used to be converted into an angular space; A processing unit, configured to train the classification model based on the angular space and obtain a classification decision space, and the decision space is used to classify the image of an unknown category and obtain the classification result of the predicted output; Wherein, during the process of training the classification model, when the similarity of the image data is less than a preset threshold, a first boundary is added in the angular space, and the first boundary is used to make the class-to-class spacing in the angular space smaller and the inter-class spacing larger; When the similarity of the image data is greater than the preset threshold, a second boundary is added in the angular space, and the second boundary is obtained by calculating the first boundary and a strengthening coefficient; wherein, the strengthening coefficient increases as the similarity of the image data increases, and the second boundary is the boundary of the classification decision space; Training the classification model includes: Initializing the weight matrix and setting the angular space strengthening spacing; Inputting the image data with a smaller similarity and constructing the first boundary; Based on the first boundary, judging the similarity of the input image data, and when the similarity of the input image data is larger, obtaining the second boundary through the strengthening coefficient; Wherein, the strengthening coefficient increases as the similarity of the image data increases; The construction process of the first boundary includes: Obtaining the angle between the one-dimensional vector extracted from the image data and the parameter of each category in the decision space through the dot product of the weight matrix and the one-dimensional vector extracted from the image data; Obtaining a cosine vector, where the cosine vector is the cosine of the sum of the angle in the angular space of the current image data category and the strengthening angular space spacing.

8. A classification device, characterized in that, The classification device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the one processor, and the instructions are executed by the at least one processor so that the at least one processor executes the steps of the classification method for industrial inspection according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Image classification method and device for industrial detection and computer equipment

    CN114972335A