Movatterモバイル変換


[0]ホーム

URL:


CN119151931A - Machine vision-based die cavity anomaly detection method - Google Patents

Machine vision-based die cavity anomaly detection method
Download PDF

Info

Publication number
CN119151931A
CN119151931ACN202411641853.3ACN202411641853ACN119151931ACN 119151931 ACN119151931 ACN 119151931ACN 202411641853 ACN202411641853 ACN 202411641853ACN 119151931 ACN119151931 ACN 119151931A
Authority
CN
China
Prior art keywords
gradient
sub
mold cavity
probability
region
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.)
Granted
Application number
CN202411641853.3A
Other languages
Chinese (zh)
Other versions
CN119151931B (en
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.)
Wuxi Mingteng Mould Technology Co ltd
Original Assignee
Wuxi Mingteng Mould Technology Co ltd
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 Wuxi Mingteng Mould Technology Co ltdfiledCriticalWuxi Mingteng Mould Technology Co ltd
Priority to CN202411641853.3ApriorityCriticalpatent/CN119151931B/en
Publication of CN119151931ApublicationCriticalpatent/CN119151931A/en
Application grantedgrantedCritical
Publication of CN119151931BpublicationCriticalpatent/CN119151931B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

Translated fromChinese

本发明涉及模具检测领域,更具体地,本发明涉及基于机器视觉的模腔异常检测方法。所述方法包括:获取预处理后的模腔表面灰度图,将模腔表面灰度图输入预设的神经网络中,输出概率值,根据概率值获得模腔类型;根据模腔类型构建目标灰度图,提取目标灰度图的ROI区域,根据概率值对ROI区域进行网格划分获得多个子区域,计算ROI区域的梯度一致性,完成模腔异常检测。通过本发明的技术方案,能够提高模腔异常检测的准确性,保障了产品生产质量。

The present invention relates to the field of mold detection, and more specifically, to a method for detecting mold cavity anomalies based on machine vision. The method comprises: obtaining a preprocessed grayscale image of the mold cavity surface, inputting the grayscale image of the mold cavity surface into a preset neural network, outputting a probability value, and obtaining the mold cavity type according to the probability value; constructing a target grayscale image according to the mold cavity type, extracting the ROI area of the target grayscale image, meshing the ROI area according to the probability value to obtain multiple sub-areas, calculating the gradient consistency of the ROI area, and completing mold cavity anomaly detection. Through the technical solution of the present invention, the accuracy of mold cavity anomaly detection can be improved, and the product production quality can be guaranteed.

Description

Machine vision-based die cavity anomaly detection method
Technical Field
The invention relates to the field of mold detection. More particularly, the present invention relates to a machine vision based method of cavity anomaly detection.
Background
In the manufacturing industry, especially in the industries of plastics, rubber, metal processing, etc., cavity filling is a critical link. The contamination of foreign matter may not only cause defects, structural damage on the surface of the product, but may also cause more serious safety problems, thereby affecting the safety and reliability of the product. Therefore, detection of mold cavity foreign matter becomes a critical step in ensuring product quality. Traditional detection methods mainly rely on manual visual inspection and some basic automation equipment, and are low in efficiency, limited in accuracy and poor in adaptability, and are difficult to meet the requirements of modern manufacturing industries on high efficiency and high accuracy.
In the aspect of abnormal detection of a die cavity, the application of a machine vision detection technology is increased, and the technology can detect the problems of foreign matters, part defects, part demolding failure, insert dislocation and the like in a die part and has the characteristics of high accuracy, high efficiency and capability of realizing real-time detection.
The prior Chinese patent application document with the publication number of CN108288274A discloses a die detection method, a device and electronic equipment, wherein the method comprises the steps of matching background images; the method comprises the steps of carrying out transformation processing, normalization processing and cutting processing on a to-be-detected die image and a matched background image based on a matching matrix of the to-be-detected die image and the matched background image respectively to obtain a first die image and a first background image, obtaining a first differential image of the first die image and the first background image, carrying out threshold segmentation and area screening of a communication area on the first differential image to obtain a first area image, judging whether pixel values of pixel points in the first area image are 0, and outputting information of the existence of foreign matters in the die.
However, due to the problem of the material of the mold and the uneven mold cavity, the reflection phenomenon can occur in the image processing process, and the situation that the reflection covers part of the abnormality can occur, so that the abnormal detection result of the mold cavity is inaccurate.
Disclosure of Invention
In order to solve the problem of inaccurate detection results of abnormal mold cavities, the invention provides a machine vision-based mold cavity abnormality detection method.
The invention discloses a machine vision-based die cavity anomaly detection method which comprises the steps of obtaining a preprocessed die cavity surface gray level diagram, inputting the die cavity surface gray level diagram into a preset neural network, outputting probability values, wherein the probability values comprise normal probability, residual probability, defect probability and reflection probability, obtaining a die cavity type according to the probability values, constructing a target gray level diagram according to the die cavity type, extracting a region of interest (ROI) of the target gray level diagram, conducting grid division on the region of interest (ROI) according to the probability values to obtain a plurality of subareas, calculating gradient consistency of the region of interest (ROI), and finishing die cavity anomaly detection, wherein the obtaining of the subareas comprises the steps of obtaining initial grid size of grid division, calculating updated grid size, wherein the grid size comprises length of grids and width of grids, and the updated grid size meets a relational expression:, representing the size of the grid after the update,The probability of reflection of light is indicated,And dividing the ROI area according to the updated grid size to obtain a plurality of subareas.
By preprocessing the cavity surface gray level map and outputting different probability values using the neural network, it is possible to accurately identify the cavity type and construct a target gray level map, which is an image having a large light reflection probability, that is, an image having a large possibility of containing an abnormality. The ROI area of the target gray level image is extracted, and the grid size is dynamically adjusted according to the reflection probability, so that the ROI area can be finely divided, and the consistency and the accuracy of detection can be improved.
Preferably, the neural network is a convolutional neural network, the convolutional neural network performs feature extraction on the gray level map of the surface of the die cavity to obtain image features, and classifies the image features to obtain probability values.
The training process of the neural network comprises the steps of taking a gray level diagram of the surface of a die cavity of a die in a history as input information and taking a true value of the type of the die cavity of the die as a label to obtain a group of training data, inputting the training data into the neural network to obtain an output result, calculating a loss value of the neural network through the output result and the label, using cross entropy loss by a loss function, reversely transmitting error signals according to the loss value, updating network parameters of the neural network to enable the loss value to be smaller, iteratively updating the network parameters of the neural network, and stopping updating when the neural network reaches a set maximum training frequency or the loss value is smaller than the set loss value to obtain the trained neural network.
Preferably, the method for acquiring the target gray level map comprises the steps of acquiring a corresponding mold cavity type when any one of probability values is greater than 0.5, wherein the mold cavity type is normal, mold cavity residues, mold cavity defects and mold cavity light reflection, and taking a mold cavity surface gray level map corresponding to a mold with the mold cavity light reflection and a mold cavity surface gray level map corresponding to a mold with the probability value not greater than 0.5 as the target gray level map.
The specific die cavity type can be obtained through the probability value output by the neural network, the die cavity reflecting the light of the die cavity can be found more quickly from the determined die cavity types, and the die cavity which cannot be determined through the probability value is taken as the target gray level graph, so that the die cavity which needs special attention or processing can be quickly identified, the production parameters can be timely adjusted or maintained, and the generation of defective products can be reduced.
Preferably, the obtaining of the target gray level map further comprises the steps of calculating Euclidean distances of normal probability and residual probability, euclidean distances of normal probability and defect probability, euclidean distances of normal probability and reflection probability respectively for any one of the cavity surface gray level maps, adding the three Euclidean distances and using a result of negative correlation mapping as a difficult classification degree, and using the cavity surface gray level map with the difficult classification degree being larger than a preset threshold value as the target gray level map.
By adding these distances to obtain the degree of difficulty classification, the degree of difference between the cavity image and the center point of each class can be quantified. The larger the calculation result of the Euclidean distance, which reflects the degree of deviation between the characteristic of the cavity image and each class of typical characteristic, the larger the characteristic difference between the characteristic of the cavity image and the normal state, which usually means that the cavity has some abnormality.
Preferably, the gradient consistency comprises the steps of carrying out weighted summation on the gradient directions according to the gradient value of each pixel point in each sub-region for any sub-region to obtain the total gradient direction of the sub-region, traversing to obtain the total gradient direction of each sub-region in the ROI region, constructing a gradient co-occurrence matrix of the ROI region, and taking the modulus of the gradient co-occurrence matrix as the gradient consistency.
Gradient uniformity effectively quantifies the uniformity of the mold cavity surface. The gradient consistency is realized by analyzing the gradient value of each pixel point in the subarea and carrying out weighted summation on the gradient direction, so that the fine change of the surface of the die cavity can be captured, and the sensitivity and the accuracy of detection are improved. In addition, the recognition capability of the abnormal surface of the model cavity is further enhanced by constructing the gradient co-occurrence matrix and calculating the model thereof as a measure of gradient consistency.
Preferably, the gradient consistency further comprises the steps of calculating the gradient direction of each pixel point in each sub-region for any sub-region, drawing a gradient histogram to obtain the main gradient direction and the sub-gradient direction of the sub-region, respectively constructing a main gradient symbiotic matrix and a sub-gradient symbiotic matrix of the ROI region, calculating a main gradient feature vector according to the main gradient symbiotic matrix, and calculating a sub-gradient feature vector according to the sub-gradient symbiotic matrix, wherein the gradient consistency satisfies the relation: wherein, the method comprises the steps of, wherein,The consistency of the gradient is indicated,Representing the principal gradient feature vector,Representing a transpose of the sub-gradient feature vector,A modulus representing the principal gradient feature vector,Representing the modulus of the sub-gradient feature vector.
The direction information of the local change of the image is utilized, which reflects the microstructure and potentially abnormal features of the cavity surface. The primary gradient direction generally corresponds to the direction of most significant change in the image, i.e. the primary texture direction in the sub-region of the mold cavity, while the secondary gradient direction provides additional information about the direction of change, i.e. the secondary important texture direction in the sub-region of the mold cavity.
Preferably, the gradient consistency further comprises the steps of calculating the gradient direction of each pixel point in each sub-region, drawing a gradient histogram to obtain the main gradient direction and the secondary gradient direction of the sub-region, respectively constructing a main gradient co-occurrence matrix and a secondary gradient co-occurrence matrix of the ROI region, calculating a main gradient feature vector according to the main gradient co-occurrence matrix, calculating a secondary gradient feature vector according to the secondary gradient co-occurrence matrix, and taking the similarity of the main gradient feature vector and the secondary gradient feature vector as the gradient consistency.
The invention has the beneficial effects that:
1. according to the method, the gray level map of the surface of the die cavity is preprocessed and is input into the convolutional neural network, the network can output probability values reflecting different states, the probability values comprehensively reflect the current state of the die cavity, and the method can automatically extract the characteristics from the image data and classify the characteristics, so that manual intervention is reduced, and the detection efficiency and accuracy are improved.
2. According to the invention, the accuracy and reliability of the abnormal detection of the die cavity are remarkably improved by comprehensively utilizing the gradient direction information, gradient consistency calculation and the grid size of the reflection probability adjustment. The method not only can identify the tiny change of the surface of the die cavity, but also can adapt to different detection conditions, such as the influence of reflection and shadow, thereby providing a powerful tool for the quality control of the die cavity.
3. According to the invention, through automatic feature extraction and quantitative anomaly detection, the accuracy and reliability of the detection of the cavity anomaly are obviously improved. The method can identify the tiny change of the surface of the die cavity, can adapt to different detection conditions, such as the influence of reflection and shadow, can avoid potential quality problems by timely finding the abnormality of the surface of the die cavity, improves the consistency and reliability of products, reduces the production cost and improves the production efficiency.
Drawings
The above, as well as additional purposes, features, and advantages of exemplary embodiments of the present invention will become readily apparent from the following detailed description when read in conjunction with the accompanying drawings. In the drawings, embodiments of the invention are illustrated by way of example and not by way of limitation, and like reference numerals refer to similar or corresponding parts and in which:
FIG. 1 is a flow chart of a machine vision based method for detecting anomalies in a mold cavity in accordance with an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be understood that when the terms "first," "second," and the like are used in the claims, the specification and the drawings of the present invention, they are used merely for distinguishing between different objects and not for describing a particular sequential order. The terms "comprises" and "comprising" when used in the specification and claims of the present invention are taken to specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
The invention provides a machine vision-based die cavity anomaly detection method. As shown in fig. 1, the machine vision-based mold cavity abnormality detection method includes steps S1 to S2, which are described in detail below.
S1, acquiring a preprocessed die cavity surface gray level map, inputting the die cavity surface gray level map into a preset neural network, outputting a probability value, and acquiring a die cavity type according to the probability value.
In one embodiment, an industrial camera is utilized to capture a cavity RGB (Red Green Blue) image of a mold, and the cavity RGB image is grayed to obtain a gray scale image that can simplify image data, reduce computational complexity, while retaining sufficient information for subsequent feature extraction and analysis.
The preprocessing includes, first, converting the RGB image into a gray scale by a graying process, which can reduce complexity and calculation amount of image processing. Then, histogram equalization techniques can be used to enhance the contrast of the image, highlighting details, and making the texture and structure of the cavity surface clearer. In addition, low-pass filtering methods such as mean filtering, median filtering and Gaussian filtering can be used for removing image noise, smoothing image edges and reducing high-frequency parts of image details so as to inhibit noise and bright spots.
Morphological operations such as erosion, dilation, open and close operations can further improve image quality, remove small noise or impulse noise, and enhance edge information of objects in the image. These operations help to more accurately identify and locate anomalies in the mold cavity surface in subsequent steps.
Inputting the gray level map of the surface of the die cavity into a preset neural network, wherein the neural network is a convolutional neural network, the convolutional neural network performs feature extraction on the gray level map of the surface of the die cavity to obtain image features, and classifies the image features to obtain probability values.
It should be noted that, the convolutional neural network is CNN (Convolutional Neural Networks), which includes an input layer, a convolutional layer, an active layer, a pooling layer, and a full-connection layer (or an output layer). The input layer is used for receiving the cavity surface gray level map, the convolution layer is a layer comprising a plurality of convolution operations, each convolution operation uses a different convolution kernel (or filter) to extract the feature map of the cavity surface gray level map, the activation layer usually follows the convolution layer, introduces nonlinearities so that the neural network can learn complex features, the pooling layer is used for reducing the space size of the feature map, reducing the calculation amount and extracting important features, and the full connection layer is used for mapping the extracted features to final output, namely probability values, after the convolution layer and the pooling layer.
The training process of the neural network comprises the steps of taking a gray level diagram of the surface of a die cavity of a die in a history as input information and taking a true value of the type of the die cavity of the die as a label to obtain a group of training data, inputting the training data into the neural network to obtain an output result, calculating a loss value of the neural network through the output result and the label, using cross entropy loss by a loss function, reversely transmitting error signals according to the loss value, updating network parameters of the neural network to enable the loss value to be smaller, iteratively updating the network parameters of the neural network, and stopping updating when the neural network reaches the set maximum training times or the loss value is smaller than the set loss value to obtain the trained neural network.
Illustratively, updating is stopped when the neural network training times reach 200 times or the loss value is less than 0.0001.
The output of the neural network is a probability value, and when any one of the probability values is larger than a probability threshold of the network, namely, a die cavity corresponding to the gray level map of the surface of the die cavity is the corresponding die cavity type. The mold cavity types are normal, mold cavity residual, mold cavity defect and mold cavity light reflection.
For example, the input normal probability, residual probability, defect probability and reflection probability are sequentially 0.3, 0.6, 0.05 and 0.05, the probability threshold of the network is generally set to be 0.5, and then the mold cavity corresponding to the gray level map of the mold cavity surface is the mold cavity residual.
S2, constructing a target gray scale map according to the type of the die cavity, extracting an ROI (region of interest) of the target gray scale map, dividing the ROI into a plurality of subregions according to the probability value, calculating the gradient consistency of the ROI, and finishing die cavity anomaly detection.
It should be noted that, in the mold manufacturing process, an image anomaly caused by reflection of light from the surface of the mold cavity is often encountered, and the reflection is usually only a pseudo anomaly caused by reflection of light, so that the product quality is not substantially affected. However, if other types of anomalies, such as residues and imperfections, are just hidden in the retroreflective regions, the original retroreflective regions are transformed into true anomaly regions, which require a high-precision detection system to distinguish and identify the true anomalies that are mixed in the retroreflection to ensure that the quality of the mold cavity product is not compromised.
In one embodiment, the type of the mold cavity obtained according to step S1 further includes a case where the probability value is not greater than the probability threshold of the network.
And taking the gray level map of the mold cavity surface corresponding to the mold with the mold cavity reflection and the gray level map of the mold cavity surface corresponding to the mold with the probability value not more than 0.5 as target gray level maps.
It should be noted that, when the probability value is not greater than 0.5, the probability value indicates that the residual probability and the defect probability are relatively close to the reflection probability, the gray level map of the mold cavity surface belongs to a difficult classification, and at this time, further analysis of the gray level map of the mold cavity surface is required.
Extracting the ROI area of the target gray map includes extracting directly using a rectangular frame if the position of the ROI in the image is known, extracting using a mask for irregular ROI areas, acquiring by contour detection for ROIs of complex shape, creating a mask using inRange functions by converting the image to HSV color space, and extracting ROI areas of a specific color.
Calculating updated grid dimensions including the length of the grid and the width of the grid, wherein the updated grid dimensions satisfy the relation:
, representing the size of the grid after the update,The probability of reflection of light is indicated,Representing the initial mesh size.
And dividing the ROI area according to the updated grid size to obtain a plurality of sub-areas.
The main object of study is a gray scale image of the cavity surface with high probability of reflection, and the higher the probability of reflection, the greater the possibility of containing other abnormalities, and the smaller the mesh size of the ROI region needs to be meshed.
And for any one sub-region, carrying out weighted summation on the gradient directions according to the gradient value of each pixel point in the sub-region to obtain the total gradient direction of the sub-region.
Traversing to obtain the total gradient direction of each sub-region in the ROI region, constructing a gradient co-occurrence matrix of the ROI region, and taking the modulus of the gradient co-occurrence matrix as gradient consistency.
It should be noted that, on the surface of the mold cavity, the foreign matters or defects tend to break the original gradient consistency, so that the gradient direction and the mold value of the local area are significantly changed. A high gradient uniformity means that the direction of gray scale variation is more uniform across the region, which generally indicates that the edges and texture features of the region are more sharp. In cavity inspection, sharp edges and textures help to more accurately identify foreign objects or defects. And gradient uniformity may also reflect the flatness of the cavity surface. If the gradient uniformity of a region is low, this may mean that the surface of the region is uneven or there is a roughness, which may be caused by manufacturing defects in the mold cavity itself or by wear during use.
And comparing the gradient consistency with a preset gradient threshold, and generating and sending an alarm to remind a worker to overhaul the die cavity of the die when the gradient consistency is smaller than the preset gradient threshold.
In one embodiment, the method further comprises the steps of calculating Euclidean distances of normal probability and residual probability, euclidean distances of normal probability and defect probability and Euclidean distances of normal probability and reflection probability respectively for any cavity surface gray level map, adding the three Euclidean distances and using a result of negative correlation mapping as a difficult classification degree, and using the cavity surface gray level map with the difficult classification degree larger than a preset threshold value as the target gray level map.
In one embodiment, the gradient consistency further comprises the steps of calculating the gradient direction of each pixel point in each sub-region for any sub-region, drawing a gradient histogram to obtain the main gradient direction and the secondary gradient direction of the sub-region, respectively constructing a main gradient co-occurrence matrix and a secondary gradient co-occurrence matrix of the ROI region, calculating a main gradient feature vector according to the main gradient co-occurrence matrix, and calculating a secondary gradient feature vector according to the secondary gradient co-occurrence matrix.
Calculating gradient consistency, and satisfying the relation:
wherein, the method comprises the steps of, wherein,The consistency of the gradient is indicated,Representing the principal gradient feature vector,Representing a transpose of the sub-gradient feature vector,A modulus representing the principal gradient feature vector,Representing the modulus of the sub-gradient feature vector.
In one embodiment, the gradient consistency further comprises the steps of calculating the gradient direction of each pixel point in each sub-region, drawing a gradient histogram to obtain the main gradient direction and the secondary gradient direction of the sub-region, respectively constructing a main gradient co-occurrence matrix and a secondary gradient co-occurrence matrix of the ROI region, calculating a main gradient feature vector according to the main gradient co-occurrence matrix, calculating a secondary gradient feature vector according to the secondary gradient co-occurrence matrix, and taking the similarity of the main gradient feature vector and the secondary gradient feature vector as the gradient consistency.
Preferably, the similarity may use cosine similarity.
While various embodiments of the present invention have been shown and described herein, it will be obvious to those skilled in the art that such embodiments are provided by way of example only. Many modifications, changes, and substitutions will now occur to those skilled in the art without departing from the spirit and scope of the invention. It should be understood that various alternatives to the embodiments of the invention described herein may be employed in practicing the invention.
The above embodiments are not intended to limit the scope of the invention, so that the equivalent changes of the structure, shape and principle of the invention are covered by the scope of the invention.

Claims (7)

Translated fromChinese
1.基于机器视觉的模腔异常检测方法,其特征在于,包括:1. A method for detecting mold cavity abnormalities based on machine vision, characterized by comprising:获取预处理后的模腔表面灰度图,将模腔表面灰度图输入预设的神经网络中,输出概率值,概率值包括正常概率、残留概率、缺陷概率和反光概率,根据概率值获得模腔类型;Obtain a preprocessed grayscale image of the mold cavity surface, input the grayscale image of the mold cavity surface into a preset neural network, output a probability value, the probability value includes a normal probability, a residual probability, a defect probability and a reflection probability, and obtain the mold cavity type according to the probability value;根据模腔类型构建目标灰度图,提取目标灰度图的ROI区域,根据概率值对ROI区域进行网格划分获得多个子区域,计算ROI区域的梯度一致性,完成模腔异常检测;Construct a target grayscale image according to the mold cavity type, extract the ROI area of the target grayscale image, divide the ROI area into multiple sub-areas according to the probability value, calculate the gradient consistency of the ROI area, and complete the mold cavity abnormality detection;其中,获得多个子区域包括:Among them, obtaining multiple sub-areas includes:获取网格划分的初始网格尺寸;Get the initial grid size for grid division;计算更新后的网格尺寸,网格尺寸包括网格的长和网格的宽,更新后的网格尺寸满足关系式:表示更新后的网格尺寸,表示反光概率,表示初始网格尺寸;Calculate the updated grid size, which includes the length and width of the grid. The updated grid size satisfies the relationship: , represents the updated grid size, represents the probability of reflection, represents the initial grid size;根据更新后的网格尺寸对ROI区域进行划分获得多个子区域;Divide the ROI area according to the updated grid size to obtain multiple sub-areas;所述目标灰度图包括:The target grayscale image comprises:模腔类型为模腔正常、模腔残留、模腔缺陷和模腔反光;The cavity types are normal cavity, residual cavity, defective cavity and reflective cavity;当概率值中任意一个大于0.5时,获得对应的模腔类型;When any of the probability values is greater than 0.5, the corresponding cavity type is obtained;将模腔反光的模具对应的模腔表面灰度图和概率值均不大于0.5的模具对应的模腔表面灰度图共同作为目标灰度图。The cavity surface grayscale image corresponding to the mold with cavity reflection and the cavity surface grayscale image corresponding to the mold with probability values not greater than 0.5 are taken as the target grayscale image.2.根据权利要求1所述的基于机器视觉的模腔异常检测方法,其特征在于,所述神经网络为卷积神经网络,卷积神经网络对模腔表面灰度图进行特征提取获得图像特征,对图像特征进行分类获得概率值。2. According to the machine vision-based mold cavity anomaly detection method according to claim 1, it is characterized in that the neural network is a convolutional neural network, the convolutional neural network performs feature extraction on the grayscale image of the mold cavity surface to obtain image features, and classifies the image features to obtain probability values.3.根据权利要求1所述的基于机器视觉的模腔异常检测方法,其特征在于,所述神经网络的训练过程包括:3. The method for detecting mold cavity anomalies based on machine vision according to claim 1, wherein the training process of the neural network comprises:将模具在历史中的模腔表面灰度图作为输入信息,并将模具的模腔类型的真实值作为标签,得到一组训练数据;The grayscale image of the mold cavity surface in the history is used as input information, and the true value of the mold cavity type is used as a label to obtain a set of training data;将训练数据输入神经网络,得到输出结果;Input the training data into the neural network and get the output result;通过输出结果和标签计算神经网络的损失值,损失函数使用交叉熵损失,根据损失值反向传播误差信号,更新神经网络的网络参数,使损失值变小;The loss value of the neural network is calculated by outputting the results and labels. The loss function uses cross entropy loss. The error signal is back-propagated according to the loss value, and the network parameters of the neural network are updated to reduce the loss value.迭代地更新神经网络的网络参数,当神经网络达到设定的最大训练次数或损失值小于设定损失值时,停止更新,得到训练好的神经网络。Iteratively update the network parameters of the neural network. When the neural network reaches the set maximum number of training times or the loss value is less than the set loss value, stop updating and obtain a trained neural network.4.根据权利要求1所述的基于机器视觉的模腔异常检测方法,其特征在于,获取所述目标灰度图还包括:4. The method for detecting mold cavity anomalies based on machine vision according to claim 1, wherein obtaining the target grayscale image further comprises:对于任一模腔表面灰度图,分别计算正常概率和残留概率的欧式距离、正常概率和缺陷概率的欧式距离、正常概率和反光概率的欧式距离,将三个欧式距离相加并通过负相关映射的结果作为难分类度;For any cavity surface grayscale image, the Euclidean distance between normal probability and residual probability, the Euclidean distance between normal probability and defect probability, and the Euclidean distance between normal probability and reflection probability are calculated respectively. The three Euclidean distances are added together and the result of negative correlation mapping is used as the degree of difficulty in classification.将难分类度大于预设阈值的模腔表面灰度图作为目标灰度图。The grayscale image of the cavity surface with a degree of difficulty in classification greater than a preset threshold is taken as the target grayscale image.5.根据权利要求1所述的基于机器视觉的模腔异常检测方法,其特征在于,所述梯度一致性包括:5. The method for detecting mold cavity anomalies based on machine vision according to claim 1, wherein the gradient consistency comprises:对于任意一个子区域,根据子区域中每个像素点的梯度值对梯度方向进行加权求和,获得子区域的总梯度方向;For any sub-region, the gradient direction is weighted summed according to the gradient value of each pixel in the sub-region to obtain the total gradient direction of the sub-region;遍历获得ROI区域中每个子区域的总梯度方向,构建ROI区域的梯度共生矩阵,将梯度共生矩阵的模作为梯度一致性。The total gradient direction of each sub-region in the ROI region is obtained by traversing, the gradient co-occurrence matrix of the ROI region is constructed, and the modulus of the gradient co-occurrence matrix is used as the gradient consistency.6.根据权利要求1所述的基于机器视觉的模腔异常检测方法,其特征在于,所述梯度一致性还包括:6. The method for detecting mold cavity anomalies based on machine vision according to claim 1, wherein the gradient consistency further comprises:对于任意一个子区域,计算子区域中每个像素点的梯度方向,绘制梯度直方图,以获得子区域的主梯度方向和次梯度方向;For any sub-region, calculate the gradient direction of each pixel in the sub-region and draw a gradient histogram to obtain the main gradient direction and secondary gradient direction of the sub-region;分别构建ROI区域的主梯度共生矩阵和次梯度共生矩阵;Construct the main gradient co-occurrence matrix and sub-gradient co-occurrence matrix of the ROI region respectively;根据主梯度共生矩阵计算主梯度特征向量,根据次梯度共生矩阵计算次梯度特征向量;The main gradient eigenvector is calculated according to the main gradient co-occurrence matrix, and the sub-gradient eigenvector is calculated according to the sub-gradient co-occurrence matrix;计算梯度一致性,满足关系式:,其中,表示梯度一致性,表示主梯度特征向量,表示次梯度特征向量的转置,表示主梯度特征向量的模,表示次梯度特征向量的模。Calculate the gradient consistency and satisfy the relationship: ,in, represents gradient consistency, represents the main gradient eigenvector, represents the transpose of the subgradient eigenvector, represents the magnitude of the main gradient eigenvector, Represents the magnitude of the subgradient eigenvector.7.根据权利要求1所述的基于机器视觉的模腔异常检测方法,其特征在于,所述梯度一致性还包括:7. The method for detecting mold cavity anomalies based on machine vision according to claim 1, wherein the gradient consistency further comprises:对于任意一个子区域,计算子区域中每个像素点的梯度方向,绘制梯度直方图,以获得子区域的主梯度方向和次梯度方向;For any sub-region, calculate the gradient direction of each pixel in the sub-region and draw a gradient histogram to obtain the main gradient direction and secondary gradient direction of the sub-region;分别构建ROI区域的主梯度共生矩阵和次梯度共生矩阵;Construct the main gradient co-occurrence matrix and sub-gradient co-occurrence matrix of the ROI region respectively;根据主梯度共生矩阵计算主梯度特征向量,根据次梯度共生矩阵计算次梯度特征向量;The main gradient eigenvector is calculated according to the main gradient co-occurrence matrix, and the sub-gradient eigenvector is calculated according to the sub-gradient co-occurrence matrix;将主梯度特征向量和次梯度特征向量的相似度作为梯度一致性。The similarity between the main gradient eigenvector and the sub-gradient eigenvector is taken as the gradient consistency.
CN202411641853.3A2024-11-182024-11-18 Cavity Abnormality Detection Method Based on Machine VisionActiveCN119151931B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202411641853.3ACN119151931B (en)2024-11-182024-11-18 Cavity Abnormality Detection Method Based on Machine Vision

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202411641853.3ACN119151931B (en)2024-11-182024-11-18 Cavity Abnormality Detection Method Based on Machine Vision

Publications (2)

Publication NumberPublication Date
CN119151931Atrue CN119151931A (en)2024-12-17
CN119151931B CN119151931B (en)2025-06-03

Family

ID=93811496

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202411641853.3AActiveCN119151931B (en)2024-11-182024-11-18 Cavity Abnormality Detection Method Based on Machine Vision

Country Status (1)

CountryLink
CN (1)CN119151931B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN112528971A (en)*2021-02-072021-03-19北京智芯微电子科技有限公司Power transmission line abnormal target detection method and system based on deep learning
US20210334587A1 (en)*2018-09-042021-10-28Boe Technology Group Co., Ltd.Method and apparatus for training a convolutional neural network to detect defects
CN117764986A (en)*2024-02-222024-03-26宝鸡世邦钛制品有限公司titanium plate surface defect detection method based on image processing
CN117969553A (en)*2024-03-282024-05-03杭州映图智能科技有限公司On-line visual detection system for appearance of TPV knitted composite pipe
CN118072168A (en)*2024-02-232024-05-24江苏大学Real-time accurate prediction method and system for feeding quantity of rice and wheat combine harvester
CN118691953A (en)*2024-08-262024-09-24联合光科技(北京)有限公司 Rapid detection method of contaminants on optical component surfaces based on visual imaging

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20210334587A1 (en)*2018-09-042021-10-28Boe Technology Group Co., Ltd.Method and apparatus for training a convolutional neural network to detect defects
CN112528971A (en)*2021-02-072021-03-19北京智芯微电子科技有限公司Power transmission line abnormal target detection method and system based on deep learning
CN117764986A (en)*2024-02-222024-03-26宝鸡世邦钛制品有限公司titanium plate surface defect detection method based on image processing
CN118072168A (en)*2024-02-232024-05-24江苏大学Real-time accurate prediction method and system for feeding quantity of rice and wheat combine harvester
CN117969553A (en)*2024-03-282024-05-03杭州映图智能科技有限公司On-line visual detection system for appearance of TPV knitted composite pipe
CN118691953A (en)*2024-08-262024-09-24联合光科技(北京)有限公司 Rapid detection method of contaminants on optical component surfaces based on visual imaging

Also Published As

Publication numberPublication date
CN119151931B (en)2025-06-03

Similar Documents

PublicationPublication DateTitle
CN118608504B (en)Machine vision-based part surface quality detection method and system
CN115880248B (en)Surface scratch defect identification method and visual detection equipment
Wang et al.Surface defects detection using non-convex total variation regularized RPCA with kernelization
CN116777907A (en)Sheet metal part quality detection method
CN113256624A (en)Continuous casting round billet defect detection method and device, electronic equipment and readable storage medium
CN116109637A (en)System and method for detecting appearance defects of turbocharger impeller based on vision
CN119941740A (en) Parts processing detection method and system
CN116309577B (en)Intelligent detection method and system for high-strength conveyor belt materials
CN118521549A (en)Semiconductor surface defect identification method based on topology data analysis improvement
CN117274148B (en)Unsupervised wafer defect detection method based on deep learning
CN117094988A (en)ResNet50 network model-based piezoresistor surface microscopic defect detection method
CN119722682A (en) A method and system for online detection of cable appearance particles
CN119477892A (en) A method for detecting the degree of crushing of mineral materials based on image analysis
CN115049641A (en)Electric data processing method and system for anomaly detection of mechanical parts
CN119250650A (en) Data management method and system for silver bonding wire based on convolutional neural model
CN119151931B (en) Cavity Abnormality Detection Method Based on Machine Vision
CN118735878A (en) Strip steel surface defect detection method and related device based on multi-scale feature fusion
CN113870328A (en)Liquid foreign matter visual detection method and system
CN115511884B (en)Punching compound die surface quality detection method based on computer vision
CN116740053B (en)Management system of intelligent forging processing production line
Jothi et al.Intra-ocular lens defect detection using generalized hough transform
CN115311625B (en) A monitoring method for determining whether a target is in contact with a transmission line
CN117710313A (en)Defect identification processing method based on image detection and storage medium
CN115471494B (en) Mandarin orange quality inspection method, device, equipment and storage medium based on image processing
Yu et al.A Machine vision method for non-contact Tool Wear Inspection

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp