CN114842274B - Conductive foam elasticity analysis method, device and equipment based on image analysis - Google Patents
Conductive foam elasticity analysis method, device and equipment based on image analysis Download PDFInfo
- Publication number
- CN114842274B CN114842274B CN202210737042.8A CN202210737042A CN114842274B CN 114842274 B CN114842274 B CN 114842274B CN 202210737042 A CN202210737042 A CN 202210737042A CN 114842274 B CN114842274 B CN 114842274B
- Authority
- CN
- China
- Prior art keywords
- image
- classification model
- conductive foam
- deformation
- original
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/764—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/77—Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
- G06V10/774—Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/82—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/70—Labelling scene content, e.g. deriving syntactic or semantic representations
Abstract
The invention relates to an artificial intelligence technology, and discloses a conductive foam elasticity analysis method based on image analysis, which comprises the following steps: calculating deformation quantities of different types of conductive foam cotton based on a digital image correlation method, constructing an original conductive foam cotton image training set, performing attention activation on the original conductive foam cotton image training set by using an original classification model, obtaining an attention activation atlas, performing type classification to obtain a prediction type label, performing data amplification on the attention activation atlas, performing elastic classification by using the original classification model to obtain a prediction elastic label, performing cross entropy joint training on the original classification model based on the prediction type label and the prediction elastic label to obtain a standard classification model, and outputting a type result and an elastic result of a compressed conductive foam cotton image to be recognized by using the standard classification model. The invention also provides a device and equipment for analyzing the elasticity of the conductive foam based on image analysis. The invention can improve the efficiency of the elastic analysis of the conductive foam.
Description
Technical Field
The invention relates to the technical field of artificial intelligence, in particular to a method and a device for conducting foam elasticity analysis based on image analysis and electronic equipment.
Background
The conductive foam is formed by wrapping conductive cloth on flame-retardant sponge, is a gap shielding material which is light in weight, compressible and conductive, and is commonly used for providing conductive connection and shielding effects at gaps in electronic and electrical equipment, such as mobile phones, notebooks and the like. The elasticity analysis of the conductive foam is the basic characteristic for representing the quality of the conductive foam.
Wherein, elasticity analysis includes compressibility and resilience, and high compressibility indicates that the application scope of bubble cotton is wider, can fill in tiny gap, and the resilience is that whether the representation bubble cotton can keep original height after a lot of or long-time compression, can also continue to provide shock attenuation buffering and good stress lapped characteristic. In the prior art, the elasticity of the conductive foam is mainly analyzed manually, so that the efficiency is low and the accuracy is low.
Disclosure of Invention
The invention provides a conductive foam elasticity analysis method and device based on image analysis, electronic equipment and a readable storage medium, and mainly aims to improve the efficiency of conductive foam elasticity analysis.
In order to achieve the above object, the present invention provides a method for analyzing elasticity of a conductive foam based on image analysis, including:
acquiring initial image sets of different types of conductive foam cotton and acquiring a compression deformation image set corresponding to the initial image sets;
calculating deformation quantities of the different types of conductive foam cotton based on a digital image correlation method according to the initial image set and the compression deformation image set, and constructing an original conductive foam cotton image training set according to the deformation quantities;
constructing an original classification model comprising two layers of classification models, performing attention activation on the original conductive foam image training set by using a first layer of classification model in the original classification model based on an attention mechanism to obtain an attention activation image set, and performing type classification on the attention activation image set to obtain a prediction type label;
performing data augmentation on the attention activation graph set, and performing elastic classification on augmented data by using a second-layer classification model in the original classification model to obtain a predicted elastic label;
performing cross entropy joint training on the first-layer classification model and the second-layer classification model based on the prediction type label and the prediction elastic label to obtain a standard classification model;
and acquiring a compressed conductive foam image to be identified, and outputting the type result and the elastic result of the compressed conductive foam image to be identified by using the standard classification model.
Optionally, the calculating, according to the initial image set and the compression deformation image set, deformation amounts of the different types of conductive foam based on a digital image correlation method, and constructing an original conductive foam image training set according to the deformation amounts includes:
taking a region with a preset size in each initial image of the initial image set as a reference image region;
searching a deformation image area in a compression deformation image set corresponding to each initial image based on the reference image area, and calculating the similarity between the reference image area and the searched deformation image area;
determining the deformed image area with the similarity meeting the preset condition as a target image area;
calculating displacement amounts of the center points of the reference image area and the target image area based on a preset iteration method, and taking the displacement amounts as deformation amounts;
and constructing a deformation curve based on the deformation quantity, and marking the images in the initial image set and the compression deformation image set by using the deformation curve to obtain an original conductive foam image training set.
Optionally, the constructing a deformation curve based on the deformation amount, and labeling the images in the initial image set and the compressed deformation image set by using the deformation curve to obtain an original conductive foam cotton image training set includes:
mapping the deformation quantity and the pressure value corresponding to the deformation quantity to a pre-constructed coordinate system;
fitting the data in the coordinate system to obtain the deformation curve;
and carrying out gradient division on the deformation curve, and labeling the images in the initial image set and the compressed deformation image set by using a deformation range and a pressure value range corresponding to each gradient to obtain an original conductive foam image training set.
Optionally, the similarity between the reference image area and the searched deformation image area is calculated by using the following formula:
wherein the content of the first and second substances,the degree of similarity is represented by a graph,which represents a region of the reference image,a region of the deformed image is represented,representing a point in the region of the reference image,representing a point in the deformed image area,representing the gray scale of a point in the reference image area,representing the average gray value of the reference image area,representing the gray scale of the point in the deformed image region,representing the mean gray value of the deformed image area.
Optionally, the performing, by using a first-layer classification model in the original classification model, attention activation on the original conductive foam image training set based on an attention mechanism to obtain an attention activation map set, and performing type classification on the attention activation map set to obtain a prediction type label includes:
extracting the characteristics of the images in the original conductive foam image training set by using a characteristic extraction module of the first layer of classification model to obtain a characteristic image set;
performing attention activation on the images in the feature image set by using an attention module of the first-layer classification model to obtain an attention activation image set;
performing global average pooling on the attention activation map set by using a pooling module of the first-layer classification model to obtain a first feature vector;
and performing type classification on the first feature vector by using a classifier of the first-layer classification model to obtain the prediction type label.
Optionally, the data augmenting the attention activation atlas, and elastically classifying the augmented data by using a second-layer classification model in the original classification model to obtain a predicted elastic label includes:
performing up-sampling on each channel of the images in the attention activation image set to obtain a channel image set;
determining the position of a pixel in the channel image set, which is larger than a preset threshold value, as a discriminant region, and performing adaptive cutting on the discriminant region to obtain an augmented image;
extracting an augmented feature image of the augmented image by using a feature extraction module of the second-layer classification model;
performing global average pooling on the augmented feature images by using a pooling module of the second-layer classification model to obtain a second feature vector;
and performing elastic classification on the second feature vector by using a classifier of the second-layer classification model to obtain the prediction elastic label.
Optionally, the performing cross-entropy joint training on the first-layer classification model and the second-layer classification model based on the prediction type label and the prediction elastic label to obtain a standard classification model, including:
calculating the joint loss of the first-layer classification model and the second-layer classification model based on a Softmax cross entropy loss function according to the prediction type label and the prediction elastic label;
if the joint loss is larger than a preset loss threshold value, adjusting model parameters in the original classification model, returning to the step of performing attention activation on the original conductive foam image training set by using a first-layer classification model in the original classification model based on an attention mechanism to obtain an attention activation image set, and obtaining the standard classification model until the joint loss is smaller than or equal to the preset loss threshold value.
Optionally, the joint loss is calculated by using a Softmax cross entropy loss function as follows:
wherein the content of the first and second substances,the loss of the union is expressed as,a loss value representing a first-level classification model,a first feature vector is represented that represents a first feature vector,a label representing the type of prediction is provided,representing the loss value of the second-level classification model,a second feature vector is represented that represents a second feature vector,it is shown that the predicted elastic label,the weight is preset to be a preset weight,which is indicative of the number of training images,the feature vector is represented by a vector of features,a prediction tag is represented that is a label of the prediction,is a sign function, wherein the predicted label is the same as the true label1, when the predicted tag is not the same as the real tagIs a non-volatile organic compound (I) with a value of 0,is shown asThe feature vectors of the individual training images,the number of the labels is indicated and,represents the first in the classifierThe weight of each of the tags is determined,indicating transposition.
In order to solve the above problems, the present invention further provides an apparatus for analyzing elasticity of conductive foam based on image analysis, the apparatus comprising:
the training image construction module is used for acquiring initial image sets of different types of conductive foam, acquiring compression deformation image sets corresponding to the initial image sets, calculating deformation quantities of the different types of conductive foam based on a digital image correlation method according to the initial image sets and the compression deformation image sets, and constructing an original conductive foam image training set according to the deformation quantities
The label prediction module is used for constructing an original classification model comprising two layers of classification models, performing attention activation on the original conductive foam cotton image training set by using a first layer of classification model in the original classification model based on an attention mechanism to obtain an attention activation map set, performing type classification on the attention activation map set to obtain a prediction type label, performing data amplification on the attention activation map set, and performing elastic classification on the amplified data by using a second layer of classification model in the original classification model to obtain a prediction elastic label;
the joint training module is used for carrying out cross entropy joint training on the first-layer classification model and the second-layer classification model based on the prediction type label and the prediction elastic label to obtain a standard classification model;
and the elasticity analysis module is used for acquiring a compressed conductive foam image to be identified and outputting the type result and the elasticity result of the compressed conductive foam image to be identified by utilizing the standard classification model.
In order to solve the above problem, the present invention also provides an electronic device, including:
a memory storing at least one computer program; and
and the processor executes the computer program stored in the memory to realize the conductive foam elasticity analysis method based on the image analysis.
In the embodiment, the elastic analysis can be accurately performed on the different types of conductive foam by acquiring the initial image sets and the corresponding compression deformation image sets of the different types of conductive foam and calculating the deformation amount of the conductive foam in the compression deformation image sets based on a digital image correlation method. Meanwhile, the original conductive foam cotton image training set is subjected to attention activation based on an attention mechanism, the obtained attention activation graph set is used for training the first-layer classification model, and the data expanded by the attention activation graph set is used for training the second classification model, so that the trained standard classification model can simultaneously output type results and elastic results, and the accuracy and the efficiency of the conductive foam cotton elastic analysis are improved. Therefore, the method, the device, the electronic equipment and the computer-readable storage medium for analyzing the elasticity of the conductive foam based on the image analysis can improve the efficiency of analyzing the elasticity of the conductive foam.
Drawings
Fig. 1 is a schematic flow chart of a method for analyzing elasticity of a conductive foam based on image analysis according to an embodiment of the present invention;
fig. 2 is a functional block diagram of an apparatus for analyzing elasticity of a conductive foam based on image analysis according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an electronic device for implementing the image analysis-based conductive foam elasticity analysis method according to an embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The embodiment of the application provides a conductive foam elasticity analysis method based on image analysis. The execution subject of the conductive foam elasticity analysis method based on image analysis includes, but is not limited to, at least one of electronic devices such as a server, a terminal and the like that can be configured to execute the method provided by the embodiments of the present application. In other words, the method for analyzing the elasticity of the conductive foam based on image analysis may be performed by software or hardware installed in a terminal device or a server device, and the software may be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like. The server may be an independent server, or may be a cloud server that provides basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a Network service, cloud communication, a middleware service, a domain name service, a security service, a Content Delivery Network (CDN), a big data and artificial intelligence platform, and the like.
Fig. 1 is a schematic flow chart of a method for analyzing elasticity of a conductive foam based on image analysis according to an embodiment of the present invention. In this embodiment, the method for analyzing elasticity of conductive foam based on image analysis includes:
s1, acquiring initial image sets of different types of conductive foam, and acquiring a compression deformation image set corresponding to the initial image sets.
In the embodiment of the invention, the conductive foam has various types in different fields due to the application universality, such as conductive cloth foam, aluminum foil foam, omnibearing conductive foam and the like. The initial image set refers to images of different types of conductive foam which are original and are not subjected to pressure application, the compression deformation image set refers to the fact that the different types of conductive foam are placed between two parallel flat plates and placed on a loading table, a pressure head of a loading device is connected to a load sensor which is calibrated in advance, a rigid pressure plate connected to the lower portion of the load sensor is used for loading a test piece (namely the conductive foam), continuous shooting is carried out through an imaging lens with a fixed focal length to obtain an image set, meanwhile, the images shot at different pressures are marked according to the types of the conductive foam and corresponding pressure values, and finally, the conductive foam losing resilience can also obtain a corresponding compression deformation image.
For example, for the conductive cotton cloth, the image without pressure applied on the loading table is the initial image, and the rest of the images with pressure applied are the corresponding compression deformation images.
And S2, calculating deformation quantities of the different types of conductive foam cotton based on a digital image correlation method according to the initial image set and the compression deformation image set, and constructing an original conductive foam cotton image training set according to the deformation quantities.
In the embodiment of the present invention, the Digital Image Correlation (DIC), which is also called a Digital speckle Correlation, is to obtain deformation information of an area of interest by correlating two Digital images before and after deformation of a test piece.
In detail, the calculating deformation amounts of the different types of conductive foam based on a digital image correlation method according to the initial image set and the compression deformation image set, and constructing an original conductive foam image training set according to the deformation amounts includes:
taking a region with a preset size in each initial image of the initial image set as a reference image region;
searching a deformation image area in a compression deformation image set corresponding to each initial image based on the reference image area, and calculating the similarity between the reference image area and the searched deformation image area;
determining the deformed image area with the similarity meeting the preset condition as a target image area;
calculating displacement amounts of the center points of the reference image area and the target image area based on a preset iteration method, and taking the displacement amounts as deformation amounts;
and constructing a deformation curve based on the deformation quantity, and marking the images in the initial image set and the compression deformation image set by using the deformation curve to obtain an original conductive foam image training set.
In an alternative embodiment of the present invention, for a certain conductive foam a, a certain point is selected in the initial imageSelecting a rectangle with the size of 2M to 2M as a central point as a reference image area, searching the reference image area in each deformation image for the compression deformation image set corresponding to the initial image, and calculating the normalized minimum square distance between the reference image area and the searched deformation image areaAs the degree of similarity, determiningAnd the minimum deformation image area is the target image area, and the displacement of the central point is solved by a Newton-Raphson iteration method.
In an optional embodiment of the present invention, the similarity between the reference image region and the searched deformation image region is calculated by using the following formula:
wherein, the first and the second end of the pipe are connected with each other,the degree of similarity is expressed in terms of the degree of similarity,which represents a region of the reference image,a region of the deformed image is represented,representing a point in the region of the reference image,representing a point in the deformed image area,representing the gray scale of a point in the reference image area,representing the average gray value of the reference image area,representing the gray scale of a point in the deformed image region,representing the mean gray value of the deformed image area.
Further, the constructing a deformation curve based on the deformation amount, and labeling the images in the initial image set and the compressed deformation image set by using the deformation curve to obtain an original conductive foam cotton image training set includes:
mapping the deformation amount and the pressure value corresponding to the deformation amount to a pre-constructed coordinate system;
fitting the data in the coordinate system to obtain the deformation curve;
and carrying out gradient division on the deformation curve, and labeling the images in the initial image set and the compressed deformation image set by using a deformation range and a pressure value range corresponding to each gradient to obtain an original conductive foam image training set.
In an optional embodiment of the present invention, for example, for the conductive foam a, 1 initial image and 9 deformation images exist, the deformation amount of the initial image is labeled as 0, and the deformation amount range and the pressure value range of the other deformation images are labeled according to a gradient of 0.1mm, so as to obtain an original conductive foam image training set.
S3, constructing an original classification model comprising two layers of classification models, performing attention activation on the original conductive foam image training set by using a first layer of classification model in the original classification model based on an attention mechanism to obtain an attention activation image set, and performing type classification on the attention activation image set to obtain a prediction type label.
In the embodiment of the invention, as the types of the conductive foam are more, two layers of classification models are used for identification, wherein the first layer of classification model comprises a feature extraction module, an attention module, a pooling module and a classifier, the second layer of classification model comprises a feature extraction module, a pooling module and a classifier, the first layer of classification model is used for identifying the types of the conductive foam, and the second layer of classification model is used for identifying the deformation and the pressure in the image.
In an optional embodiment of the present invention, the feature extraction module may be a common CNN backbone network, such as Res Net, VGG-Net, and the like, and the classifier may be a full connection layer without a bias item.
In detail, the performing, by using a first-layer classification model in the original classification models, attention activation on the original conductive foam image training set based on an attention mechanism to obtain an attention activation map set, and performing type classification on the attention activation map set to obtain a prediction type label includes:
extracting the characteristics of the images in the original conductive foam image training set by using a characteristic extraction module of the first layer of classification model to obtain a characteristic image set;
performing attention activation on the images in the feature image set by using an attention module of the first-layer classification model to obtain an attention activation image set;
performing global average pooling on the attention activation map set by using a pooling module of the first-layer classification model to obtain a first feature vector;
and performing type classification on the first feature vector by using a classifier of the first-layer classification model to obtain the prediction type label.
In the embodiment of the invention, the expression capability of the feature vector on the complex visual mode can be improved through an attention mechanism, so that the classification effect is improved. And after the attention activation graph is obtained at the same time, extracting features from the attention activation graph by using global average pooling, and using feature vectors output by the global average pooling for final classification.
And S4, performing data augmentation on the attention activation image set, and performing elastic classification on augmented data by using a second-layer classification model in the original classification model to obtain a predicted elastic label.
In the embodiment of the present invention, each channel in the attention activation map tends to capture a feature of the original image that is helpful for classification, so the region with a large response in the activation map generally corresponds to the region of the original image where the feature of the original image that is helpful for classification is located, i.e., the discriminant region, and the data augmentation is to acquire a plurality of discriminant regions and exclude the influence of other regions (i.e., the non-discriminant regions).
Specifically, the data augmentation on the attention activation atlas and the elastic classification on the augmented data by using a second-layer classification model in the original classification model to obtain a predicted elastic label include:
performing up-sampling on each channel of the images in the attention activation image set to obtain a channel image set;
determining the position of a pixel in the channel image set, which is larger than a preset threshold value, as a discriminant region, and performing adaptive cutting on the discriminant region to obtain an augmented image;
extracting an augmented feature image of the augmented image by using a feature extraction module of the second-layer classification model;
performing global average pooling on the augmented feature images by using a pooling module of the second-layer classification model to obtain a second feature vector;
and performing elastic classification on the second feature vector by using a classifier of the second-layer classification model to obtain the prediction elastic label.
In an optional embodiment of the present invention, the predicted elastic label comprises a predicted deformation amount and a predicted pressure value.
In an optional embodiment of the present invention, each channel of the attention activation map is up-sampled to obtain the same length and width as the original image, the pixel of each channel of the up-sampled activation map corresponds to the pixel position of the original image one by one, a threshold is set for each channel, the pixels larger than the threshold on each channel are found out, and the positions corresponding to the pixels in the original image are regarded as discriminant areas.
The number of the augmented images is the same as the number M of channels of the attention activation map, but too many augmented samples are generated in the same image, so that the model is possibly overfitting, and therefore a few areas can be selected from the M discriminant areas for adaptive cropping.
S5, performing cross entropy joint training on the first layer classification model and the second layer classification model based on the prediction type label and the prediction elastic label to obtain a standard classification model.
In the embodiment of the invention, the model can be trained by using a Softmax cross entropy loss function, so that the convergence of the model is accelerated.
In detail, the performing cross-entropy joint training on the first-layer classification model and the second-layer classification model based on the prediction type label and the prediction elastic label to obtain a standard classification model includes:
calculating the joint loss of the first-layer classification model and the second-layer classification model based on a Softmax cross entropy loss function according to the prediction type label and the prediction elastic label;
if the joint loss is larger than a preset loss threshold value, adjusting model parameters in the original classification model, returning to the step of performing attention activation on the original conductive foam image training set by using a first-layer classification model in the original classification model based on an attention mechanism to obtain an attention activation image set, and obtaining the standard classification model until the joint loss is smaller than or equal to the preset loss threshold value.
In an optional embodiment of the present invention, the joint loss may be calculated by using the following Softmax cross entropy loss function:
wherein the content of the first and second substances,the loss of the union is expressed as,a loss value representing a first-level classification model,a first feature vector is represented that is representative of,a label representing the type of prediction is provided,a penalty value representing a second level classification model, a second feature vector,it is shown that the predicted elastic label,the weight is preset to be a preset weight,which is indicative of the number of training images,the feature vector is represented by a vector of features,a prediction tag is represented that is a label of the prediction,is a sign function, wherein the predicted tag is the same as the true tag1, when the predicted tag is not the same as the real tagIs a non-volatile organic compound (I) with a value of 0,is shown asThe feature vectors of the individual training images,the number of the labels is indicated and,represents the first in the classifierThe weight of each of the tags is determined,indicating transposition.
And S6, acquiring a compressed conductive foam image to be identified, and outputting the type result and the elastic result of the compressed conductive foam image to be identified by using the standard classification model.
In the embodiment of the invention, the standard classification model trains the first-layer classification model through an attention mechanism, and trains the second-layer classification model through the sample augmented by the activation map, so that the characteristics of the image can be recognized in a finer granularity, and the recognition rate of the model on the type and elasticity of the conductive foam is improved.
In the embodiment, the elastic analysis can be accurately performed on the different types of conductive foam by acquiring the initial image sets and the corresponding compression deformation image sets of the different types of conductive foam and calculating the deformation amount of the conductive foam in the compression deformation image sets based on a digital image correlation method. Meanwhile, the original conductive foam cotton image training set is subjected to attention activation based on an attention mechanism, the obtained attention activation graph set is used for training the first-layer classification model, and the data expanded by the attention activation graph set is used for training the second classification model, so that the trained standard classification model can simultaneously output type results and elastic results, and the accuracy and the efficiency of the conductive foam cotton elastic analysis are improved. Therefore, the method for analyzing the elasticity of the conductive foam based on the image analysis can improve the efficiency of analyzing the elasticity of the conductive foam.
Fig. 2 is a functional block diagram of an apparatus for analyzing elasticity of a conductive foam based on image analysis according to an embodiment of the present invention.
The device 100 for analyzing elasticity of conductive foam based on image analysis can be installed in electronic equipment. According to the realized functions, the device 100 for analyzing the elasticity of the conductive foam based on image analysis may include a training image construction module 101, a label prediction module 102, a joint training module 103, and an elasticity analysis module 104. The module of the present invention, which may also be referred to as a unit, refers to a series of computer program segments that can be executed by a processor of an electronic device and that can perform a fixed function, and that are stored in a memory of the electronic device.
In the present embodiment, the functions regarding the respective modules/units are as follows:
the training image construction module 101 is configured to acquire initial image sets of different types of conductive foam, acquire compression deformation image sets corresponding to the initial image sets, calculate deformation amounts of the different types of conductive foam based on a digital image correlation method according to the initial image sets and the compression deformation image sets, and construct an original conductive foam image training set according to the deformation amounts;
the label prediction module 102 is configured to construct an original classification model including two layers of classification models, perform attention activation on the original conductive foam cotton image training set based on an attention mechanism by using a first layer of classification model in the original classification model to obtain an attention activation map set, perform type classification on the attention activation map set to obtain a prediction type label, perform data amplification on the attention activation map set, and perform elastic classification on the amplified data by using a second layer of classification model in the original classification model to obtain a prediction elastic label;
the joint training module 103 is configured to perform cross-entropy joint training on the first-layer classification model and the second-layer classification model based on the prediction type label and the prediction elastic label to obtain a standard classification model;
the elasticity analysis module 104 is configured to obtain a compressed conductive foam image to be identified, and output a type result and an elasticity result of the compressed conductive foam image to be identified by using the standard classification model.
In detail, the specific implementation of each module of the device 100 for analyzing elasticity of conductive foam based on image analysis is as follows:
the method comprises the steps of firstly, obtaining initial image sets of different types of conductive foam, and obtaining compression deformation image sets corresponding to the initial image sets.
In the embodiment of the invention, the conductive foam has various types in different fields due to the application universality, such as conductive foam, aluminum foil foam, omnibearing conductive foam and the like. The initial image set refers to images of different types of conductive foam which are original and are not subjected to pressure application, the compression deformation image set refers to the fact that the different types of conductive foam are placed between two parallel flat plates and placed on a loading table, a pressure head of a loading device is connected to a load sensor which is calibrated in advance, a rigid pressure plate connected to the lower portion of the load sensor is used for loading a test piece (namely the conductive foam), continuous shooting is carried out through an imaging lens with a fixed focal length to obtain an image set, meanwhile, the images shot at different pressures are marked according to the types of the conductive foam and corresponding pressure values, and finally, the conductive foam losing resilience can also obtain a corresponding compression deformation image.
For example, for a conductive cloth foam, the image without pressure applied on the loading table is the initial image, and the rest of the images with pressure applied are the corresponding compression set images.
And secondly, calculating deformation quantities of the different types of conductive foam cotton based on a digital image correlation method according to the initial image set and the compression deformation image set, and constructing an original conductive foam cotton image training set according to the deformation quantities.
In the embodiment of the present invention, the Digital Image Correlation (DIC), which is also called a Digital speckle Correlation, is to obtain deformation information of an area of interest by correlating two Digital images before and after deformation of a test piece.
In detail, the calculating deformation amounts of the different types of conductive foam based on a digital image correlation method according to the initial image set and the compression deformation image set, and constructing an original conductive foam image training set according to the deformation amounts includes:
taking a region with a preset size in each initial image of the initial image set as a reference image region;
searching a deformation image area in a compression deformation image set corresponding to each initial image based on the reference image area, and calculating the similarity between the reference image area and the searched deformation image area;
determining the deformed image area with the similarity meeting the preset condition as a target image area;
calculating displacement amounts of the center points of the reference image area and the target image area based on a preset iteration method, and taking the displacement amounts as deformation amounts;
and constructing a deformation curve based on the deformation quantity, and marking the images in the initial image set and the compression deformation image set by using the deformation curve to obtain an original conductive foam image training set.
In an optional embodiment of the invention, for a certain conductive foam A, a certain point is selected in the initial imageSelecting a rectangle with the size of 2M to 2M as a central point as a reference image area, searching the reference image area in each deformation image for the compression deformation image set corresponding to the initial image, and calculating the normalized minimum square distance between the reference image area and the searched deformation image areaAsDegree of similarity, determiningAnd the minimum deformation image area is the target image area, and the displacement of the central point is solved by a Newton-Raphson iteration method.
In an optional embodiment of the present invention, the similarity between the reference image region and the searched deformation image region is calculated by using the following formula:
wherein the content of the first and second substances,representing the similarity, representing a reference image region,a region of the deformed image is represented,representing a point in the region of the reference image,representing a point in the deformed image area,representing the gray scale of a point in the reference image area,representing the average gray value of the reference image area,representing the gray scale of the point in the deformed image region,representing the mean gray value of the deformed image area.
Further, the constructing a deformation curve based on the deformation amount, and labeling the images in the initial image set and the compressed deformation image set by using the deformation curve to obtain an original conductive foam cotton image training set includes:
mapping the deformation amount and the pressure value corresponding to the deformation amount to a pre-constructed coordinate system;
fitting the data in the coordinate system to obtain the deformation curve;
and carrying out gradient division on the deformation curve, and labeling the images in the initial image set and the compression deformation image set by using a deformation range and a pressure value range corresponding to each gradient to obtain an original conductive foam image training set.
In an optional embodiment of the present invention, for example, for the conductive foam a, 1 initial image and 9 deformation images exist, the deformation amount of the initial image is labeled as 0, and the deformation amount range and the pressure value range of the other deformation images are labeled according to a gradient of 0.1mm, so as to obtain an original conductive foam image training set.
And thirdly, constructing an original classification model comprising two layers of classification models, performing attention activation on the original conductive foam image training set by using a first layer of classification model in the original classification model based on an attention mechanism to obtain an attention activation image set, and performing type classification on the attention activation image set to obtain a prediction type label.
In the embodiment of the invention, as the types of the conductive foam are more, two layers of classification models are used for identification, wherein the first layer of classification model comprises a feature extraction module, an attention module, a pooling module and a classifier, the second layer of classification model comprises a feature extraction module, a pooling module and a classifier, the first layer of classification model is used for identifying the types of the conductive foam, and the second layer of classification model is used for identifying the deformation and the pressure in the image.
In an optional embodiment of the present invention, the feature extraction module may be a common CNN backbone network, such as Res Net, VGG-Net, and the like, and the classifier may be a full connection layer without a bias item.
In detail, the performing attention activation on the original conductive foam image training set by using a first-layer classification model in the original classification model based on an attention mechanism to obtain an attention activation map set, and performing type classification on the attention activation map set to obtain a prediction type label includes:
extracting the characteristics of the images in the original conductive foam image training set by using a characteristic extraction module of the first layer of classification model to obtain a characteristic image set;
performing attention activation on the images in the feature image set by using an attention module of the first-layer classification model to obtain an attention activation image set;
performing global average pooling on the attention activation map set by using a pooling module of the first-layer classification model to obtain a first feature vector;
and performing type classification on the first feature vector by using a classifier of the first-layer classification model to obtain the prediction type label.
In the embodiment of the invention, the expression capability of the feature vector on the complex visual mode can be improved through an attention mechanism, so that the classification effect is improved. And after obtaining the attention activation graph, extracting features from the attention activation graph by using global average pooling, and using feature vectors output by the global average pooling for final classification.
And step four, performing data augmentation on the attention activation graph set, and performing elastic classification on the augmented data by using a second-layer classification model in the original classification model to obtain a prediction elastic label.
In the embodiment of the present invention, each channel in the attention activation map tends to capture a feature of the original image that is helpful for classification, so the region with a large response in the activation map generally corresponds to the region of the original image where the feature of the original image that is helpful for classification is located, i.e., the discriminant region, and the data augmentation is to acquire a plurality of discriminant regions and exclude the influence of other regions (i.e., the non-discriminant regions).
In detail, the data augmenting the attention activation atlas and elastically classifying the augmented data by using a second-layer classification model in the original classification model to obtain a predicted elastic label includes:
performing up-sampling on each channel of the images in the attention activation image set to obtain a channel image set;
determining the position of a pixel in the channel image set, which is larger than a preset threshold value, as a discriminant region, and performing adaptive cutting on the discriminant region to obtain an augmented image;
extracting an augmented feature image of the augmented image by using a feature extraction module of the second-layer classification model;
performing global average pooling on the augmented feature images by using a pooling module of the second-layer classification model to obtain a second feature vector;
and performing elastic classification on the second feature vector by using a classifier of the second-layer classification model to obtain the prediction elastic label.
In an optional embodiment of the present invention, the predicted elastic label comprises a predicted deformation amount and a predicted pressure value.
In an optional embodiment of the present invention, each channel of the attention activation map is up-sampled to obtain the same length and width as the original image, the pixel of each channel of the up-sampled activation map corresponds to the pixel position of the original image one by one, a threshold is set for each channel, the pixels larger than the threshold on each channel are found out, and the positions corresponding to the pixels in the original image are regarded as discriminant areas.
The number of the augmented images is the same as the number M of channels of the attention activation map, but too many augmented samples are generated in the same image, so that the model is possibly overfitting, and therefore a few areas can be selected from the M discriminant areas for adaptive cropping.
And fifthly, performing cross entropy joint training on the first-layer classification model and the second-layer classification model based on the prediction type label and the prediction elastic label to obtain a standard classification model.
In the embodiment of the invention, the model can be trained by using a Softmax cross entropy loss function, so that the convergence of the model is accelerated.
In detail, the performing cross-entropy joint training on the first-layer classification model and the second-layer classification model based on the prediction type label and the prediction elastic label to obtain a standard classification model includes:
calculating the joint loss of the first-layer classification model and the second-layer classification model based on a Softmax cross entropy loss function according to the prediction type label and the prediction elastic label;
and if the joint loss is larger than a preset loss threshold, adjusting model parameters in the original classification model, returning to the step of performing attention activation on the original conductive foam image training set by using a first-layer classification model in the original classification model based on an attention mechanism to obtain an attention activation image set, and obtaining the standard classification model until the joint loss is smaller than or equal to the preset loss threshold.
In an optional embodiment of the present invention, the joint loss may be calculated by using the following Softmax cross entropy loss function:
wherein the content of the first and second substances,the loss of the union is expressed as,a loss value representing a first-level classification model,a first feature vector is represented that represents a first feature vector,a label representing the type of prediction is provided,representing the loss value of the second-level classification model,a second feature vector is represented that is representative of,it is shown that the predicted elastic label,the weight is preset to be a preset weight,which is indicative of the number of training images,the feature vector is represented by a vector of features,a prediction tag is represented that is a label of the prediction,is a sign function, wherein the predicted tag is the same as the true tag1, when the predicted tag is not the same as the real tagIs a non-volatile organic compound (I) with a value of 0,is shown asThe feature vectors of the individual training images,the number of the labels is indicated and,represents the first in the classifierThe weight of each of the tags is determined,indicating transposition.
And step six, acquiring a compressed conductive foam image to be identified, and outputting the type result and the elastic result of the compressed conductive foam image to be identified by using the standard classification model.
In the embodiment of the invention, the standard classification model trains the first layer of classification model through an attention mechanism, and trains the second layer of classification model through the sample amplified by the activation map, so that the characteristics of the image can be identified in a finer granularity, and the identification rate of the model on the type and elasticity of the conductive foam is improved.
In the embodiment, the elastic analysis can be accurately performed on the different types of conductive foam by acquiring the initial image sets and the corresponding compression deformation image sets of the different types of conductive foam and calculating the deformation amount of the conductive foam in the compression deformation image sets based on a digital image correlation method. Meanwhile, the original conductive foam cotton image training set is subjected to attention activation based on an attention mechanism, the obtained attention activation graph set is used for training the first-layer classification model, and the data expanded by the attention activation graph set is used for training the second classification model, so that the trained standard classification model can simultaneously output type results and elastic results, and the accuracy and the efficiency of the conductive foam cotton elastic analysis are improved. Therefore, the device for analyzing the elasticity of the conductive foam based on the image analysis can improve the efficiency of analyzing the elasticity of the conductive foam.
Fig. 3 is a schematic structural diagram of an electronic device for implementing the method for analyzing elasticity of conductive foam based on image analysis according to an embodiment of the present invention.
The electronic device may include a processor 10, a memory 11, a communication interface 12, and a bus 13, and may further include a computer program, such as a conductive foam elasticity analysis program based on image analysis, stored in the memory 11 and executable on the processor 10.
The memory 11 includes at least one type of readable storage medium, which includes flash memory, removable hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device, for example a removable hard disk of the electronic device. The memory 11 may also be an external storage device of the electronic device in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, provided on the electronic device. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device. The memory 11 may be used not only to store application software installed in the electronic device and various types of data, such as codes of a program for analyzing elasticity of a conductive foam based on image analysis, etc., but also to temporarily store data that has been output or will be output.
The processor 10 may be formed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or may be formed of a plurality of integrated circuits packaged with the same function or different functions, including one or more Central Processing Units (CPUs), microprocessors, digital Processing chips, graphics processors, and combinations of various control chips. The processor 10 is a Control Unit (Control Unit) of the electronic device, connects various components of the electronic device by using various interfaces and lines, and executes various functions and processes data of the electronic device by running or executing programs or modules (e.g., a program for analyzing elasticity of a conductive foam based on image analysis, etc.) stored in the memory 11 and calling data stored in the memory 11.
The communication interface 12 is used for communication between the electronic device and other devices, and includes a network interface and a user interface. Optionally, the network interface may include a wired interface and/or a wireless interface (e.g., WI-FI interface, bluetooth interface, etc.), which are typically used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a Display (Display), an input unit such as a Keyboard (Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable, among other things, for displaying information processed in the electronic device and for displaying a visualized user interface.
The bus 13 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus 13 may be divided into an address bus, a data bus, a control bus, etc. The bus 13 is arranged to enable connection communication between the memory 11 and at least one processor 10 or the like.
Fig. 3 shows only an electronic device having components, and those skilled in the art will appreciate that the structure shown in fig. 3 does not constitute a limitation of the electronic device, and may include fewer or more components than those shown, or some components may be combined, or a different arrangement of components.
For example, although not shown, the electronic device may further include a power supply (such as a battery) for supplying power to each component, and preferably, the power supply may be logically connected to the at least one processor 10 through a power management device, so that functions of charge management, discharge management, power consumption management and the like are realized through the power management device. The power supply may also include any component of one or more dc or ac power sources, recharging devices, power failure detection circuitry, power converters or inverters, power status indicators, and the like. The electronic device may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
Further, the electronic device may further include a network interface, and optionally, the network interface may include a wired interface and/or a wireless interface (such as a WI-FI interface, a bluetooth interface, etc.), which are generally used to establish a communication connection between the electronic device and other electronic devices.
Optionally, the electronic device may further comprise a user interface, which may be a Display (Display), an input unit (such as a Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable, among other things, for displaying information processed in the electronic device and for displaying a visualized user interface.
It is to be understood that the described embodiments are for purposes of illustration only and that the scope of the appended claims is not limited to such structures.
The image analysis-based conductive foam elasticity analysis program stored in the memory 11 of the electronic device is a combination of a plurality of instructions, and when running in the processor 10, can realize that:
acquiring initial image sets of different types of conductive foam cotton and acquiring a compression deformation image set corresponding to the initial image sets;
calculating deformation quantities of the different types of conductive foam cotton based on a digital image correlation method according to the initial image set and the compression deformation image set, and constructing an original conductive foam cotton image training set according to the deformation quantities;
constructing an original classification model comprising two layers of classification models, performing attention activation on the original conductive foam image training set by utilizing a first layer of classification model in the original classification model based on an attention mechanism to obtain an attention activation image set, and performing type classification on the attention activation image set to obtain a prediction type label;
performing data amplification on the attention activation graph set, and performing elastic classification on the amplified data by using a second-layer classification model in the original classification model to obtain a prediction elastic label;
performing cross entropy joint training on the first-layer classification model and the second-layer classification model based on the prediction type label and the prediction elastic label to obtain a standard classification model;
and acquiring a compressed conductive foam image to be identified, and outputting the type result and the elastic result of the compressed conductive foam image to be identified by using the standard classification model.
Specifically, the specific implementation method of the processor 10 for the instruction may refer to the description of the relevant steps in the embodiment corresponding to the drawing, and is not repeated here.
Further, the electronic device integrated module/unit, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in a computer readable storage medium. The computer readable storage medium may be volatile or non-volatile. For example, the computer-readable medium may include: any entity or device capable of carrying said computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM).
The present invention also provides a computer-readable storage medium, storing a computer program which, when executed by a processor of an electronic device, may implement:
acquiring initial image sets of different types of conductive foam cotton and acquiring a compression deformation image set corresponding to the initial image sets;
calculating deformation quantities of the different types of conductive foam cotton based on a digital image correlation method according to the initial image set and the compression deformation image set, and constructing an original conductive foam cotton image training set according to the deformation quantities;
constructing an original classification model comprising two layers of classification models, performing attention activation on the original conductive foam image training set by using a first layer of classification model in the original classification model based on an attention mechanism to obtain an attention activation image set, and performing type classification on the attention activation image set to obtain a prediction type label;
performing data amplification on the attention activation graph set, and performing elastic classification on the amplified data by using a second-layer classification model in the original classification model to obtain a prediction elastic label;
performing cross entropy joint training on the first-layer classification model and the second-layer classification model based on the prediction type label and the prediction elastic label to obtain a standard classification model;
and acquiring a compressed conductive foam image to be identified, and outputting the type result and the elastic result of the compressed conductive foam image to be identified by using the standard classification model.
In the several embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
The embodiment of the application can acquire and process related data based on an artificial intelligence technology. Among them, Artificial Intelligence (AI) is a theory, method, technique and application system that simulates, extends and expands human Intelligence using a digital computer or a machine controlled by a digital computer, senses the environment, acquires knowledge and uses the knowledge to obtain the best result.
The artificial intelligence infrastructure generally includes technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a robot technology, a biological recognition technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and the like.
Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware. The terms second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.
Claims (10)
1. A conductive foam elasticity analysis method based on image analysis is characterized by comprising the following steps:
acquiring initial image sets of different types of conductive foam cotton and acquiring a compression deformation image set corresponding to the initial image sets;
calculating the deformation quantity of the different types of conductive foam based on a digital image correlation method according to the initial image set and the compression deformation image set, and constructing an original conductive foam image training set according to the deformation quantity;
constructing an original classification model comprising two layers of classification models, performing attention activation on the original conductive foam image training set by utilizing a first layer of classification model in the original classification model based on an attention mechanism to obtain an attention activation image set, and performing type classification on the attention activation image set to obtain a prediction type label;
performing data amplification on the attention activation graph set, and performing elastic classification on the amplified data by using a second-layer classification model in the original classification model to obtain a prediction elastic label;
performing cross entropy joint training on the first layer classification model and the second layer classification model based on the prediction type label and the prediction elastic label to obtain a standard classification model;
and acquiring a compressed conductive foam image to be identified, and outputting the type result and the elastic result of the compressed conductive foam image to be identified by using the standard classification model.
2. The method for elastic analysis of conductive foam based on image analysis as claimed in claim 1, wherein the step of calculating deformation quantities of different types of conductive foam based on a digital image correlation method according to the initial image set and the compression deformation image set and constructing an original conductive foam image training set according to the deformation quantities comprises:
taking a region with a preset size in each initial image of the initial image set as a reference image region;
searching a deformation image area in a compression deformation image set corresponding to each initial image based on the reference image area, and calculating the similarity between the reference image area and the searched deformation image area;
determining the deformed image area with the similarity meeting the preset condition as a target image area;
calculating displacement amounts of the center points of the reference image area and the target image area based on a preset iteration method, and taking the displacement amounts as deformation amounts;
and constructing a deformation curve based on the deformation quantity, and marking the images in the initial image set and the compression deformation image set by using the deformation curve to obtain an original conductive foam image training set.
3. The method for analyzing elasticity of conductive foam based on image analysis according to claim 2, wherein the constructing a deformation curve based on the deformation amount, labeling the images in the initial image set and the compression deformation image set by using the deformation curve to obtain an original conductive foam image training set comprises:
mapping the deformation quantity and the pressure value corresponding to the deformation quantity to a pre-constructed coordinate system;
fitting the data in the coordinate system to obtain the deformation curve;
and carrying out gradient division on the deformation curve, and labeling the images in the initial image set and the compressed deformation image set by using a deformation range and a pressure value range corresponding to each gradient to obtain an original conductive foam image training set.
4. The method for analyzing elasticity of conductive foam based on image analysis as claimed in claim 2, wherein the calculating the similarity between the reference image area and the searched deformation image area comprises:
calculating the similarity between the reference image area and the searched deformation image area by using the following formula:
wherein the content of the first and second substances,the degree of similarity is represented by a graph,which represents a region of the reference image,a region of the deformed image is represented,representing a point in the region of the reference image,representing a point in the deformed image area,representing the gray scale of a point in the reference image area,representing the average gray value of the reference image area,representing the gray scale of the point in the deformed image region,representing the mean gray value of the deformed image area.
5. The method for analyzing elasticity of conductive foam based on image analysis as claimed in claim 1, wherein the performing attention activation on the original conductive foam image training set based on an attention mechanism by using a first-layer classification model in the original classification model to obtain an attention activation map set, and performing type classification on the attention activation map set to obtain a prediction type label comprises:
extracting the characteristics of the images in the original conductive foam image training set by using a characteristic extraction module of the first layer of classification model to obtain a characteristic image set;
performing attention activation on the images in the feature image set by using an attention module of the first-layer classification model to obtain an attention activation image set;
performing global average pooling on the attention activation map set by using a pooling module of the first-layer classification model to obtain a first feature vector;
and performing type classification on the first feature vector by using a classifier of the first-layer classification model to obtain the prediction type label.
6. The method for analyzing elasticity of conductive foam cotton based on image analysis as claimed in claim 1, wherein the step of performing data augmentation on the attention activation atlas and performing elastic classification on augmented data by using a second-layer classification model in the original classification model to obtain a predicted elastic label comprises the following steps:
performing up-sampling on each channel of the images in the attention activation image set to obtain a channel image set;
determining the position of a pixel in the channel image set, which is larger than a preset threshold value, as a discriminant region, and performing adaptive cutting on the discriminant region to obtain an augmented image;
extracting an augmented feature image of the augmented image by using a feature extraction module of the second-layer classification model;
performing global average pooling on the augmented feature images by using a pooling module of the second-layer classification model to obtain a second feature vector;
and performing elastic classification on the second feature vector by using a classifier of the second-layer classification model to obtain the predicted elastic label.
7. The method as claimed in claim 1, wherein the cross-entropy joint training of the first layer classification model and the second layer classification model based on the prediction type label and the prediction elastic label to obtain a standard classification model comprises:
calculating the joint loss of the first-layer classification model and the second-layer classification model based on a Softmax cross entropy loss function according to the prediction type label and the prediction elastic label;
if the joint loss is larger than a preset loss threshold value, adjusting model parameters in the original classification model, returning to the step of performing attention activation on the original conductive foam image training set by using a first-layer classification model in the original classification model based on an attention mechanism to obtain an attention activation image set, and obtaining the standard classification model until the joint loss is smaller than or equal to the preset loss threshold value.
8. The image analysis-based elastic analysis method for conductive foam according to claim 7, wherein the Softmax cross entropy loss function is as follows:
wherein the content of the first and second substances,the loss of the union is expressed as,a loss value representing a first-level classification model,a first feature vector is represented that represents a first feature vector,a label representing the type of prediction is provided,representing the loss value of the second-level classification model,a second feature vector is represented that represents a second feature vector,it is shown that the predicted elastic label,the weight is preset to be a preset weight,which is indicative of the number of training images,the feature vector is represented by a vector of features,a prediction tag is represented that is a label of the prediction,is a sign function, wherein the predicted tag is the same as the true tag1, when the predicted tag is not the same as the real tagIs a non-volatile organic compound (I) with a value of 0,is shown asThe feature vectors of the individual training images,the number of the labels is indicated and,represents the first in the classifierThe weight of each of the tags is determined,indicating transposition.
9. An image analysis-based device for analyzing elasticity of conductive foam, which is characterized by comprising:
the training image construction module is used for acquiring initial image sets of different types of conductive foam, acquiring compression deformation image sets corresponding to the initial image sets, calculating deformation quantities of the different types of conductive foam based on a digital image correlation method according to the initial image sets and the compression deformation image sets, and constructing an original conductive foam image training set according to the deformation quantities
The label prediction module is used for constructing an original classification model comprising two layers of classification models, performing attention activation on the original conductive foam cotton image training set by using a first layer of classification model in the original classification model based on an attention mechanism to obtain an attention activation map set, performing type classification on the attention activation map set to obtain a prediction type label, performing data amplification on the attention activation map set, and performing elastic classification on the amplified data by using a second layer of classification model in the original classification model to obtain a prediction elastic label;
the joint training module is used for carrying out cross entropy joint training on the first layer classification model and the second layer classification model based on the prediction type label and the prediction elastic label to obtain a standard classification model;
and the elasticity analysis module is used for acquiring a compressed conductive foam image to be identified and outputting the type result and the elasticity result of the compressed conductive foam image to be identified by using the standard classification model.
10. An electronic device, characterized in that the electronic device comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the method of image analysis based analysis of elasticity of conductive foam according to any one of claims 1 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210737042.8A CN114842274B (en) | 2022-06-27 | 2022-06-27 | Conductive foam elasticity analysis method, device and equipment based on image analysis |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210737042.8A CN114842274B (en) | 2022-06-27 | 2022-06-27 | Conductive foam elasticity analysis method, device and equipment based on image analysis |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114842274A CN114842274A (en) | 2022-08-02 |
CN114842274B true CN114842274B (en) | 2022-09-06 |
Family
ID=82573302
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210737042.8A Active CN114842274B (en) | 2022-06-27 | 2022-06-27 | Conductive foam elasticity analysis method, device and equipment based on image analysis |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114842274B (en) |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108244874B (en) * | 2018-02-14 | 2024-04-19 | 深圳市三分之一睡眠科技有限公司 | Automatic adjusting bed |
WO2020056405A1 (en) * | 2018-09-14 | 2020-03-19 | Northwestern University | Data-driven representation and clustering discretization method and system for design optimization and/or performance prediction of material systems and applications of same |
US11195275B2 (en) * | 2019-10-16 | 2021-12-07 | International Business Machines Corporation | Methods to induce non-rigid mesh transformation in-variance to CNN based medical imaging classifiers |
CN111339835A (en) * | 2020-02-06 | 2020-06-26 | 京东方科技集团股份有限公司 | Fingerprint discernment display module assembly, display device and electronic equipment under screen |
CN214668245U (en) * | 2021-01-07 | 2021-11-09 | 深圳市鑫诺诚科技有限公司 | Softness detection device for conductive foam processing |
CN113744271B (en) * | 2021-11-08 | 2022-02-11 | 四川大学 | Neural network-based automatic optic nerve segmentation and compression degree measurement and calculation method |
CN114454194B (en) * | 2022-03-21 | 2024-01-12 | 深圳市普渡科技有限公司 | Service robot, robot paw control method, system and storage medium |
-
2022
- 2022-06-27 CN CN202210737042.8A patent/CN114842274B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN114842274A (en) | 2022-08-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110414344B (en) | Character classification method based on video, intelligent terminal and storage medium | |
CN112100425B (en) | Label labeling method and device based on artificial intelligence, electronic equipment and medium | |
CN112036292A (en) | Character recognition method and device based on neural network and readable storage medium | |
CN112507934A (en) | Living body detection method, living body detection device, electronic apparatus, and storage medium | |
CN112528908A (en) | Living body detection method, living body detection device, electronic apparatus, and storage medium | |
CN115457451B (en) | Constant temperature and humidity test box monitoring method and device based on Internet of things | |
CN115081025A (en) | Sensitive data management method and device based on digital middlebox and electronic equipment | |
CN115265545A (en) | Map matching navigation method, device, equipment and storage medium based on decision analysis | |
CN112200189A (en) | Vehicle type identification method and device based on SPP-YOLOv3 and computer readable storage medium | |
CN114708461A (en) | Multi-modal learning model-based classification method, device, equipment and storage medium | |
CN114022841A (en) | Personnel monitoring and identifying method and device, electronic equipment and readable storage medium | |
CN114049568A (en) | Object shape change detection method, device, equipment and medium based on image comparison | |
CN114842274B (en) | Conductive foam elasticity analysis method, device and equipment based on image analysis | |
CN112528903A (en) | Face image acquisition method and device, electronic equipment and medium | |
CN115690615A (en) | Deep learning target identification method and system for video stream | |
CN115205758A (en) | Intelligent conversion method and device based on video and text, electronic equipment and medium | |
CN113255456B (en) | Inactive living body detection method, inactive living body detection device, electronic equipment and storage medium | |
CN114463685A (en) | Behavior recognition method and device, electronic equipment and storage medium | |
CN114120347A (en) | Form verification method and device, electronic equipment and storage medium | |
CN114066664A (en) | Risk level assessment method, device, equipment and medium based on behavior portrait | |
CN113869385A (en) | Poster comparison method, device and equipment based on target detection and storage medium | |
CN112434601A (en) | Vehicle law violation detection method, device, equipment and medium based on driving video | |
CN112580644A (en) | Testing method and device based on video stream cutout time and readable storage medium | |
CN114495290A (en) | Living body detection method, living body detection device, living body detection equipment and storage medium | |
CN114186751A (en) | Building damage prediction method and device, electronic equipment and readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |