Material detection data identification and acquisition method and system based on machine vision
Through the convolutional neural network and similarity algorithm + k-mean clustering algorithm, dynamically adjusting the acquisition interval time of material detection instruments, solving the problems of low digitization of material material detection equipment and insufficient dynamic data acquisition accuracy, and achieving high-precision and real-time material detection.
Patent Information
- Application Number
- CN202510707912.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-29
- Publication Date
- 2025-08-12
AI Technical Summary
In the prior art, material material testing equipment has a low degree of digitization, insufficient accuracy of dynamic data acquisition, and fixed sampling intervals lead to redundancy or missing data, affecting the accuracy and efficiency of the detection results.
Through the convolutional neural network combining prediction results and feature data, the interval time of the material detection instrument screen frame is dynamically adjusted, and the similarity algorithm and the k-mean clustering algorithm are combined to generate the detection status feature recognition output results, and the acquisition interval time is updated in real time.
It significantly improves the identification accuracy and real-time nature of material detection data, avoids redundancy or omission caused by fixed frequency sampling, improves the stability and reliability of the detection process, and is especially suitable for the detection of stretch fractures with high accuracy requirements.
Smart Images

Figure CN120472266A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a material detection data identification and collection method and system based on machine vision, belonging to the technical field of material detection data intelligent identification and collection. Background Art
[0002] Currently, with the goals of automating the collection of material testing data and ensuring data remains on the ground, and the creation of "transparent" laboratories with full online control, the intelligentization of material testing data has become a pressing challenge and development direction for the industry. At the data collection level, testing equipment is divided into three types: integrated workstations, industrial computer-based standalone equipment, and instrumentation tools. The first two types of equipment have their own control computers and software, making digitalization easy. However, most material testing equipment is instrumentation tools, lacking hardware transmission interfaces and data storage capabilities, which has become a difficult problem hindering the data from being stored on the ground for all material testing projects.
[0003] Existing intelligent recognition and collection systems for material inspection data based on machine vision often use image recognition technology and target positioning technology to detect and extract static data from material materials. However, there is no accurate and effective recognition and collection method for dynamic data such as tensile elongation in material quality inspection. In addition, since the dynamic data in material quality inspection is constantly changing according to the characteristics of the material itself, setting the interval for data collection is also a major problem. The existing collection interval is often fixed, but a smaller collection interval will lead to excessive inspection frequency, bloated inspection data, and a greater burden on the data processing center. A larger collection interval may affect the accuracy of the inspection results and result in incomplete inspection data. Summary of the Invention
[0004] The purpose of the present invention is to provide a material inspection data recognition and collection method and system based on machine vision. By utilizing a convolutional neural network combined with the prediction results and the feature data extracted during the prediction process, the interval duration of the corresponding picture extracted by the material inspection instrument at the current time is dynamically updated to solve the problems in the prior art of low digitization of material inspection equipment, insufficient dynamic data collection accuracy and data redundancy / missing caused by fixed sampling intervals.
[0005] In order to solve the above technical problems, the present invention is implemented by adopting the following technical solutions.
[0006] In a first aspect, the present invention provides a method for identifying and collecting material detection data based on machine vision, comprising:
[0007] Use material testing instruments to collect real-time video information of the testing process of the materials to be tested;
[0008] Repeat the following steps until the material detection instrument stops detecting the material to be detected:
[0009] Based on the type of the material to be detected, the interval duration of extracting the corresponding picture frame at the current time of the material detection instrument is obtained, and the picture frame to be processed in the video information is obtained to generate a frame image set;
[0010] Binding each picture frame in the frame image set with the interval length of extracting the corresponding picture frame to generate an image time mapping set;
[0011] Constructing a material detection result analysis input set using the frame image set and the image time mapping set;
[0012] Analyze the input set based on the material detection results, and process it based on the trained convolutional neural network to obtain material extraction feature results;
[0013] Based on the similarity algorithm and the k-means clustering algorithm, the detection status feature recognition output results corresponding to the material detection results are generated according to the historical material extraction feature results and the material extraction feature results;
[0014] According to the detection status feature recognition output result corresponding to the material detection result, the material detection data recognition and collection warning information corresponding to the current time is generated, and the interval duration of the corresponding picture frame extracted by the material detection instrument at the current time is updated.
[0015] Furthermore, before the material detection instrument detects the material to be detected, the method further includes: setting an initial value of the interval time for extracting the corresponding picture frames at the current time of the material detection instrument according to the type of the material to be detected, wherein obtaining the interval time for extracting the corresponding picture frames at the current time of the material detection instrument based on the type of the material to be detected includes:
[0016] If the action of obtaining the interval duration of extracting the corresponding picture frame of the current time of the material detection instrument fails, the interval duration is set to the initial value;
[0017] If the action of obtaining the interval duration of extracting the corresponding picture frames at the current time of the material detection instrument is successful, the interval duration is set to the most recent update result of the interval duration of extracting the corresponding picture frames at the current time of the material detection instrument.
[0018] Furthermore, the convolutional neural network training method includes:
[0019] Obtain a set of historical frame images and the length change when tensile fracture occurs during the corresponding test process from the time when the corresponding historical frame images are taken as input features, and use the feature extraction results of historical materials as output features to form a sample data pair;
[0020] Randomly divide the sample data pairs into training sets and validation sets according to the preset ratio;
[0021] The convolutional neural network is iteratively trained using the training set and the validation set to obtain a trained convolutional neural network.
[0022] Furthermore, the convolutional neural network is iteratively trained using the training set and the validation set to obtain a trained convolutional neural network, including:
[0023] In each iteration, the training set is input into the convolutional neural network to preprocess the frame images in the sample data pairs and generate frame images of preset sizes;
[0024] The convolution kernel preset in the convolutional neural network is used to slide on a frame image of a preset size according to a preset step size, and the local area of the frame image corresponding to the sliding position of the convolution kernel is scanned and convolved to generate a local feature map corresponding to each scanning position;
[0025] The local feature map is input into the pooling layer and maximum pooling is performed through a matrix of a preset size to obtain the pooled feature maps, which are input into the fully connected layer;
[0026] In the fully connected layer, the pooled feature maps are traversed sequentially to generate material extraction features. The material extraction features are then bound to the length change when the tensile fracture occurs during the corresponding test process at the time of shooting the corresponding historical frame image to generate the material extraction feature results.
[0027] The trained convolutional neural network is verified using the validation set, the hyperparameters are adjusted according to the state and convergence of the convolutional neural network, and the convolutional neural network with the best effect is selected as the trained convolutional neural network.
[0028] Furthermore, based on the similarity algorithm and the k-means clustering algorithm, the detection status feature recognition output result corresponding to the material detection result is generated according to the historical material extraction feature results and the material extraction feature results, including:
[0029] Extracting material extraction feature results whose similarity with historical material extraction feature results is greater than or equal to a preset similarity, and constructing a feature matching summary set;
[0030] The k-means clustering algorithm is used to perform cluster analysis on the length changes when tensile fracture occurs during the corresponding test process and the time distance of the shooting corresponding historical frame images bound to each element in the feature matching summary set, and the length change corresponding to each cluster center is obtained.
[0031] The cluster center and the corresponding length change are bound to generate the detection status feature recognition output result corresponding to the material detection result.
[0032] Furthermore, the detection status feature recognition output result corresponding to the material detection result is expressed as:
[0033] ;
[0034] Where, Indicates the detection status feature recognition output result corresponding to the material detection result, Indicates recent The sum of the detection status feature recognition output results corresponding to the material detection results. If the detection status feature recognition output results corresponding to the most recent material detection results are insufficient, , then use 0 as the detection state feature recognition output result corresponding to the most recent material detection result to complete, and is a preset constant, Indicates recent The sum of the number of non-zero values in the detection status feature recognition output results corresponding to the material detection results plus 1, Indicates the initial length of the material to be tested corresponding to the material test result during the test, iz indicates the number of cluster centers corresponding to the cluster analysis results of the feature matching summary set, Indicates the cluster analysis results for the feature matching summary set. The sum of the length change corresponding to the cluster center and the actual length of the material to be measured at the current time minus The difference after Indicates the The average value of the similarity between the historical material detection results and the material detection results of each element in the category corresponding to each cluster center; Indicates the The ratio of the number of elements in the category corresponding to each cluster center to the total number of elements in the feature matching summary set; Indicates the difference between the test status feature recognition output result corresponding to the most recent test result of the same type as the material to be tested and the actual tensile elongation at break; Indicates the adjustment factor stored in the database at the current time. Equal to the adjustment factor stored in the database plus the end time of the most recent test of the same type as the material to be tested After the sum.
[0035] Furthermore, the material detection data identification and collection warning information includes the initial length of the material to be detected at the current time, the actual length of the material to be detected at the current time, the detection status feature recognition output result corresponding to the material detection result at the current time, and the interval duration of the corresponding picture extracted by the material detection instrument at the current time.
[0036] Furthermore, the updating of the interval duration of extracting the corresponding picture frame at the current time of the material detection instrument includes:
[0037] If the interval between two adjacent updates is greater than or equal to the preset time, the interval between the current time of the material detection instrument and the corresponding picture frame extraction is updated;
[0038] If the interval between two adjacent updates is less than the preset duration, the interval between the current time extraction of the corresponding picture frame of the material detection instrument will not be updated.
[0039] Furthermore, when the interval duration of the corresponding picture frame extracted from the current time of the material detection instrument is updated, the corresponding update result is expressed as:
[0040] ;
[0041] Where, Indicates the updated result of the interval length of the corresponding picture frame extracted by the material detection instrument at the current time. Indicates the interval length of the corresponding picture frame extracted by the material detection instrument at the current time. LA indicates the actual length of the material to be detected at the current time. Indicates the detection status feature recognition output result corresponding to the material detection result The corresponding The ratio of the number of elements in the category corresponding to the cluster center to the total number of elements in the feature matching summary set The standard deviation of represents the contrast factor and is a preset constant, Represents the comparison function, when When ,when When .
[0042] In a second aspect, the present invention provides a material detection data recognition and collection system based on machine vision, which is used to implement the steps of the method described in the first aspect.
[0043] Compared with the prior art, the present invention has the following beneficial effects:
[0044] 1. The present invention obtains the interval duration of the corresponding picture frame extracted by the material detection instrument at the current time, and dynamically adjusts the interval duration based on the type of material to be detected. It combines the trained convolutional neural network, similarity algorithm, and k-means clustering algorithm for processing, thereby significantly improving the recognition accuracy and real-time performance of material detection data. Specifically, it adaptively adjusts the frame extraction interval according to the type of material to be detected, avoiding redundancy or omission caused by fixed-frequency sampling; by binding each picture frame in the frame image set with the interval duration of the corresponding picture frame extraction to generate an image time mapping set, constructing the material detection result analysis input set, and enhancing the perception ability of dynamic changes in the detection process; using the similarity clustering of historical material extraction feature results and current material extraction feature results to generate the detection status feature recognition output result, and updating the picture frame extraction interval duration in real time through early warning information feedback, forming a closed-loop optimization to reduce the average false detection rate.
[0045] 2. This invention achieves stability and reliability in the detection process by presetting the initial frame extraction interval based on the type of material being tested and automatically reverting to the initial value if the interval is unsuccessful. When the system successfully obtains the most recently updated interval, it automatically adopts the optimized sampling frequency, ensuring adaptive sampling accuracy for different material detection processes while effectively avoiding sampling interruptions caused by communication anomalies.
[0046] 3. The present invention uses sample data containing a set of historical frame images and their corresponding tensile fracture length changes to train a convolutional neural network. Local feature maps are generated by sliding scanning of the convolution kernel. After processing by the pooling layer and the fully connected layer, the image features are accurately associated with the physical tensile changes, which significantly improves the accuracy of feature extraction. It is particularly suitable for tensile fracture detection scenarios with high precision requirements.
[0047] 4. The present invention innovatively combines the similarity algorithm with the k-means clustering algorithm to perform dynamic clustering analysis on the historical material extraction feature results and the current material extraction feature results, and generates a detection status feature recognition output result corresponding to the material detection result. It not only includes the length change corresponding to the cluster center, but also integrates the similarity mean and category proportion parameters, realizing accurate characterization of the detection status and greatly improving the timeliness and accuracy of anomaly detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 This is a flow chart of a method for identifying and collecting material inspection data based on machine vision provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0049] The technical solution of the present invention is described in detail below through the accompanying drawings and specific embodiments. It should be understood that the embodiments of the present invention and the specific features in the embodiments are detailed descriptions of the technical solution of the present invention, rather than limitations on the technical solution of the present invention. In the absence of conflict, the embodiments of the present invention and the technical features in the embodiments can be combined with each other.
[0050] The term "and / or" simply describes a relationship between related objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: A exists alone, A and B exist simultaneously, or B exists alone. Additionally, the character " / " generally indicates an "or" relationship between the related objects.
[0051] Example 1
[0052] like Figure 1 As shown, this embodiment introduces a material detection data recognition and collection method based on machine vision, including:
[0053] Step 1: Use material detection equipment to collect real-time video information of the inspection process of the material to be inspected.
[0054] The present invention uses material detection instruments to collect video information of the detection process of the material to be detected in real time, establishing a complete spatiotemporal recording basis for the detection process. Different from traditional static sampling, the real-time video can capture dynamic deformation processes, such as continuous changes in tensile fracture.
[0055] Step 2: Repeat the following steps until the material detection instrument stops detecting the material to be detected:
[0056] Step 2.1: Based on the type of the material to be detected, the interval duration of the corresponding picture frame extracted from the current time of the material detection instrument is obtained, and the picture frames to be processed in the video information are obtained to generate a frame image set.
[0057] This invention determines the sampling interval based on the type of material being tested, enabling the use of different sampling frequencies for different materials, such as metal and rubber. Specifically, high-frequency sampling is used for metal materials to capture subtle deformations, while low-frequency sampling is used for rubber materials to capture subtle deformations. Furthermore, if the attempt to obtain the latest interval duration fails, the system automatically reverts to a preset initial value, ensuring system robustness.
[0058] Step 2.2: Bind each picture frame in the frame image set with the interval duration of extracting the corresponding picture frame to generate an image time mapping set.
[0059] The present invention binds picture frames and interval durations to generate an image time mapping set, establishes a strict correspondence between frame images and acquisition time, and enables accurate timestamps to be obtained when calculating the length change during stretching and breaking.
[0060] Step 2.3: Construct a material detection result analysis input set using the frame image set and the image time mapping set.
[0061] The present invention uses a frame image set and an image time mapping set to construct an input set for material detection result analysis, structurally integrating visual data and time information to form an input format suitable for CNN processing.
[0062] Step 2.4: Analyze the input set based on the material detection results, process it based on the trained convolutional neural network, and obtain material extraction feature results.
[0063] The present invention analyzes the data set based on the input material detection results, performs multi-layer convolution and pooling operations through a trained convolutional neural network, gradually abstracts and extracts the key features of the materials, and obtains material extraction feature results. The material extraction feature results can more accurately describe the properties and status of the materials, thereby improving the accuracy and efficiency of material detection.
[0064] Step 2.5: Based on the similarity algorithm and the k-means clustering algorithm, generate the detection status feature recognition output result corresponding to the material detection result according to the historical material extraction feature results and the material extraction feature results.
[0065] The present invention combines similarity algorithm and K-means clustering algorithm to perform feature analysis and classification, and generates detection status feature recognition output results corresponding to the material detection results. It can reflect the detection status of the current material to be detected. Through cluster analysis, it can also discover the potential patterns and laws in material detection, providing a scientific basis for material management and decision-making.
[0066] Step 2.6: Generate material detection data identification and collection warning information corresponding to the current time based on the detection status feature recognition output result corresponding to the material detection result, and update the interval duration of the corresponding picture frame extracted by the material detection instrument at the current time.
[0067] Based on the detection status feature identification output corresponding to the material inspection results, combined with preset warning rules and thresholds, this invention can generate warning information for the material inspection data identification and collection corresponding to the current time. Furthermore, the interval between the material inspection instrument's extraction of the corresponding image frames at the current time is dynamically adjusted based on the urgency of the warning information and the material inspection requirements.
[0068] At the same time, the identification and collection of warning information for material inspection data corresponding to the current time can promptly alert relevant personnel to anomalies or potential risks in material inspection, allowing them to take appropriate measures to address them. Furthermore, dynamically adjusting the frame extraction interval can optimize the efficiency and accuracy of material inspection. When the material status is stable, the interval can be appropriately increased to reduce the computational burden; when the material status is abnormal or higher-precision inspection is required, the interval can be reduced to increase inspection frequency and accuracy.
[0069] Example 2
[0070] Based on the same inventive concept as Example 1, this example introduces the implementation steps of a material detection data recognition and collection method based on machine vision, including:
[0071] Step 1: Use material detection equipment to collect real-time video information of the inspection process of the material to be inspected.
[0072] In this embodiment, the built-in camera of the material detection instrument collects video information of the material detection process in real time.
[0073] Before the material detection instrument detects the material to be detected, this embodiment further includes: setting an initial value of the interval time length of the material detection instrument extracting the corresponding picture frame at the current time according to the type of the material to be detected.
[0074] Step 2: Repeat the following steps until the material detection instrument stops detecting the material to be detected:
[0075] Step 2.1: Based on the type of the material to be detected, the interval duration of the corresponding picture frame extracted from the current time of the material detection instrument is obtained, and the picture frames to be processed in the video information are obtained to generate a frame image set.
[0076] In this embodiment, the interval between the acquisition times of any two adjacent frames in the frame image set is equal to the interval between the frames whose acquisition times are later.
[0077] In this embodiment, based on the type of the material to be detected, obtaining the interval duration of extracting the corresponding picture frame at the current time of the material detection instrument includes:
[0078] If the action of obtaining the interval duration of extracting the corresponding picture frame of the current time of the material detection instrument fails, the interval duration is set to the initial value;
[0079] If the action of obtaining the interval duration of extracting the corresponding picture frames at the current time of the material detection instrument is successful, the interval duration is set to the most recent update result of the interval duration of extracting the corresponding picture frames at the current time of the material detection instrument.
[0080] Step 2.2: Bind each picture frame in the frame image set with the interval duration of extracting the corresponding picture frame to generate an image time mapping set.
[0081] Step 2.3: Construct a material detection result analysis input set using the frame image set and the image time mapping set.
[0082] Step 2.4: Analyze the input set based on the material detection results, process it based on the trained convolutional neural network, and obtain material extraction feature results.
[0083] In this embodiment, the convolutional neural network training method includes:
[0084] Step 2.4.1: Obtain the historical frame image set and the length change when the tensile fracture occurs during the corresponding test process during the shooting time of the corresponding historical frame image as input features, and use the feature extraction results of the historical materials as output features to form a sample data pair;
[0085] Step 2.4.2: Randomly divide the sample data into training set and validation set according to the preset ratio;
[0086] Step 2.4.3: Use the training set and validation set to iteratively train the convolutional neural network to obtain a trained convolutional neural network.
[0087] In this embodiment, the convolutional neural network is iteratively trained using the training set and the validation set to obtain a trained convolutional neural network, including:
[0088] In each iteration, the training set is input into the convolutional neural network to preprocess the frame images in the sample data pairs and generate frame images of preset sizes;
[0089] The convolution kernel preset in the convolutional neural network is used to slide on a frame image of a preset size according to a preset step size, and the local area of the frame image corresponding to the sliding position of the convolution kernel is scanned and convolved to generate a local feature map corresponding to each scanning position;
[0090] The local feature map is input into the pooling layer and maximum pooling is performed through a matrix of a preset size to obtain the pooled feature maps, which are input into the fully connected layer;
[0091] In the fully connected layer, the pooled feature maps are traversed sequentially to generate material extraction features. The material extraction features are then bound to the length change when the tensile fracture occurs during the corresponding test process at the time of shooting the corresponding historical frame image to generate the material extraction feature results.
[0092] The trained convolutional neural network is verified using the validation set, the hyperparameters are adjusted according to the state and convergence of the convolutional neural network, and the convolutional neural network with the best effect is selected as the trained convolutional neural network.
[0093] In this embodiment, the size of the convolution kernel is a 3×3 matrix, and the convolution kernel is , the stride of each sliding of the convolution kernel is 2, and the ratio of the training set to the validation set is 9:1.
[0094] Step 2.5: Based on the similarity algorithm and the k-means clustering algorithm, generate the detection status feature recognition output result corresponding to the material detection result according to the historical material extraction feature results and the material extraction feature results.
[0095] In this embodiment, based on the similarity algorithm and the k-means clustering algorithm, the detection status feature recognition output result corresponding to the material detection result is generated according to the historical material extraction feature results and the material extraction feature results, including:
[0096] Step 2.5.1: Extract the material extraction feature results whose similarity with the historical material extraction feature results is greater than or equal to the preset similarity, and construct a feature matching summary set.
[0097] Step 2.5.2: Use the k-means clustering algorithm to perform cluster analysis on the length changes when tensile fracture occurs during the corresponding test process and the time distance of the shooting corresponding historical frame image bound to each element in the feature matching summary set, and obtain the length change corresponding to each cluster center.
[0098] Step 2.5.3: Bind the cluster center and the corresponding length change to generate the detection status feature recognition output result corresponding to the material detection result.
[0099] In this embodiment, the detection status feature recognition output result corresponding to the material detection result is expressed as:
[0100] ;
[0101] Where, Indicates the detection status feature recognition output result corresponding to the material detection result, Indicates recent The sum of the detection status feature recognition output results corresponding to the material detection results. If the detection status feature recognition output results corresponding to the most recent material detection results are insufficient, , then use 0 as the detection state feature recognition output result corresponding to the most recent material detection result to complete, and is a preset constant, Indicates recent The sum of the number of non-zero values in the detection status feature recognition output results corresponding to the material detection results plus 1, Indicates the initial length of the material to be tested corresponding to the material test result during the test, iz indicates the number of cluster centers corresponding to the cluster analysis results of the feature matching summary set, Indicates the cluster analysis results for the feature matching summary set. The sum of the length change corresponding to the cluster center and the actual length of the material to be measured at the current time minus The difference after Indicates the The average value of the similarity between the historical material detection results and the material detection results of each element in the category corresponding to each cluster center; Indicates the The ratio of the number of elements in the category corresponding to each cluster center to the total number of elements in the feature matching summary set; Indicates the difference between the test status feature recognition output result corresponding to the most recent test result of the same type as the material to be tested and the actual tensile elongation at break; Indicates the adjustment factor stored in the database at the current time. Equal to the adjustment factor stored in the database plus the end time of the most recent test of the same type as the material to be tested After the sum.
[0102] Step 2.6: Generate material detection data identification and collection warning information corresponding to the current time based on the detection status feature recognition output result corresponding to the material detection result, and update the interval duration of the corresponding picture frame extracted by the material detection instrument at the current time.
[0103] In this embodiment, the material detection data identification and collection warning information includes the initial length of the material to be detected at the current time, the actual length of the material to be detected at the current time, the detection status feature recognition output result corresponding to the material detection result at the current time, and the interval duration of the corresponding picture extracted by the material detection instrument at the current time.
[0104] In this embodiment, the updating of the interval duration of extracting the corresponding picture frame of the current time of the material detection instrument includes:
[0105] If the interval between two adjacent updates is greater than or equal to the preset time, the interval between the current time of the material detection instrument and the corresponding picture frame extraction is updated;
[0106] If the interval between two adjacent updates is less than the preset duration, the interval between the current time extraction of the corresponding picture frame of the material detection instrument will not be updated.
[0107] In this embodiment, when the interval duration of the corresponding picture frame extracted from the current time of the material detection instrument is updated, the corresponding update result is expressed as:
[0108] ;
[0109] Where, Indicates the updated result of the interval length of the corresponding picture frame extracted by the material detection instrument at the current time. Indicates the interval length of the corresponding picture frame extracted by the material detection instrument at the current time. LA indicates the actual length of the material to be detected at the current time. Indicates the detection status feature recognition output result corresponding to the material detection result The corresponding The ratio of the number of elements in the category corresponding to the cluster center to the total number of elements in the feature matching summary set The standard deviation of represents the contrast factor and is a preset constant, Represents the comparison function, when When ,when When .
[0110] Example 3
[0111] Based on the same inventive concept as the other embodiments, this embodiment introduces a material detection data recognition and acquisition system based on machine vision, which is used to implement the steps of the method of the above-mentioned embodiment 1 or 2.
[0112] In summary, the present invention obtains the interval duration of the corresponding picture frame extracted by the material detection instrument at the current time, and dynamically adjusts the interval duration based on the type of material to be detected, and combines the trained convolutional neural network, similarity algorithm, and k-means clustering algorithm for processing, thereby significantly improving the recognition accuracy and real-time performance of material detection data. Specifically, it is manifested as follows: the frame extraction interval is adaptively adjusted according to the type of material to be detected, avoiding redundancy or omission caused by fixed-frequency sampling; by binding each picture frame in the frame image set with the interval duration of the corresponding picture frame extraction to generate an image time mapping set, constructing a material detection result analysis input set, and enhancing the perception ability of dynamic changes in the detection process; using the similarity clustering of historical material extraction feature results and current material extraction feature results to generate detection status feature recognition output results, and updating the picture frame extraction interval duration in real time through early warning information feedback, forming a closed-loop optimization to reduce the average false detection rate.
[0113] This invention achieves stability and reliability in the detection process by presetting the initial frame extraction interval based on the type of material being tested and automatically reverting to the initial value if the interval is unsuccessful. When the system successfully obtains the most recently updated interval, it automatically adopts the optimized sampling frequency, ensuring adaptive sampling accuracy across different material detection processes while effectively avoiding sampling interruptions caused by communication anomalies.
[0114] The present invention uses sample data containing a set of historical frame images and their corresponding tensile fracture length changes to train a convolutional neural network. Local feature maps are generated by sliding scanning of the convolution kernel. After processing by the pooling layer and the fully connected layer, the precise association between image features and physical tensile changes is achieved, which significantly improves the accuracy of feature extraction and is particularly suitable for tensile fracture detection scenarios with high precision requirements.
[0115] The present invention innovatively combines the similarity algorithm with the k-means clustering algorithm to perform dynamic clustering analysis on the historical material extraction feature results and the current material extraction feature results, and generates a detection status feature recognition output result corresponding to the material detection result. It not only includes the length change corresponding to the cluster center, but also integrates the similarity mean and category proportion parameters, realizing accurate characterization of the detection status and greatly improving the timeliness and accuracy of anomaly detection.
[0116] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0117] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0118] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0119] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0120] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the purpose of the present invention and the claims, which are all protected by the present invention.
Claims
1. A material detection data recognition and collection method based on machine vision, characterized in that: include: Use material testing instruments to collect real-time video information of the testing process of the materials to be tested; Repeat the following steps until the material detection instrument stops detecting the material to be detected: Based on the type of the material to be detected, the interval duration of extracting the corresponding picture frame at the current time of the material detection instrument is obtained, and the picture frame to be processed in the video information is obtained to generate a frame image set; Binding each picture frame in the frame image set with the interval length of extracting the corresponding picture frame to generate an image time mapping set; Constructing a material detection result analysis input set using the frame image set and the image time mapping set; Analyze the input set based on the material detection results, and process it based on the trained convolutional neural network to obtain material extraction feature results; Based on the similarity algorithm and the k-means clustering algorithm, the detection status feature recognition output results corresponding to the material detection results are generated according to the historical material extraction feature results and the material extraction feature results; According to the detection status feature recognition output result corresponding to the material detection result, the material detection data recognition and collection warning information corresponding to the current time is generated, and the interval duration of the corresponding picture frame extracted by the material detection instrument at the current time is updated.
2. The material detection data recognition and collection method based on machine vision according to claim 1 is characterized in that: Before the material detection instrument detects the material to be detected, the method further includes: setting an initial value of the interval time length of the material detection instrument extracting the corresponding picture frame at the current time according to the type of the material to be detected, wherein obtaining the interval time length of the material detection instrument extracting the corresponding picture frame at the current time based on the type of the material to be detected includes: If the action of obtaining the interval duration of extracting the corresponding picture frame of the current time of the material detection instrument fails, the interval duration is set to the initial value; If the action of obtaining the interval duration of extracting the corresponding picture frames at the current time of the material detection instrument is successful, the interval duration is set to the most recent update result of the interval duration of extracting the corresponding picture frames at the current time of the material detection instrument.
3. The material detection data recognition and collection method based on machine vision according to claim 1 is characterized in that: The convolutional neural network training method comprises: Obtain a set of historical frame images and the length change when tensile fracture occurs during the corresponding test process from the time when the corresponding historical frame images are taken as input features, and use the feature extraction results of historical materials as output features to form a sample data pair; Randomly divide the sample data pairs into training sets and validation sets according to the preset ratio; The convolutional neural network is iteratively trained using the training set and the validation set to obtain a trained convolutional neural network.
4. The material detection data recognition and collection method based on machine vision according to claim 3 is characterized in that: The convolutional neural network is iteratively trained using the training set and the validation set to obtain a trained convolutional neural network, including: In each iteration, the training set is input into the convolutional neural network to preprocess the frame images in the sample data pairs and generate frame images of preset sizes; The convolution kernel preset in the convolutional neural network is used to slide on a frame image of a preset size according to a preset step size, and the local area of the frame image corresponding to the sliding position of the convolution kernel is scanned and convolved to generate a local feature map corresponding to each scanning position; The local feature map is input into the pooling layer and maximum pooling is performed through a matrix of a preset size to obtain the pooled feature maps, which are input into the fully connected layer; In the fully connected layer, the pooled feature maps are traversed sequentially to generate material extraction features. The material extraction features are then bound to the length change when the tensile fracture occurs during the corresponding test process at the time of shooting the corresponding historical frame image to generate the material extraction feature results. The trained convolutional neural network is verified using the validation set, the hyperparameters are adjusted according to the state and convergence of the convolutional neural network, and the convolutional neural network with the best effect is selected as the trained convolutional neural network.
5. The material detection data recognition and collection method based on machine vision according to claim 4 is characterized in that: Based on the similarity algorithm and the K-means clustering algorithm, the detection status feature recognition output results corresponding to the material detection results are generated according to the historical material extraction feature results and the material extraction feature results, including: Extracting material extraction feature results whose similarity with historical material extraction feature results is greater than or equal to a preset similarity, and constructing a feature matching summary set; The k-means clustering algorithm is used to perform cluster analysis on the length changes when tensile fracture occurs during the corresponding test process and the time distance of the shooting corresponding historical frame images bound to each element in the feature matching summary set, and the length change corresponding to each cluster center is obtained. The cluster center and the corresponding length change are bound to generate the detection status feature recognition output result corresponding to the material detection result.
6. The material detection data recognition and collection method based on machine vision according to claim 5 is characterized in that: The detection status feature recognition output result corresponding to the material detection result is expressed as: ; Where, Indicates the detection status feature recognition output result corresponding to the material detection result, Indicates recent The sum of the detection status feature recognition output results corresponding to the material detection results. If the detection status feature recognition output results corresponding to the most recent material detection results are insufficient, , then use 0 as the detection state feature recognition output result corresponding to the most recent material detection result to complete, and is a preset constant, Indicates recent The sum of the number of non-zero values in the detection status feature recognition output results corresponding to the material detection results plus 1, Indicates the initial length of the material to be tested corresponding to the material test result during the test, iz indicates the number of cluster centers corresponding to the cluster analysis results of the feature matching summary set, Indicates the cluster analysis results for the feature matching summary set. The sum of the length change corresponding to the cluster center and the actual length of the material to be measured at the current time minus The difference after Indicates the The average value of the similarity between the historical material detection results and the material detection results of each element in the category corresponding to each cluster center; Indicates the The ratio of the number of elements in the category corresponding to each cluster center to the total number of elements in the feature matching summary set; Indicates the difference between the test status feature recognition output result corresponding to the most recent test result of the same type as the material to be tested and the actual tensile elongation at break; Indicates the adjustment factor stored in the database at the current time. Equal to the adjustment factor stored in the database plus the end time of the most recent test of the same type as the material to be tested After the sum.
7. The material detection data recognition and collection method based on machine vision according to claim 1 is characterized in that: The material detection data identification and collection warning information includes the initial length of the material to be detected at the current time, the actual length of the material to be detected at the current time, the detection status feature recognition output result corresponding to the material detection result at the current time, and the interval duration of the corresponding picture extracted by the material detection instrument at the current time.
8. The material detection data recognition and collection method based on machine vision according to claim 1 is characterized in that: The updating of the interval duration of extracting the corresponding picture frame of the current time of the material detection instrument includes: If the interval between two adjacent updates is greater than or equal to the preset time, the interval between the current time of the material detection instrument and the corresponding picture frame extraction is updated; If the interval between two adjacent updates is less than the preset duration, the interval between the current time extraction of the corresponding picture frame of the material detection instrument will not be updated.
9. The material detection data recognition and collection method based on machine vision according to claim 8, characterized in that: When the interval duration of the corresponding picture frame extracted from the current time of the material detection instrument is updated, the corresponding update result is expressed as: ; Where, Indicates the updated result of the interval length of the corresponding picture frame extracted by the material detection instrument at the current time. Indicates the interval length of the corresponding picture frame extracted by the material detection instrument at the current time. LA indicates the actual length of the material to be detected at the current time. Indicates the detection status feature recognition output result corresponding to the material detection result The corresponding The ratio of the number of elements in the category corresponding to the cluster center to the total number of elements in the feature matching summary set The standard deviation of represents the contrast factor and is a preset constant, Represents the comparison function, when When ,when When .
10. A material detection data recognition and collection system based on machine vision, characterized in that: The method according to any one of claims 1 to 9 is implemented.