CN115272229A - Abnormal visual image detection method and device under category imbalance condition - Google Patents

Abnormal visual image detection method and device under category imbalance condition Download PDF

Info

Publication number
CN115272229A
CN115272229A CN202210888277.7A CN202210888277A CN115272229A CN 115272229 A CN115272229 A CN 115272229A CN 202210888277 A CN202210888277 A CN 202210888277A CN 115272229 A CN115272229 A CN 115272229A
Authority
CN
China
Prior art keywords
image
visual image
visual
abnormal
gray level
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210888277.7A
Other languages
Chinese (zh)
Inventor
王鹏
邱科鹏
田洛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tsinghua University
Original Assignee
Tsinghua University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tsinghua University filed Critical Tsinghua University
Priority to CN202210888277.7A priority Critical patent/CN115272229A/en
Publication of CN115272229A publication Critical patent/CN115272229A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)

Abstract

The invention provides a method and a device for detecting abnormal visual images under the condition of class imbalance, and belongs to the technical field of machine vision. Wherein the method comprises the following steps: extracting low-dimensional features from the visual image dataset; establishing a surface defect detection model based on support vector data description by using the low-dimensional features; and carrying out abnormal visual image detection on the visual image to be detected according to the surface defect detection model. The method can realize rapid and accurate abnormal visual image data identification, and provides effective visual images for subsequent appearance detection of industrial parts.

Description

