Cross-device stylized enhancement method and system for cement hydration microstructure image
Through the Transformer-based cross-device image enhancement model, combining position coding and style coding, the problem of cross-device stylized enhancement of cement hydrated microstructure images is solved, and the image quality and cost reduction of low-configuration CT equipment is improved, avoiding training Pattern crash problem in the process.
Patent Information
- Application Number
- CN202411782968.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2044-12-06
AI Technical Summary
The prior art cannot achieve cross-device-level stylized enhancement of cement hydrated microstructure images, the image quality collected by low-configuration CT equipment cannot be approaching high-configuration CT equipment, and traditional methods are prone to cement particle size, shape and Location changes, details and pattern crash problems.
Using a cross-device image enhancement model based on Transformer, cement hydrated microstructure images of low-configuration CT devices are processed through position coding and style coding, combining skeleton and style information for fusion, pre-training using transfer learning, and consistent with double-layer loops Sexual loss is trained to ensure cross-device stylized enhancement of images.
The image quality of low-configuration CT devices is improved, the imaging quality of high-configuration CT devices is approached, the imaging cost is reduced, and the model training process is stabilized, avoiding the loss of image detail information and pattern crashes.
Smart Images

Figure CN119251073A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of digital image processing, and in particular to a cross-device stylized enhancement method and system for cement hydration microstructure images. Background Art
[0002] The statements in this section merely mention background art related to the present invention and do not necessarily constitute prior art.
[0003] The microstructure of cement can be characterized in many ways, but only micro-CT scanners can obtain three-dimensional CT images of cement hydration microstructure without damaging the physical structure of the cement block itself. Research based on three-dimensional CT images can help researchers intuitively observe the changes of various substances in the cement hydration process and fundamentally understand the cement hydration mechanism.
[0004] The quality of CT images is affected by the advancement of CT equipment. The three-dimensional high-quality images produced by high-configuration CT equipment can provide more reliable and scientific data support for cement hydration research. High-configuration CT equipment uses more advanced imaging accessories, reconstruction algorithms, etc., which can obtain higher-quality CT images; however, this type of high-configuration CT equipment, whether in terms of equipment cost or imaging cost, far exceeds that of low-configuration CT equipment. For cement hydration research, the equipment in cement plant laboratories is usually low-configuration, and the quality of the CT images obtained needs to be improved.
[0005] Traditional methods of using artificial intelligence technology to enhance CT images, such as image denoising and image super-resolution, can enhance CT images to a certain extent, but they cannot achieve image enhancement across device levels. Image denoising is usually used to simulate the image quality enhancement from low-dose to high-dose scanning of the same CT device, which belongs to the enhancement within the image domain of the same device. Similarly, image super-resolution only focuses on expanding the granularity of CT images from the perspective of resolution, and cannot achieve enhancement between image domains from low-configuration devices to high-configuration devices.
[0006] The stylized image enhancement proposed in recent years can learn the style of the target image domain and convert the style of the source image domain into the style of the target image domain, but it is more applied to the artisticization of images and has not achieved cross-device stylized enhancement. At the same time, since three-dimensional cement CT images are typical homogeneous images, in the process of cross-device image stylized enhancement, the size, shape and position of cement particles are prone to changes, detailed texture is lost, and the model collapses during training, making it impossible to train normally. Summary of the invention
[0007] In order to address the deficiencies in the prior art, the present invention provides a cross-device stylized enhancement method, system, electronic device, computer storage medium and computer program product for cement hydration microstructure images. Based on a low-configuration CT device, an artificial intelligence-assisted computational imaging method is used to obtain a physical imaging quality close to that of a high-configuration CT device, thereby achieving cross-device image enhancement, improving the availability of low-configuration CT devices, and significantly reducing imaging costs.
[0008] In a first aspect, the present invention provides a cross-device stylization enhancement method for cement hydration microstructure images; A cross-device stylization enhancement method for cement hydration microstructure images, comprising: Acquire a first cement hydration microstructure image and a second cement hydration microstructure image, wherein the first cement hydration microstructure image and the second cement hydration microstructure image are acquired by different CT devices; Inputting the first cement hydration microstructure image and the second cement hydration microstructure image into a trained cross-device image enhancement model for processing to obtain a cross-device stylized enhanced cement hydration microstructure image; Among them, the cross-device image enhancement model respectively performs position encoding on the first cement hydration microstructure image and the second cement hydration microstructure image through the input layer, generates corresponding skeleton position encoding and adds it to the first cement hydration microstructure image, generates corresponding style position encoding and adds it to the second cement hydration microstructure image.
[0009] In some embodiments, position encoding the first cement hydration microstructure image through an input layer, generating a corresponding skeleton position encoding and adding it to the first cement hydration microstructure image comprises: The first cement hydration microstructure image is converted into a first image feature vector through an embedding layer, maximum pooling and average pooling are performed on the first image feature vector in parallel, and a convolution process is performed on the difference between the maximum pooling process result and the average pooling process result; An interpolation algorithm is used to restore the size of the first image feature vector after convolution processing, generate a skeleton position code and add it to the first image feature vector.
[0010] In some embodiments, position encoding the second cement hydration microstructure image through the input layer, generating a style position encoding and adding it to the second cement hydration microstructure image comprises: converting the second cement hydration microstructure image into a second image feature vector through an embedding layer; The second image feature vector is convolved to generate a style position code and added to the second image feature vector.
[0011] In some embodiments, the cross-device image enhancement model includes an input layer, a representation layer, and an output layer connected in sequence, the input layer includes an embedding layer and a position encoding layer connected in sequence, the representation layer includes a Transformer encoder module and a Transformer decoder module connected in sequence, and the output layer includes an upsampling module; Among them, the number of Transformer encoder modules is multiple and they are set in parallel.
[0012] In some embodiments, the Transformer encoder module is used to extract skeleton information from the first image feature vector with skeleton position coding added thereto and to extract style information from the second image feature vector with style position coding added thereto, respectively, to obtain corresponding skeleton information features and style information features; The Transformer decoder module is used to decode and fuse the skeleton information features and the style information features to generate a fused feature vector; The upsampling module is used to decode the fused feature vector and convert the fused feature vector into a cement hydration microstructure image after cross-device stylization enhancement.
[0013] In some embodiments, transfer learning is used to pre-train a cross-device image enhancement model using non-homogeneous images, and the cross-device image enhancement model is trained with the goal of minimizing skeleton loss, style loss, and two-layer cycle consistency loss. In a second aspect, the present invention provides a cross-device stylization enhancement system for cement hydration microstructure images; A cross-device stylization enhancement system for cement hydration microstructure images, comprising: An acquisition module is configured to: acquire a first cement hydration microstructure image and a second cement hydration microstructure image, wherein the first cement hydration microstructure image and the second cement hydration microstructure image are acquired by different CT devices; The cross-device stylization enhancement module is configured to: input the first cement hydration microstructure image and the second cement hydration microstructure image into a trained cross-device image enhancement model for processing, and obtain a cross-device stylized enhanced cement hydration microstructure image; Among them, the cross-device image enhancement model respectively performs position encoding on the first cement hydration microstructure image and the second cement hydration microstructure image through the input layer, generates corresponding skeleton position encoding and adds it to the first cement hydration microstructure image, generates corresponding style position encoding and adds it to the second cement hydration microstructure image.
[0014] In a third aspect, the present invention provides an electronic device; An electronic device comprises a memory, a processor and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the cross-device stylization enhancement method for cement hydration microstructure images.
[0015] In a fourth aspect, the present invention provides a computer-readable storage medium; A computer-readable storage medium stores a computer program / instruction thereon, which, when executed by a processor, implements the steps of the cross-device stylization enhancement method for cement hydration microstructure images.
[0016] In a fifth aspect, the present invention provides a computer program product; A computer program product includes a computer program / instruction, which, when executed by a processor, implements the steps of the above-mentioned cross-device stylization enhancement method for cement hydration microstructure images.
[0017] Compared with the prior art, the present invention has the following beneficial effects: 1. The technical solution provided by the present invention proposes an idea for cross-device enhancement of cement hydration microstructure images, describes the difference in quality of cement hydration microstructure images imaged by high-configuration CT equipment and that imaged by low-configuration CT equipment as a difference in style, and achieves cross-device enhancement of cement hydration microstructure images by stylizing the cement hydration microstructure images imaged by low-configuration CT equipment.
[0018] 2. The technical solution provided by the present invention designs a Transformer-based cross-device image enhancement model, and proposes a new position coding calculation method for homogeneous images such as cement hydration microstructure images. The skeleton position coding and style position coding are obtained according to the characteristics of skeleton features and style features. Two parallel Transformer encoder modules are used to extract the style of cement hydration microstructure images collected by high-configuration CT equipment, and to extract the skeleton of cement hydration microstructure images collected by low-configuration CT equipment. The Transformer decoder module is used to fuse the extracted style and skeleton information. Through the upsampling module, the fused features are generated into a cement hydration microstructure image with skeleton information of a low-configuration CT device image and style information of a high-configuration CT device image, thereby realizing cross-device stylized enhancement of cement hydration microstructure images.
[0019] 3. The technical solution provided by the present invention addresses the problem of unstable training of the cross-device image enhancement model under homogeneous images such as cement. The cross-device image enhancement model is pre-trained through non-homogeneous images, and the parameters are used as initialization parameters of the model to stabilize the training of the model under homogeneous images such as cement hydration microstructure images.
[0020] 4. The technical solution provided by the present invention uses a double-layer cycle consistency architecture to train a cross-device image enhancement model in order to better keep the skeleton of the original image unchanged. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0022] Figure 1 A schematic flow chart of a cross-device stylized enhancement method for cement hydration microstructure images provided by an embodiment of the present invention; Figure 2 A training flow chart of a cross-device image enhancement model provided by an embodiment of the present invention; Figure 3 A schematic diagram of a process for training a cross-device image enhancement model based on a double-layer cycle consistency loss provided in an embodiment of the present invention; Figure 4 This is an example diagram of test results provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0023] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used in the present invention have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0024] It should be noted that the terms used herein are only for describing specific embodiments, and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that the terms "include" and "have" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0025] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.
[0026] Embodiment 1 The high-quality three-dimensional images produced by high-configuration CT equipment can provide more reliable and scientific data support for cement hydration research, but the CT equipment in the current cement plant laboratory is usually of low configuration. Among the traditional methods of using artificial intelligence technology to enhance CT images, only stylized enhancement can learn the style of the target image domain, but it is more applied to the artistic enhancement of images, and cross-device stylized enhancement has not been achieved; and because the cement hydration microstructure image has the characteristics of complex structure and homogeneity, it is difficult to ensure that the skeleton of the original image remains unchanged during the process of cross-device stylized enhancement of the image, and it is easy to fall into mode collapse.
[0027] Therefore, the present invention provides a cross-device stylization enhancement method for cement hydration microstructure images, describes the difference in image quality between high-configuration CT devices and low-configuration CT devices as style differences, and uses a method for stylizing cement images imaged by low-configuration CT devices to achieve cross-device level image enhancement.
[0028] Next, combine Figure 1-Figure 4 , a cross-device stylized enhancement method for cement hydration microstructure images disclosed in this embodiment is described in detail. The cross-device stylized enhancement method for cement hydration microstructure images includes the following steps: S1. Acquire a first cement hydration microstructure image and a second cement hydration microstructure image.
[0029] In this embodiment, the first cement hydration microstructure image is a cement hydration microstructure image acquired by a low-configuration CT device, and the second cement hydration microstructure image is a cement hydration microstructure image acquired by a high-configuration CT device. The image quality of the first cement hydration microstructure image is inferior to that of the second cement hydration microstructure image.
[0030] The image quality of the cement hydration microstructure image acquired by a low-configuration CT device is inferior to that of the cement hydration microstructure image acquired by a high-configuration CT device. The difference between the quality of the first cement hydration microstructure image and the second cement hydration microstructure image is described as the difference in image style. Specifically, the imaging accessories, reconstruction algorithms, and stability of the X-ray source of different CT devices are different, resulting in differences in their imaging characteristics, grayscale performance, and detail presentation methods, which give their images unique style characteristics.
[0031] S2. Input the first cement hydration microstructure image and the second cement hydration microstructure image into a trained cross-device image enhancement model for processing to obtain a cross-device stylized enhanced cement hydration microstructure image.
[0032] Furthermore, the cross-device image enhancement model includes an input layer, a representation layer, and an output layer connected in sequence, the input layer includes an embedding layer and a position encoding layer connected in sequence, the representation layer includes a Transformer encoder module and a Transformer decoder module connected in sequence, the output layer includes three upsampling modules and an output unit connected in sequence, the number of Transformer encoder modules is 2 and they are arranged in parallel, and the number of Transformer decoder modules is 1. The Transformer encoder module includes three Transformer encoder layers connected in sequence, the Transformer decoder module includes three Transformer decoder layers, the upsampling module includes a padding layer, a convolution layer, an activation layer, and an upsampling layer connected in sequence, and the output unit includes a padding layer, a convolution layer, and an activation layer connected in sequence.
[0033] As an implementation mode, S2 specifically includes: S201. Position-encode the first cement hydration microstructure image and the second cement hydration microstructure image respectively through the input layer, generate corresponding skeleton position code and add it to the first cement hydration microstructure image, generate corresponding style position code and add it to the second cement hydration microstructure image.
[0034] Under the premise of processing highly complex and homogeneous cement hydration microstructure images, it is necessary to approach the imaging style of high-configuration CT equipment as much as possible, while ensuring that the skeleton of the original image remains unchanged.
[0035] The so-called skeleton, reflected in the image, is the boundaries, contours and other features of each material in the image; the original image, after rigid transformations such as rotation, flipping, translation, or a linear transformation of the grayscale value of the original image with an overall slope of 1 or -1, such as inverting the grayscale, adding a specific value to all grayscale values, the skeleton information at the corresponding position should remain unchanged.
[0036] The style is more hidden in the color of the image itself, which is manifested as grayscale values in the first cement hydration microstructure image and the second cement hydration microstructure image.
[0037] In order to convert the grayscale image into a feature vector and perform position encoding on the feature vector, in this embodiment, an input layer in the cross-device image enhancement model is constructed. The input layer includes an embedding layer, a skeleton position encoding, and a style position encoding. The embedding layer is a linear layer containing one hidden layer.
[0038] In order to better extract the skeleton information and style information of homogeneous images such as cement hydration microstructure images, the influence of cement hydration microstructure image noise is ignored as much as possible; specifically, the specific process of S201 is as follows: S2011. Convert the first cement hydration microstructure image into a first image feature vector through an embedding layer, perform maximum pooling and average pooling on the first image feature vector in parallel, and perform convolution processing on the difference between the maximum pooling processing result and the average pooling processing result; use an interpolation algorithm to restore the size of the first image feature vector after the convolution processing, generate a skeleton position code and add it to the first image feature vector.
[0039] Among them, the first image feature vector is expressed as: ; ; The skeleton position encoding is expressed as: ; The first image feature vector with skeleton position encoding added is expressed as: ; In the formula, represents the parameters of the embedding layer, The first cement hydration microstructure image is segmented into Image blocks, divided into n blocks in total; ,in, ; represents the skeleton position encoding, c Indicates the first superscript, represents an interpolation algorithm, through which the first image feature vector after convolution processing is restored to its initial size. express The convolution of represents the maximum pooling operation, represents the average pooling operation, Indicates the size after the pooling operation.
[0040] Here, before being input into the embedding layer, the first cement hydration microstructure image and the second cement hydration microstructure image are segmented into image blocks of the same size, and the image blocks are input into the embedding layer.
[0041] S2012, converting the second cement hydration microstructure image into a second image feature vector through an embedding layer; performing convolution processing on the second image feature vector, generating a style position code and adding it to the second image feature vector.
[0042] Among them, the second image feature vector is expressed as: ; ; The style position encoding is expressed as: ; The second image feature vector with style position encoding added is expressed as: ; In the formula, The second cement hydration microstructure image is segmented into image blocks, divided into n blocks in total, ,in, ; represents the style position encoding, s Indicates the second superscript, Represents a border extension with 1 convolution.
[0043] Skeleton position encoding and style position encoding can help the multi-head attention mechanism in the representation layer better preserve the dependencies between neighboring regions, making the cross-device image enhancement model more accurate in identifying image edges and textures.
[0044] S202 . Process the first image feature vector with the skeleton position code added thereto and the second image feature vector with the style position code added thereto through the representation layer to generate a fused feature vector.
[0045] The cement hydration microstructure image is a typical homogeneous image. From a macroscopic perspective, there are a large number of unhydrated cement particles, cement hydration products, bubbles, etc. in each part. However, from a microscopic perspective, the size, shape, and structure of each substance formed during the hydration process are different, and the overall image is highly complex. Therefore, in the process of stylizing the cement hydration microstructure image, there will be problems such as changes in the size, shape, and position of cement particles and loss of detailed texture.
[0046] In order to extract and fuse the skeleton information and style information in the cement hydration microstructure image, specifically, S202 includes: S2021. Input the first image feature vector with skeleton position coding added and the second image feature vector with style position coding added into parallel Transformer encoder modules respectively, perform skeleton information extraction on the first image feature vector with skeleton position coding added through one Transformer encoder module to obtain skeleton information features; perform style information extraction on the second image feature vector with style position coding added through another Transformer encoder module to obtain style information features.
[0047] S2022. Decode and fuse the skeleton information features and the style information features through the Transformer decoder module to generate a fused feature vector.
[0048] For example, the multi-head attention mechanism in the Transformer encoder layer and the Transformer decoder layer is calculated as follows: ; ; In the formula, Represent the query vector, key vector and value vector when calculating attention, respectively. is the dimension of the query vector, k represents the third subscript, Indicates that Arrange them in order into a matrix, Represents the matrix of linear transformation, O represents the fourth subscript, and N represents the number of times the attention mechanism is calculated, that is, the number of heads in the multi-head attention mechanism.
[0049] Exemplarily, the data processing flow of the Transformer encoder layer is as follows:
[0050] ; ; ; In the formula, at the first layer, Represented as the first image feature vector or the second image feature vector. In the second and third layers, Represents the output vector of the previous layer, pos represents the position code. When extracting the skeleton information of the first image feature vector, pos is the skeleton position code. When extracting the style information of the second image feature vector, pos is the style position code. When the attention mechanism is calculated for a vector for the Ith time, The matrix of the linear transformation required for training, FFN is a linear layer with 2 hidden layers, with a Relu activation function added in the middle, and LN represents layer normalization. is the output of a Transformer encoder layer.
[0051] Exemplarily, the data processing flow of the Transformer decoder layer is as follows: ; ; ; ; ; Among them, at the first level, Represents the skeleton information features output by the first Transformer encoder. In the second and third layers, Represents the output result of the previous layer, Represents the style information features output by the second Transformer encoder, which is the same for each Transformer decoder layer. represents the style position encoding, represents skeleton position encoding, FFN is a linear layer with 2 hidden layers, with Relu activation function added in the middle, and LN represents layer normalization. is the output of a Transformer decoder layer.
[0052] S203, decoding the fused feature vector through the output layer, and converting the fused feature vector into a cement hydration microstructure image after cross-device stylization enhancement.
[0053] Since the internal structure of cement hydration microstructure images is highly complex, both homogeneous and single-channel grayscale images, model training is very difficult. When the gradient descent algorithm is used to train the model, its loss function will oscillate, and the model will eventually generate a pure gray image, which is a typical mode collapse.
[0054] In order to stabilize the training of the model, as an implementation method, when training the cross-device image enhancement model, the specific process is as follows: (1) Obtain non-homogeneous images to construct a pre-training set, pre-train the cross-device image enhancement model using the pre-training set, and use the parameters obtained through the pre-training as the initialization parameters of the cross-device image enhancement model.
[0055] In this step, the input to the cross-device image enhancement model is the pre-training set, and the output is the enhanced image.
[0056] A large number of repeated structures will not appear in a non-homogeneous image. In this embodiment, the non-homogeneous image is a landscape image.
[0057] (2) Acquire cement hydration microstructure images acquired by different CT devices, perform data preprocessing, and construct a training set. That is, slice a three-dimensional cement hydration microstructure image in three different directions, and perform preprocessing operations on the sliced images by rotating them by 90°, 180°, and 270° and saving them.
[0058] In this embodiment, the image is enhanced by learning the style, so there is no need to ensure that the data of the same cement block is obtained. Any two cement blocks only need to be collected by different CT devices.
[0059] The cement hydration microstructure image contains three-dimensional cement block information. Considering that the cross-device image enhancement model requires a large amount of data for training to ensure the model effect, and for homogeneous images such as cement, the problem of mode collapse will occur during the training process. Therefore, in this step, the obtained cement hydration microstructure image is preprocessed.
[0060] (3) The cross-device image enhancement model is trained with the goal of minimizing skeleton loss, style loss, and two-layer cycle consistency loss.
[0061] In this embodiment, the features of the original image input to the cross-device image enhancement model and the generated image output by the cross-device image enhancement model are extracted through a pre-trained VGG neural network, and the difference in features between the generated image and the input original image is calculated as the loss of the model for training the cross-device image model.
[0062] The cement hydration microstructure image obtained by low-configuration CT equipment is recorded as , the cement image imaged by the high-configuration CT device is recorded as , the output of the cross-device image enhancement model will be Styled as The styled image is recorded as Similarly, if and To exchange, Extract style information and Extract skeleton information to generate Styled as Style Image Here, the generated and This is equivalent to exchanging the styles of cement hydration microstructure images produced by the two CT devices.
[0063] The generated and The two images are sent back as input to the cross-device image enhancement model. Repeating the above steps can exchange the styles of the two cement hydration microstructure images again. After the styles are exchanged again, the generated image should be the same as the original image. Figure 1 The consistent cement hydration microstructure image can be used as a double-layer cycle consistency loss for network training by comparing the similarity between the cement hydration microstructure images generated by the two cycles and the original image.
[0064] Exemplary: ; ; ; ; ; ; ; In the formula, represents the cross-device image augmentation model, represents the image obtained by stylizing the first cement hydration microstructure image to the style of the second cement hydration microstructure image, cs represents the fifth superscript, represents the image obtained by stylizing the second cement hydration microstructure image to the style of the first cement hydration microstructure image, sc represents the sixth subscript, Indicates that Styled as The image obtained after the style, cyc-c represents the seventh superscript, Indicates that Styled as The image obtained after the style, cyc-s represents the eighth superscript, represents the VGG neural network, Represents the extracted data through the VGG network characteristic information, g Indicates the eighth superscript. Represents the extracted data through the VGG network characteristic information, Represents the extracted data through the VGG network feature information.
[0065] Then the skeleton loss function is expressed as: ; ; In the formula, Indicates the number of layers of the VGG neural network used as the output, usually 5; represents the mean square error function, and j represents the jth feature output by the VGG network.
[0066] Then the style loss function is expressed as: ; In the formula, represents the variance of the data, Represents the mean of the data.
[0067] Then the two-layer cycle consistency loss function is expressed as: .
[0068] The overall training loss function is expressed as: ; In the formula, , , Represents the weight parameter, and all represents the ninth subscript.
[0069] Embodiment 2 This embodiment discloses a cross-device stylization enhancement system for cement hydration microstructure images, including: An acquisition module is configured to: acquire a first cement hydration microstructure image and a second cement hydration microstructure image, wherein the first cement hydration microstructure image and the second cement hydration microstructure image are acquired by different CT devices; The cross-device stylization enhancement module is configured to: input the first cement hydration microstructure image and the second cement hydration microstructure image into a trained cross-device image enhancement model for processing, and obtain a cross-device stylized enhanced cement hydration microstructure image; Among them, the cross-device image enhancement model respectively performs position encoding on the first cement hydration microstructure image and the second cement hydration microstructure image through the input layer, generates corresponding skeleton position encoding and adds it to the first cement hydration microstructure image, generates corresponding style position encoding and adds it to the second cement hydration microstructure image.
[0070] It should be noted that the acquisition module and the cross-device image enhancement module correspond to the steps in Embodiment 1, and the examples and application scenarios implemented by the modules and the corresponding steps are the same, but are not limited to the contents disclosed in Embodiment 1. It should be noted that the modules as part of the system can be executed in a computer system such as a set of computer executable instructions.
[0071] Embodiment 3 Embodiment 3 of the present invention provides an electronic device, including a memory and a processor, and computer instructions stored in the memory and executed on the processor. When the computer instructions are executed by the processor, the steps of the cross-device stylization enhancement method of cement hydration microstructure images are completed.
[0072] Embodiment 4 Embodiment 4 of the present invention provides a computer-readable storage medium for storing computer instructions. When the computer instructions are executed by a processor, the steps of the cross-device stylization enhancement method of cement hydration microstructure images are completed.
[0073] Embodiment 5 Embodiment 5 of the present invention provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the above-mentioned cross-device stylization enhancement method for cement hydration microstructure images.
[0074] 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 flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, 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 flowchart and / or block diagram. 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.
[0075] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0076] These computer program instructions can also be loaded onto a computer or other programmable data processing device, and a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0077] The description of each embodiment in the above embodiments has different emphases. For parts not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0078] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A cross-device stylization enhancement method for cement hydration microstructure images, characterized in that: include: Acquire a first cement hydration microstructure image and a second cement hydration microstructure image, wherein the first cement hydration microstructure image and the second cement hydration microstructure image are acquired by different CT devices; Inputting the first cement hydration microstructure image and the second cement hydration microstructure image into a trained cross-device image enhancement model for processing to obtain a cross-device stylized enhanced cement hydration microstructure image; Among them, the cross-device image enhancement model respectively performs position encoding on the first cement hydration microstructure image and the second cement hydration microstructure image through the input layer, generates corresponding skeleton position encoding and adds it to the first cement hydration microstructure image, generates corresponding style position encoding and adds it to the second cement hydration microstructure image.
2. The cross-device stylization enhancement method for cement hydration microstructure images according to claim 1, characterized in that: Performing position encoding on the first cement hydration microstructure image through the input layer, generating a corresponding skeleton position encoding and adding it to the first cement hydration microstructure image comprises: The first cement hydration microstructure image is converted into a first image feature vector through an embedding layer, maximum pooling and average pooling are performed on the first image feature vector in parallel, and a convolution process is performed on the difference between the maximum pooling process result and the average pooling process result; An interpolation algorithm is used to restore the size of the first image feature vector after convolution processing, generate a skeleton position code and add it to the first image feature vector.
3. The cross-device stylization enhancement method for cement hydration microstructure images according to claim 1, characterized in that: Position encoding the second cement hydration microstructure image through the input layer, generating a style position encoding and adding it to the second cement hydration microstructure image includes: converting the second cement hydration microstructure image into a second image feature vector through an embedding layer; The second image feature vector is convolved to generate a style position code and added to the second image feature vector.
4. The cross-device stylization enhancement method for cement hydration microstructure images according to claim 1, characterized in that: The cross-device image enhancement model includes an input layer, a representation layer, and an output layer connected in sequence, wherein the input layer includes an embedding layer and a position encoding layer connected in sequence, the representation layer includes a Transformer encoder module and a Transformer decoder module connected in sequence, and the output layer includes an upsampling module; Among them, the number of Transformer encoder modules is multiple and they are set in parallel.
5. The cross-device stylization enhancement method for cement hydration microstructure images according to claim 4, characterized in that: The Transformer encoder module is used to extract skeleton information from the first image feature vector with skeleton position coding added thereto and to extract style information from the second image feature vector with style position coding added thereto, to obtain corresponding skeleton information features and style information features; The Transformer decoder module is used to decode and fuse the skeleton information features and the style information features to generate a fused feature vector; The upsampling module is used to decode the fused feature vector and convert the fused feature vector into a cement hydration microstructure image after cross-device stylization enhancement.
6. The cross-device stylization enhancement method for cement hydration microstructure images according to claim 1, characterized in that: Transfer learning is used to pre-train the cross-device image enhancement model with non-homogeneous images, and the cross-device image enhancement model is trained with the goal of minimizing skeleton loss, style loss, and two-layer cycle consistency loss.
7. A cross-device stylization enhancement system for cement hydration microstructure images, characterized in that: include: An acquisition module is configured to: acquire a first cement hydration microstructure image and a second cement hydration microstructure image, wherein the first cement hydration microstructure image and the second cement hydration microstructure image are acquired by different CT devices; The cross-device stylization enhancement module is configured to: input the first cement hydration microstructure image and the second cement hydration microstructure image into a trained cross-device image enhancement model for processing, and obtain a cross-device stylized enhanced cement hydration microstructure image; Among them, the cross-device image enhancement model respectively performs position encoding on the first cement hydration microstructure image and the second cement hydration microstructure image through the input layer, generates corresponding skeleton position encoding and adds it to the first cement hydration microstructure image, generates corresponding style position encoding and adds it to the second cement hydration microstructure image.
8. An electronic device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the cross-device stylization enhancement method for cement hydration microstructure images according to any one of claims 1-6.
9. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the steps of the cross-device stylization enhancement method for cement hydration microstructure images described in any one of claims 1 to 6 are implemented.
10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the cross-device stylization enhancement method for cement hydration microstructure images described in any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Nuclear magnetic image super-resolution method and device based on style migration and computer storage medium
CN115936983A
Image style migration method based on two-way vision Transform
CN119068100A
Image style transfer method and apparatus, and image style transfer model training method and apparatus
WO2022048182A1