Abnormal visual image detection method and device under category imbalance condition
Technical Field
The invention belongs to the technical field of machine vision, and particularly relates to a method and a device for detecting abnormal visual images under the condition of category imbalance.
Background
The performance of conventional machine vision-based topography detection depends on the quality of the created visual image library. However, in an actual industrial process, due to the influence of conditions such as the quality of the vision sensor and the field measurement environment, the acquired visual images may be abnormal, and therefore, it is necessary to detect the abnormal visual images. Then, in an actual situation, the proportion of the abnormal visual image is low, and the situation of unbalanced sample classes exists, so that the performance of the traditional abnormal visual image detection model based on the multi-classification algorithm is poor.
Disclosure of Invention
The invention aims to solve the defects of the prior art and provides a method and a device for detecting abnormal visual images under the condition of class imbalance. The method can realize rapid and accurate abnormal visual image data identification, and provides effective visual images for subsequent appearance detection of industrial parts.
An embodiment of a first aspect of the present invention provides a method for detecting an abnormal visual image under a category imbalance condition, including:
extracting low-dimensional features from the visual image dataset;
establishing a surface defect detection model based on support vector data description by using the low-dimensional features;
and carrying out abnormal visual image detection on the visual image to be detected according to the surface defect detection model.
In a specific embodiment of the present invention, the extracting low dimensional features from the visual image data set employs principal component analysis.
In a specific embodiment of the present invention, before the extracting the low-dimensional features from the visual image data set, the method further includes:
and carrying out graying processing on each image of the visual image data set to generate a corresponding grayscale image set.
In a specific embodiment of the present invention, the extracting low-dimensional features from the visual image data set includes:
1) Expanding each gray image of the gray image set into a row vector according to the X-axis direction, and then combining all the row vectors into a gray image matrix;
wherein, the grayscale image set is S = { S = { S = }1,S2,…,SN},SiThe number is the ith gray level image in the gray level image set, and N is the total number of images in the visual image data set; the gray level image matrix is marked as V, the size of V is Nxd, d is the characteristic dimension of the gray level image set, d = mxn, and m and N are the number of pixel points of each image in the visual image data set along the X-axis direction and the Y-axis direction respectively;
2) Centralizing the gray level image matrix V to obtain a corresponding centralized image matrix
Figure BDA00037664884700000210
3) Computing a centralized image matrix
Figure BDA00037664884700000211
Of the covariance matrix
Figure BDA0003766488470000021
4) For covariance matrix
Figure BDA0003766488470000022
Performing eigenvalue decomposition, and constructing a projection matrix W = { W } by taking eigenvectors corresponding to the maximum k eigenvalues1,w2,…,wkWhere k is the number of characteristic values set, ωiIs the ith eigenvector, k < d;
5) Calculating the projection result of the gray level image set S in the feature subspace to obtain a gray level image feature set
Figure BDA0003766488470000023
I.e. low dimensional features of the visual image dataset.
In an embodiment of the present invention, the establishing, by using the low-dimensional feature, a surface defect detection model based on support vector data description includes:
constructing a hypersphere optimization problem shown as the following formula for the gray level image feature set H:
Figure BDA0003766488470000024
Figure BDA0003766488470000025
in the formula, xiiIs the relaxation factor of the ith sample in the corresponding gray level image feature set, tau is the penalty coefficient, R and o are the radius and the center of the hyper-sphere, phi (-) is the kernel function, hiIs the ith sample of the gray level image feature set H;
and (3) solving the formula (1) to obtain the optimal solution of R and o.
In an embodiment of the present invention, the performing, according to the surface defect detection model, abnormal visual image detection on a visual image to be detected includes:
1) Acquiring a visual image to be detected, wherein the size of the visual image is the same as the size of the image in the visual image data set;
2) Converting the visual image obtained in the step 1) into a gray image and recording the gray image
Figure BDA0003766488470000026
3) To gray scale image
Figure BDA0003766488470000027
Spread as a row vector in the X-axis direction
Figure BDA0003766488470000028
4) For the gray level image line vector obtained in the step 3)
Figure BDA0003766488470000029
Performing feature extraction based on principal component analysis to obtain corresponding features of
Figure BDA0003766488470000031
5) Carrying out anomaly detection on the characteristics obtained in the step 4), wherein the expression is as follows:
Figure BDA0003766488470000032
in the formula (I), the compound is shown in the specification,
Figure BDA0003766488470000033
the abnormal detection result is the visual image; if it is
Figure BDA0003766488470000034
If the value of (1) is less than or equal to (1), the visual image is a normal visual image; if it is
Figure BDA0003766488470000035
If the value of (d) is-1, the visual image is an abnormal visual image.
In a second aspect of the present invention, an abnormal visual image detection apparatus under a category imbalance condition is provided, including:
the characteristic extraction module is used for extracting low-dimensional characteristics from the visual image data set;
the surface defect detection model building module is used for building a surface defect detection model based on support vector data description by utilizing the low-dimensional features;
and the abnormal visual image detection module is used for detecting the abnormal visual image of the visual image to be detected according to the surface defect detection model.
In a specific embodiment of the present invention, the extracting low-dimensional features from the visual image data set employs principal component analysis.
An embodiment of a third aspect of the present invention provides an electronic device, including:
at least one processor; and a memory communicatively coupled to the at least one processor;
wherein the memory stores instructions executable by the at least one processor, the instructions being configured to perform a method of abnormal visual image detection in one of the above-mentioned category imbalance conditions.
A fourth aspect of the present invention provides a computer-readable storage medium, which stores computer instructions for causing a computer to execute the above-mentioned abnormal visual image detection method under a category imbalance condition.
The invention has the characteristics and beneficial effects that:
the method starts from eliminating the redundancy of image features, extracts the linear principal component space features of the visual image through Principal Component Analysis (PCA), can effectively mine the effective features of the visual image, and reduces the data dimension and the calculation complexity of the visual image. Then, by using the visual features based on PCA, an abnormal visual image detection model based on SVDD (support vector data description) is established. By constructing a hypersphere of the visual feature data and combining a Gaussian kernel function, the boundary description of the normal visual image feature data can be effectively established under the condition of unbalanced modeling data types.
The method can effectively mine the effective characteristics of the visual image, reduce the data dimension and the calculation complexity of the visual image, and realize quick and accurate abnormal visual image data identification under the condition of unbalanced category.
Drawings
Fig. 1 is an overall flowchart of an abnormal visual image detection method under a category imbalance condition according to an embodiment of the present invention.
Detailed Description
The invention provides a method and a device for detecting abnormal visual images under the condition of category imbalance, and the following detailed description is further provided in combination with the accompanying drawings and specific embodiments.
The embodiment of the first aspect of the invention provides a method for detecting an abnormal visual image under a category imbalance condition, which comprises the following steps:
extracting low-dimensional features from a visual image data set;
establishing a surface defect detection model based on support vector data description by using the low-dimensional features;
and carrying out abnormal visual image detection on the visual image to be detected according to the surface defect detection model.
In an embodiment of the present invention, the overall process of the method for detecting abnormal visual images under the condition of category imbalance is as shown in fig. 1, and the method is divided into a training stage and a testing stage, and includes the following steps:
1) A training stage;
1-1) acquiring a visual image dataset; the visual image dataset is recorded as
Figure BDA0003766488470000041
Wherein N is the total number of images in the visual image data set, the larger the value of N is, the better XiFor the ith image in the visual image data set,
Figure BDA0003766488470000042
the element types of the representation sets are integers, and m and n are the number of pixel points of each image in the X-axis direction and the Y-axis direction respectively.
It should be noted that, the present embodiment has no special requirement on the source of the image in the visual image data set, and may be an existing image set or an image collected by itself (for example, some parts with no surface defects and some surface defects are respectively obtained, and then images of the surfaces of the parts are captured, and these images may constitute the visual image data set). In a specific embodiment of the present invention, the visual image data set is an existing electronic commutator visual image data set kolektor sdd, where N =80, m =128, N =128.
1-2) carrying out gray processing on each image of the visual image data set obtained in the step 1-1) to generate a corresponding gray image set;
in this embodiment, the visual image data set X obtained in step 1-1) is subjected to graying processing, and a corresponding grayscale image set is obtained as S = { S =1,S2,…,SNIn which S isiFor gray scale image set corresponding to XiI =1,2, \ 8230;, N. In one embodiment of the present invention, the grayscale image set S has a very high feature dimension d = m × n =128 × 128=16384 in the visual feature space, and thus easily causes "dimensional disaster".
1-3) carrying out principal component analysis on the gray level image set obtained in the step 1-2) to obtain a gray level image feature set;
in this embodiment, from the viewpoint of removing redundancy of image features, a feature subspace of a visual image is analyzed, and a corresponding image feature is extracted from a grayscale image set S by Principal Component Analysis (PCA), which includes the following specific steps:
1-3-1) set of grayscale images S = { S = }1,S1,…,SNAnd (4) expanding each gray image into a line vector according to the X-axis direction, and then combining all the line vectors into a gray image matrix V (N multiplied by d). In the grayscale image matrix V, each row corresponds to a grayscale image in the grayscale image set.
1-3-2) carrying out centralization processing on the gray image matrix V to obtain a corresponding centralized image matrix
Figure BDA0003766488470000051
1-3-3) calculating a centralized image matrix
Figure BDA0003766488470000052
Covariance matrix of
Figure BDA0003766488470000053
1-3-4) pairs of covariance matrices
Figure BDA0003766488470000054
Decomposing eigenvalues, and constructing a projection matrix W = { W ] by taking eigenvectors corresponding to the largest k eigenvalues1,w2,…,wkK is the number of set characteristic values, 1 < k < d, wi(1. Ltoreq. I.ltoreq.k) is the ith feature vector; in a specific embodiment of the invention, k =16.
1-3-5) constructing a projection matrix according to the step 1-3-4), and calculating the projection result of the gray image set S in the characteristic subspace by using the centralized image matrix and the projection matrix
Figure BDA0003766488470000055
Wherein k < d.
Through the steps, the original grayscale image set S is subjected to feature extraction based on PCA, and a grayscale image feature set H (N × k) with lower feature dimensionality is obtained.
1-4) establishing a Support Vector Data Description (SVDD) -based surface defect detection model according to the gray image feature set obtained in the step 1-3) and solving to obtain the SVDD;
the number and class proportion of samples of the gray scale image feature set H (N × k) directly influence the accuracy of the surface defect detection model. Considering that it is difficult to obtain a large number of defect samples or even unable to obtain enough defect-free samples in an actual industrial process, the present invention designs a surface defect detection model based on Support Vector Data Description (SVDD), which is specifically as follows in this embodiment:
constructing a hypersphere optimization problem shown as the following formula for the gray level image feature set H:
Figure BDA0003766488470000056
in the formula, xiiIs the relaxation factor for the ith sample in the gray scale image feature set (obtained by solving the optimization problem), τ (0 < τ ≦ 1) is the penalty factor, and in one embodiment of the invention, τ =0.9.R and o are the radius and center of the hyper-sphere, phi (·) is the kernel function, hiIs the ith sample of the grayscale image feature set H.
The formula (1) is a quadratic optimization problem, and can be solved by a Lagrange multiplier method to obtain the optimal solution of R and o.
2) A testing stage;
2-1) obtaining a visual image to be detected, wherein the visual image and the training image have the same source and the same size;
in one embodiment of the present invention, the visual image to be detected is also from an electronic commutator visual image data set, the image size is 128 × 128;
2-2) converting the visual image obtained in the step 2-1) into a gray image and recording the gray image
Figure BDA0003766488470000061
2-3) grayscale to step 2-2)Image(s)
Figure BDA0003766488470000062
Spread as a line vector according to the X-axis direction
Figure BDA0003766488470000063
2-4) the gray level image line vector obtained in the step 2-3)
Figure BDA0003766488470000064
Performing feature extraction based on PCA to obtain corresponding features of
Figure BDA0003766488470000065
2-5) carrying out anomaly detection on the extracted features according to the result obtained in the step 2-4); the specific method comprises the following steps:
calculating the correspondence of the detected image
Figure BDA00037664884700000610
The value:
Figure BDA0003766488470000066
in the formula (I), the compound is shown in the specification,
Figure BDA0003766488470000067
for the abnormal detection result of the extracted features, when
Figure BDA0003766488470000068
When the value of (1) is 1, the visual image to be detected obtained in the step 2-1) is a normal visual image; when in use
Figure BDA0003766488470000069
If the value of (1) is-1, the visual image to be detected acquired in the step 2-1) is an abnormal visual image.
In order to achieve the above embodiments, a second aspect of the present invention provides an abnormal visual image detection apparatus under a category unbalanced condition, including:
the characteristic extraction module is used for extracting low-dimensional characteristics from the visual image data set;
the surface defect detection model building module is used for building a surface defect detection model based on support vector data description by utilizing the low-dimensional characteristics;
and the abnormal visual image detection module is used for detecting the abnormal visual image of the visual image to be detected according to the surface defect detection model.
It should be noted that the foregoing explanation of the embodiment of the method for detecting an abnormal visual image under a category-unbalanced condition is also applicable to the apparatus for detecting an abnormal visual image under a category-unbalanced condition of the embodiment, and is not repeated herein. According to the abnormal visual image detection device under the condition of unbalanced category, provided by the embodiment of the invention, low-dimensional features are extracted from a visual image data set; establishing a surface defect detection model based on support vector data description by using the low-dimensional features; and carrying out abnormal visual image detection on the visual image to be detected according to the surface defect detection model.
Therefore, the method can realize rapid and accurate abnormal visual image data identification and provide effective visual images for subsequent appearance detection of industrial parts
To achieve the above embodiments, a third aspect of the present invention provides an electronic device, including:
at least one processor; and a memory communicatively coupled to the at least one processor;
wherein the memory stores instructions executable by the at least one processor, the instructions being configured to perform a method of abnormal visual image detection in one of the above-mentioned category imbalance conditions.
To achieve the above embodiments, a fourth aspect of the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to execute the above abnormal visual image detection method under the category imbalance condition.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may be separate and not incorporated into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to perform the method for detecting an abnormal visual image under a category imbalance condition of the above embodiments.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
In the description herein, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or to implicitly indicate the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present application, "plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and the scope of the preferred embodiments of the present application includes other implementations in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present application.
The logic and/or steps represented in the flowcharts or otherwise described herein, such as an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present application may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a separate product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. While embodiments of the present application have been shown and described above, it will be understood that the above embodiments are exemplary and should not be construed as limiting the present application and that changes, modifications, substitutions and alterations in the above embodiments may be made by those of ordinary skill in the art within the scope of the present application.

Claims (10)

1. An abnormal visual image detection method under a category imbalance condition is characterized by comprising the following steps:
extracting low-dimensional features from the visual image dataset;
establishing a surface defect detection model based on support vector data description by using the low-dimensional features;
and carrying out abnormal visual image detection on the visual image to be detected according to the surface defect detection model.
2. The method of claim 1, wherein the extracting low dimensional features from the visual image dataset uses principal component analysis.
3. The method of claim 2, further comprising, prior to said extracting low dimensional features from the visual image dataset:
and carrying out graying processing on each image of the visual image data set to generate a corresponding grayscale image set.
4. The method of claim 3, wherein extracting low-dimensional features for a visual image dataset comprises:
1) Expanding each gray image of the gray image set into a row vector according to the X-axis direction, and then combining all the row vectors into a gray image matrix;
wherein, the grayscale image set is S = { S = { S = }1,S2,…,SN},SiThe number is the ith gray level image in the gray level image set, and N is the total number of images in the visual image data set; the gray level image matrix is marked as V, the size of V is Nxd, d is the characteristic dimension of the gray level image set, d = mxn, and m and N are the number of pixel points of each image in the visual image data set along the X-axis direction and the Y-axis direction respectively;
2) Centralizing the gray level image matrix V to obtain a corresponding centralized image matrix
Figure FDA0003766488460000011
3) Computing a centered image moment
Figure FDA0003766488460000012
Covariance matrix of
Figure FDA0003766488460000013
4) For covariance matrix
Figure FDA0003766488460000014
Decomposing eigenvalues, and constructing a projection matrix W = { W ] by taking eigenvectors corresponding to the largest k eigenvalues1,w2,…,wkWhere k is the number of characteristic values set, ωiIs the ith eigenvector, k < d;
5) Calculating the projection result of the gray level image set S in the feature subspace to obtain a gray level image feature set
Figure FDA0003766488460000015
I.e. low dimensional features of the visual image dataset.
5. The method of claim 4, wherein the using the low-dimensional features to build a support vector data description-based surface defect detection model comprises:
constructing a hypersphere optimization problem shown as the following formula for the gray level image feature set H:
Figure FDA0003766488460000021
Figure FDA0003766488460000022
in the formula, xiiIs the relaxation factor of the ith sample in the corresponding gray level image feature set, tau is the penalty factor, and R and o are the radius of the hyper-sphere respectivelyAnd the sphere center,. Phi. Cndot.iIs the ith sample of the grayscale image feature set H;
and (3) solving the formula (1) to obtain the optimal solution of R and o.
6. The method according to claim 5, wherein the performing abnormal visual image detection on the visual image to be detected according to the surface defect detection model comprises:
1) Acquiring a visual image to be detected, wherein the size of the visual image is the same as the size of the image in the visual image data set;
2) Converting the visual image obtained in the step 1) into a gray image and recording the gray image
Figure FDA0003766488460000023
3) To gray scale image
Figure FDA0003766488460000024
Spread as a row vector in the X-axis direction
Figure FDA0003766488460000025
4) For the gray level image line vector obtained in the step 3)
Figure FDA0003766488460000026
Performing feature extraction based on principal component analysis to obtain corresponding features of
Figure FDA0003766488460000027
5) Carrying out anomaly detection on the characteristics obtained in the step 4), wherein the expression is as follows:
Figure FDA0003766488460000028
in the formula (I), the compound is shown in the specification,
Figure FDA0003766488460000029
the abnormal detection result is the visual image; if it is
Figure FDA00037664884600000210
If the value of (1) is less than or equal to (1), the visual image is a normal visual image; if it is
Figure FDA00037664884600000211
If the value of (d) is-1, the visual image is an abnormal visual image.
7. An abnormal visual image detection apparatus under a category imbalance condition, comprising:
the characteristic extraction module is used for extracting low-dimensional characteristics from the visual image data set;
the surface defect detection model building module is used for building a surface defect detection model based on support vector data description by utilizing the low-dimensional characteristics;
and the abnormal visual image detection module is used for detecting the abnormal visual image of the visual image to be detected according to the surface defect detection model.
8. The apparatus of claim 7, wherein the extracting low dimensional features from the visual image dataset uses principal component analysis.
9. An electronic device, comprising:
at least one processor; and a memory communicatively coupled to the at least one processor;
wherein the memory stores instructions executable by the at least one processor, the instructions being arranged to perform the method of any of the preceding claims 1-6.
10. A computer-readable storage medium storing computer instructions for causing a computer to perform the method of any one of claims 1-6.
CN202210888277.7A 2022-07-27 2022-07-27 Abnormal visual image detection method and device under category imbalance condition Pending CN115272229A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210888277.7A CN115272229A (en) 2022-07-27 2022-07-27 Abnormal visual image detection method and device under category imbalance condition

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210888277.7A CN115272229A (en) 2022-07-27 2022-07-27 Abnormal visual image detection method and device under category imbalance condition

Publications (1)

Publication Number Publication Date
CN115272229A true CN115272229A (en) 2022-11-01

Family

ID=83768826

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210888277.7A Pending CN115272229A (en) 2022-07-27 2022-07-27 Abnormal visual image detection method and device under category imbalance condition

Country Status (1)

Country Link
CN (1) CN115272229A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117934464A (en) * 2024-03-21 2024-04-26 温州风涌智能科技有限公司 Defect identification method based on machine vision

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117934464A (en) * 2024-03-21 2024-04-26 温州风涌智能科技有限公司 Defect identification method based on machine vision

Similar Documents

Publication Publication Date Title
US11645744B2 (en) Inspection device and inspection method
US11816579B2 (en) Method and apparatus for detecting defect pattern on wafer based on unsupervised learning
CN108665443B (en) Infrared image sensitive area extraction method and device for mechanical equipment fault
CN114092387B (en) Generating training data usable for inspection of semiconductor samples
US20120027288A1 (en) Methods, Systems and Apparatus for Defect Detection
CN113091872B (en) Method and device for diagnosing fault sensor
Guo et al. Defect Detection in Tire X‐Ray Images Using Weighted Texture Dissimilarity
CN111566493B (en) Method and system for circuit breaker condition monitoring
JP2006098152A (en) Apparatus and method for detecting defect
CN114155397A (en) Small sample image classification method and system
CN115272229A (en) Abnormal visual image detection method and device under category imbalance condition
CN117030129A (en) Paper cup on-line leakage detection method and system thereof
CN114972339A (en) Data enhancement system for bulldozer structural member production abnormity detection
CN117191816A (en) Method and device for detecting surface defects of electronic component based on multispectral fusion
CN113139963A (en) Defect detection method and device
CN112884721A (en) Anomaly detection method and system and computer readable storage medium
CN117437521A (en) Pruning method and device of image processing model and electronic equipment
Ren et al. A comprehensive study of sparse codes on abnormality detection
CN115775601A (en) Abnormal data monitoring method and system for material force-heat test
CN112861874B (en) Expert field denoising method and system based on multi-filter denoising result
US20030185431A1 (en) Method and system for golden template image extraction
CN110647826B (en) Method and device for acquiring commodity training picture, computer equipment and storage medium
EP3789930A1 (en) Method and system for data validation
CN114692887A (en) Semi-supervised learning system and semi-supervised learning method
Al-Smadi et al. ARMA model order determination using edge detection: A new perspective

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination