Surface feature-based anti-counterfeiting information generation method and device, equipment and medium
By generating microstructure strength maps and local displacement fields of concrete samples, the surface morphology after solidification can be predicted, solving the problem of misidentification caused by changes in surface characteristics of concrete samples during the sample delivery process, and achieving highly reliable sample identification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHUHAI XINHUATONG SOFTWARE CO LTD
- Filing Date
- 2026-01-22
- Publication Date
- 2026-05-01
AI Technical Summary
In existing technologies, the surface characteristics of concrete samples change during the sample delivery process, leading to misidentification of counterfeit products and making it difficult to guarantee the authenticity of the samples.
By acquiring sample images and acquisition parameters of concrete samples, a microstructure intensity map is generated using a phase consistency model. Combined with MiDaS depth estimation and RAFT optical flow model, the surface morphology of the concrete sample after solidification is predicted, and target anti-counterfeiting information is generated.
It improves the reliability of concrete sample identification, ensures the uniqueness and authenticity of samples, and reduces the possibility of misidentification.
Smart Images

Figure CN121563573B_ABST
Abstract
Description
Methods, apparatus, equipment, and media for generating anti-counterfeiting information based on surface features Technical Field
[0001] This invention relates to the field of image processing technology, and in particular to a method, apparatus, device, and medium for generating anti-counterfeiting information based on surface features. Background Technology
[0002] Concrete is typically used within two hours of leaving the factory. To ensure that the concrete meets quality standards, samples are usually taken from the concrete after it is delivered to the construction site in the presence of witnesses. The samples are then sent to the testing facility and left for a period of time before relevant strength tests are conducted. Therefore, ensuring that concrete samples are not switched when they are delivered to the testing personnel is a crucial step in ensuring safe production.
[0003] With the development of image processing technology, some related technologies can now perform anti-tampering verification through image recognition of concrete sample surfaces. For example, QR code labels can be placed on the concrete surface at random locations and insertion depths prompted by the system, or markers with colors or specific shapes can be placed on the concrete surface. The first image of the concrete surface can be taken by the sampler's smart terminal and uploaded to the server for storage. After receiving the sample, the testing personnel can take a second image of the surface and determine whether the concrete sample has been switched by comparing the images.
[0004] However, the concrete sample was not fully solidified when the sample image was taken, and its surface features may have changed during the sample delivery process. Even if the concrete sample was not tampered with, misidentification could occur due to differences in surface features. Furthermore, even if the surface features remained unchanged, a counterfeit sample might be mistakenly identified as tamper-proof because it has markings of the same shape on its surface. Therefore, existing marking information mainly relies on planar image features such as points, lines, and surfaces extracted from the image, which is not very reliable in preventing tampering, and the authenticity of the sample is difficult to guarantee. Summary of the Invention
[0005] This invention aims to at least solve one of the technical problems existing in the prior art. To this end, this invention proposes a method, apparatus, device, and medium for generating anti-counterfeiting information based on surface features, which can generate identification information based on the surface morphology and predicted morphology of concrete samples, thereby improving the reliability of sample identification.
[0006] In a first aspect, embodiments of the present invention provide a method for generating anti-counterfeiting information based on surface features, comprising:
[0007] Acquire sample images and sample acquisition parameters of concrete samples, wherein the sample acquisition parameters include the image capture time and ambient temperature and humidity, and the sample image includes multiple preset labels;
[0008] The sample image is input into a phase consistency model to generate a microstructure intensity map, wherein the microstructure intensity map is used to describe the undulating structure of the concrete sample surface;
[0009] A first height map is obtained by performing MiDaS depth estimation based on the microstructure strength map and the sample acquisition parameters, wherein the first height map is used to characterize the three-dimensional height distribution of the concrete sample surface;
[0010] The sample image, the first height map, and the sample acquisition parameters are input into the RAFT optical flow model to determine the local displacement field corresponding to each of the preset markers. The local displacement field is used to characterize the concrete displacement caused by the preset markers being embedded in the concrete sample.
[0011] The local displacement field is input into the stress perturbation model to obtain the stress feature vector;
[0012] Based on the stress feature vector, the target surface features are predicted by a preset coupling prediction model, wherein the target surface features are used to characterize the surface morphology of the concrete sample after solidification.
[0013] The target anti-counterfeiting information of the concrete sample is obtained based on the microstructure strength map, the local displacement field, the first height map, and the target surface feature encoding.
[0014] According to some embodiments of the present invention, inputting the sample image into a phase consistency model to generate a microstructure intensity map includes:
[0015] The sample image is converted to a grayscale image and gamma correction is performed.
[0016] The grayscale image is filtered using a Gabor filter with multiple filtering scales and multiple filtering directions to obtain multiple filtered response images, wherein one filtering scale and one filtering direction correspond to one filtered response image.
[0017] A phase consistency map is obtained by calculating the phase consistency of all the filtered response images corresponding to each image pixel;
[0018] After performing adaptive threshold segmentation on the phase consistency map based on the Otsu algorithm, the microstructure intensity map is obtained through morphological closing operation.
[0019] According to some embodiments of the present invention, a first height map is obtained by performing MiDaS depth estimation based on the microstructure intensity map and the sample acquisition parameters, including:
[0020] A multidimensional feature vector is constructed based on the microstructure intensity map and the sample acquisition parameters;
[0021] Based on the multidimensional feature vector, convolution and residual calculations are performed sequentially to obtain a first feature map, wherein the spatial resolution of the first feature map is half the spatial resolution of the microstructure intensity map;
[0022] The first feature map is fused across multiple preset scales to obtain a fused feature map.
[0023] The first height map is obtained by sequentially upsampling, convolution calculation, and sigmoid activation function based on the fused feature map. The first height map is then normalized, wherein the spatial resolution of the first height map is the same as the spatial resolution of the microstructure intensity map.
[0024] According to some embodiments of the present invention, determining the local displacement field corresponding to each of the preset identifiers includes:
[0025] A virtual reference frame is constructed based on the first height map and the sample acquisition parameters, wherein the virtual reference frame is used to characterize the surface of the concrete sample excluding the preset marker;
[0026] Image features are extracted from the sample image using a ResNet-18 backbone network to obtain a second feature map. The feature similarity between all pixel pairs in the second feature map is calculated using cosine similarity to obtain a similarity matrix.
[0027] The similarity matrix and the virtual reference frame are input into a recurrent neural network to determine the initial optical flow field mapped from the sample image to the virtual reference frame. The initial optical flow field is then input into the recurrent neural network for multiple iterations to obtain the target optical flow field.
[0028] The sample acquisition parameters are input into the yield stress function to construct a deformability constraint, wherein the deformability constraint is used to characterize the yield stress limitation on the surface displacement of the concrete sample.
[0029] Based on the deformability constraint, the target optical flow field is calibrated to obtain the local displacement field corresponding to each of the preset identifiers.
[0030] According to some embodiments of the present invention, constructing a virtual reference frame based on the first height map and the sample acquisition parameters includes:
[0031] Based on the ambient temperature and humidity, the natural settlement is determined, and the corresponding marker height area for each of the preset markers is determined in the first height map;
[0032] Non-uniform smoothing is performed on each of the aforementioned marker height regions, wherein the natural settlement amount is used to adjust the central region of the marker height region during the non-uniform equilibrium process;
[0033] The adjusted first height map is rendered into a grayscale image to obtain the virtual reference frame.
[0034] According to some embodiments of the present invention, inputting the local displacement field into a stress perturbation model to obtain a stress eigenvector includes:
[0035] The target elastic constant matrix is determined from a preset mapping table based on the sample collection parameters. The preset mapping table contains multiple optional elastic constant matrices, which are used to characterize the elasticity of concrete under different temperatures and humidity conditions.
[0036] The strain field is obtained by calculating the strain tensor of the local displacement field, and the initial stress disturbance distribution map is determined based on the target elastic constant matrix and the strain field.
[0037] The stress feature vector is extracted from the initial stress perturbation distribution map based on PCA dimensionality reduction.
[0038] According to some embodiments of the present invention, the coupled prediction model includes an initial state encoder, a rheological evolution simulator, a solidification shrinkage predictor, and a calibrator, and predicts target surface features through a preset coupled prediction model, including:
[0039] The initial state encoder concatenates the first height map, the local displacement field, and the stress feature vector into a multi-channel tensor to extract spatial features, and then fuses the spatial features with the sample acquisition parameters to form an encoded feature map.
[0040] The preset curing time and the encoded feature map are input into the rheological evolution simulator. A rheological simulation height map is obtained through Bingham plasticity. The rheological simulation height map is then reconstructed based on a preset time decay function to obtain a second height map.
[0041] Based on the second height map, the sample collection parameters, and the curing time, the drying shrinkage model and non-uniform shrinkage mapping are performed by the solidification shrinkage predictor, and the second height map is updated to the target surface features.
[0042] Secondly, embodiments of the present invention provide an anti-counterfeiting information generation device based on surface features, including at least one control processor and a memory for communicatively connecting with the at least one control processor; the memory stores instructions executable by the at least one control processor, the instructions being executed by the at least one control processor to enable the at least one control processor to perform the anti-counterfeiting information generation method based on surface features as described in the first aspect above.
[0043] Thirdly, embodiments of the present invention provide an electronic device including an anti-counterfeiting information generation device based on surface features as described in the second aspect above.
[0044] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing computer-executable instructions for performing the anti-counterfeiting information generation method based on surface features as described in the first aspect above.
[0045] The surface feature-based anti-counterfeiting information generation method according to embodiments of the present invention has at least the following beneficial effects: First, a microstructure intensity map is obtained by extracting surface micro-undulation features through a phase consistency model; a first height map is obtained by reconstructing the initial surface height field using a MiDaS depth estimation network; the local displacement field caused by the embedding of a preset identifier is quantified using a RAFT optical flow model; the initial stress perturbation distribution is constructed by fusing the height field and displacement field as the physical input of the coupled prediction model, thereby predicting the surface morphology of the concrete sample after solidification; finally, the microstructure intensity map, the local displacement field, and the first height map are used as the initial surface features during sampling, and the initial surface features and target surface features are encoded into anti-counterfeiting information, effectively improving the reliability of sample identification. Attached Figure Description
[0046] Figure 1 is a schematic diagram of the principle of a surface feature-based anti-counterfeiting information generation method provided in an embodiment of the present invention;
[0047] Figure 2 is a flowchart of a surface feature-based anti-counterfeiting information generation method provided in another embodiment of the present invention;
[0048] Figure 3 is a structural diagram of an anti-counterfeiting information generation device based on surface features provided in another embodiment of the present invention. Detailed Implementation
[0049] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0050] In the description of this invention, it should be understood that the orientation descriptions, such as up, down, front, back, left, right, etc., are based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limiting this invention.
[0051] In the description of this invention, "several" means one or more, "more than" means two or more, "greater than," "less than," and "exceeding" are understood to exclude the stated number, while "above," "below," and "within" are understood to include the stated number. The use of "first" and "second" in the description is merely for distinguishing technical features and should not be construed as indicating or implying relative importance, or implicitly indicating the number of indicated technical features, or implicitly indicating the order of the indicated technical features.
[0052] In the description of this invention, unless otherwise explicitly defined, terms such as "set up," "install," and "connect" should be interpreted broadly, and those skilled in the art can reasonably determine the specific meaning of the above terms in this invention in conjunction with the specific content of the technical solution.
[0053] This invention provides a method, apparatus, device, and medium for generating anti-counterfeiting information based on surface features. The method includes: firstly, extracting surface micro-undulation features using a phase consistency model to obtain a microstructure intensity map; secondly, reconstructing the initial surface height field using a MiDaS depth estimation network to obtain a first height map; and thirdly, quantifying the local displacement field caused by the embedding of a preset identifier using a RAFT optical flow model; fourthly, fusing the height field and displacement field to construct an initial stress perturbation distribution as the physical input to a coupled prediction model, thereby predicting the surface morphology of the concrete sample after solidification; and finally, using the microstructure intensity map, local displacement field, and first height map as initial surface features during sampling, encoding the initial surface features and target surface features into anti-counterfeiting information, effectively improving the reliability of sample identification.
[0054] The technical solutions of the embodiments of the present invention will be further described below with reference to the accompanying drawings.
[0055] Referring to Figure 2, which is a flowchart of a surface feature-based anti-counterfeiting information generation method provided by an embodiment of the present invention, the surface feature-based anti-counterfeiting information generation method includes, but is not limited to, the following steps:
[0056] S10, acquire sample images and sample acquisition parameters of concrete samples. The sample acquisition parameters include the image capture time and ambient temperature and humidity. The sample images include multiple preset labels.
[0057] It should be noted that the sample image is a surface image of the concrete sample taken during sampling. In this embodiment, the sample image was taken vertically downwards from top to bottom. The sample collection parameters are the ambient temperature and humidity at the time of concrete sampling, which can be detected by simple sensors. In this embodiment, ambient temperature and humidity are used as environmental parameters at the time of concrete sampling to provide a basis for subsequent prediction of the concrete setting process.
[0058] It should be noted that the preset identifier can be any existing identifier, such as a QR code, an object of a special color, or an object of a special shape. This embodiment does not impose many restrictions on the type of preset identifier.
[0059] It is worth noting that this embodiment does not construct anti-counterfeiting information based on preset identifiers, but rather predicts the impact of the insertion of preset identifiers on concrete solidification, thereby obtaining the surface features at the time of sampling and the predicted surface features after solidification to form multi-dimensional anti-counterfeiting information. During verification, the images taken during the inspection can be compared using the two surface features to ensure the uniqueness of the sample.
[0060] S20, input the sample image into the phase consistency model to generate a microstructure intensity map, where the microstructure intensity map is used to describe the undulating structure of the concrete sample surface.
[0061] It should be noted that, as shown in Figure 1, the input of the phase congruency model is the sample image. In this embodiment, the sample image is in RGB format. After preprocessing by the phase congruency model, the surface microstructures at different scales and directions are detected by filtering response. Then, the microstructure intensity map is obtained by calculating the consistency of the filtering response. This allows the microstructure intensity map to characterize the undulating structure of the concrete sample surface, thereby converting the visual two-dimensional image into three-dimensional image features, providing a basis for the subsequent extraction of longitudinal undulation features.
[0062] It is worth noting that the phase consistency model in this embodiment can adopt an existing model structure that can achieve the extraction of fluctuation structure. The principle of the phase consistency model will not be elaborated here.
[0063] S30. Based on the microstructure strength map and sample acquisition parameters, MiDaS depth estimation is performed to obtain the first height map, which is used to characterize the distribution of three-dimensional height on the surface of the concrete sample.
[0064] It should be noted that in this embodiment, the microstructure strength map is converted into macroscopic height field features through MiDas (Monocular Depth Estimation) depth estimation, and the sample acquisition parameters are fused to guide the model network to learn the influence of concrete rheological state on height. For example, concrete will settle faster under high temperature environment. Based on the fact that the microstructure strength map can characterize the longitudinal undulation features, the undulation features are converted into surface height field through MiDas depth estimation, so that the final first height map can reflect the surface morphology under the current environment.
[0065] It is worth noting that MiDas depth estimation can be accomplished using existing MiDas models. This embodiment does not involve improvements to the specific model structure and calculation principles. Instead, the input of the MiDas model is changed from the existing RGB image to the microstructure intensity map obtained in step S20, as shown in Figure 1. The output of the phase consistency model is the input of the MiDas model, so that MiDas depth estimation can focus on the physically malleable morphology, rather than the color or texture of the RGB image.
[0066] S40, input the sample image, the first height map and the sample acquisition parameters into the RAFT optical flow model to determine the local displacement field corresponding to each preset marker. The local displacement field is used to characterize the concrete displacement caused by the preset marker being embedded in the concrete sample.
[0067] It should be noted that various preset markers were added to the surface of the concrete sample, as shown in Figure 1. In this embodiment, the output of the MiDas model is not only used as the input of the RAFT optical flow model, but the sample image, the first height map and the sample acquisition parameters are simultaneously input into the RAFT optical flow model. The local displacement field caused by the preset markers is measured by the RAFT optical flow algorithm. For example, when a QR code is inserted into the concrete surface, it causes the concrete to expand to both sides and form a concrete displacement. The displacement caused by different types of preset markers is different. Therefore, this embodiment obtains multiple local displacement fields, and each local displacement field corresponds to a preset marker.
[0068] It is worth noting that the existing RAFT optical flow model is used for continuous inter-frame motion estimation, while this embodiment is used for local displacement field inversion of embedded objects in static images. The optical flow output (pixel unit) is converted into millimeter-level physical displacement through scale information and limited to the deformable range of concrete (±2mm) to avoid non-physical interpretation.
[0069] It is worth noting that the first height map is used to fuse sample acquisition parameters in the RAFT optical flow model to construct a virtual reference frame, that is, to construct a reference image of a concrete surface without preset labels, providing a basis for optical flow iteration. Through multiple optical flow iterations, the local displacement field corresponding to each preset label is obtained.
[0070] S50, input the local displacement field into the stress disturbance model to obtain the stress eigenvector.
[0071] It should be noted that, after obtaining multiple local displacement fields, as shown in Figure 1, this embodiment inputs each local displacement field into the stress perturbation model, and fuses the height field and displacement field to construct an initial stress perturbation distribution, which is characterized by a stress feature vector. This embodiment uses the local displacement field and the first height map as strain features, and achieves the conversion from strain to stress through Hooke's law in classical mechanics. This allows the local displacement field representing the visual characteristics to infer the initial stress and use it for anti-counterfeiting coding, enabling the subsequently obtained target anti-counterfeiting information to have physical interpretability, greatly increasing the difficulty of counterfeiting.
[0072] S60, based on stress feature vectors, predicts target surface features through a preset coupled prediction model, where the target surface features are used to characterize the surface morphology of the concrete sample after solidification.
[0073] It should be noted that the coupled prediction model in this embodiment can achieve coupled prediction from rheology to solidification. In concrete rheology, the Bingham model and the ACI shrinkage formula are standard models. In this embodiment, the above two calculation processes are embedded in the coupled prediction model, so that the coupled model can achieve end-to-end coupling with the deep learning visual features obtained in the above steps. The target surface features obtained by coupling are used as one of the anti-counterfeiting information. During detection, the surface features of the detected image are compared with the predicted target surface features, which effectively improves the reliability of image comparison.
[0074] S70, based on microstructure strength map, local displacement field, first height map and target surface feature encoding, obtains the target anti-counterfeiting information of concrete sample.
[0075] It should be noted that the microstructure strength map can characterize the surface undulation of the concrete sample at the time of collection. If the local displacement field can characterize the concrete displacement caused by each preset marker, and the first height map characterizes the three-dimensional height of the surface at the time of collection, then the initial surface features of the concrete sample at the time of collection can be formed by combining the microstructure strength map, the local displacement field, and the first height map. The target surface features are used as the predicted surface features after solidification. After the inspector takes the inspection image, the image can be compared simultaneously based on the initial surface features and the target surface features. If one of them is successfully compared, it can be determined that the verification has passed, thus improving the reliability of the target anti-counterfeiting information.
[0076] In another embodiment, step S20 specifically includes, but is not limited to, the following steps:
[0077] S21, Convert the sample image to a grayscale image and perform gamma correction;
[0078] S22, A grayscale image is filtered using a Gabor filter with multiple filtering scales and multiple filtering directions to obtain multiple filtered response images, wherein one filtering scale and one filtering direction correspond to one filtered response image.
[0079] S23, the phase consistency map is obtained by calculating the phase consistency of all filtered response images corresponding to each image pixel;
[0080] S24. After performing adaptive threshold segmentation on the phase consistency map based on the Otsu algorithm, the microstructure intensity map is obtained through morphological closing operation.
[0081] It should be noted that, as shown in Figure 1, the sample image is the input of the phase consistency model. First, in the image preprocessing stage, the sample image is converted from an RGB image to a grayscale image to simplify subsequent processing, reduce computational complexity, and retain surface microstructure information. Then, gamma correction is performed on the grayscale image to eliminate the influence of uneven illumination during photography.
[0082] It should be noted that this embodiment pre-sets multiple filtering scales and multiple filtering directions. The specific values can be set according to actual needs. The filtering scale is the standard deviation of the filter; for example, setting the standard deviation to (1.0, 2.0, 4.0, 8.0, 16.0) yields 5 filtering scales. The filtering direction is the filtering angle; for example, setting it to (0°, 22.5°, ..., 157.5°) yields 8 filtering directions. This embodiment uses a Gabor filter. Each combination of a filtering scale and a filtering direction performs one filtering operation, resulting in multiple filtered response images. For example, the above 5 filtering scales and 8 filtering directions can be combined to obtain 40 filtered response images, thereby detecting surface microstructures at different scales and directions, providing a basis for phase consistency calculation.
[0083] It should be noted that the pixels of multiple filtered response images are aligned. Therefore, in this embodiment, the phase consistency of each image pixel in all filtered response images is calculated on an image pixel-by-image basis, thereby obtaining the pixel phase consistency corresponding to each image pixel. The pixel phase consistency is arranged according to the position of the image pixels to obtain the final phase consistency map. The phase consistency map is used to quantify the intensity of surface undulations and distinguish the real microstructure of the concrete sample surface from image noise.
[0084] It should be noted that this embodiment uses the Otsu algorithm to perform adaptive threshold segmentation on the phase consistency map, and then performs morphological closing operations on the segmentation results to enhance the microstructure and obtain the final microstructure strength map, generating an accurate representation of the concrete surface microstructure for use as input in subsequent models. The Otsu algorithm and morphological closing operations are techniques well known to those skilled in the art, and their specific principles will not be elaborated upon here.
[0085] In another embodiment, step S30 specifically includes, but is not limited to, the following steps:
[0086] S31, constructing a multidimensional feature vector based on microstructure intensity map and sample acquisition parameters;
[0087] S32, based on the multidimensional feature vector, convolution calculation and residual calculation are performed sequentially to obtain the first feature map, wherein the spatial resolution of the first feature map is half of the spatial resolution of the microstructure intensity map;
[0088] S33, the first feature map is fused across multiple preset scales to obtain a fused feature map;
[0089] S34. Based on the fused feature map, upsampling, convolution calculation and sigmoid activation function are performed sequentially to obtain the first height map. The first height map is then normalized. The spatial resolution of the first height map is the same as the spatial resolution of the microstructure intensity map.
[0090] It should be noted that, as shown in Figure 1, after the microstructure intensity map and sample acquisition parameters are input into the MiDaS model, the microstructure intensity map is first used as a one-dimensional feature vector and concatenated with the sample acquisition parameters to form a multi-dimensional feature vector. The dimension of the sample acquisition parameters is determined according to the specific number of parameters. For example, in this embodiment, the sample acquisition parameters include the image capture time, ambient temperature, and ambient humidity. Therefore, the sample acquisition parameters correspond to a three-dimensional vector, which is concatenated to obtain a four-dimensional feature vector.
[0091] It should be noted that in this embodiment, the multidimensional feature vector is sequentially processed through a convolutional layer (3×3, 64 channels) and residual blocks for feature extraction. After calculation, a first feature map is obtained. For example, the above operations are performed using a pre-trained ResNet-18 backbone network to extract global and local features of the concrete surface, providing a foundation for height reconstruction. The spatial resolution of the first feature map (1024×1024×64) obtained in this embodiment is half that of the microstructure intensity map (2048×2048×1), and the number of channels is 64.
[0092] It should be noted that in this embodiment, the first feature map is fused across scales using a cross-scale feature fusion module to obtain a fused feature map (1024×1024×128). By combining features of different scales, detailed information is preserved, the global structure and local details are balanced, and the accuracy of height reconstruction is improved. Cross-scale fusion is a well-known technique in the art and will not be elaborated on here.
[0093] It should be noted that after obtaining the fused feature map, the fused feature map is upsampled by bilinear interpolation, and then the spatial resolution is restored by convolution calculation of the convolutional layer. Finally, the Sigmoid activation function is used to activate the features to obtain the first height map. The spatial resolution of the first height map is the same as that of the microstructure strength map. The three-dimensional height distribution of the concrete surface is reconstructed by MiDas depth estimation, providing an initial height field for rheological-solidification prediction.
[0094] It should be noted that after obtaining the first height map, this embodiment further normalizes the first height map, and the average thickness of the concrete can be introduced during the normalization operation to ensure that the height value is compatible with the input of the subsequent rheology-solidification model, which facilitates physical simulation.
[0095] In another embodiment, step S40 specifically includes, but is not limited to, the following steps:
[0096] S41, a virtual reference frame is constructed based on the first height map and sample acquisition parameters, wherein the virtual reference frame is used to characterize the surface of the concrete sample excluding the preset label;
[0097] S42, the image features are extracted from the sample image through the ResNet-18 backbone network to obtain the second feature map, and the feature similarity between all pixel pairs of the second feature map is calculated by cosine similarity to obtain the similarity matrix;
[0098] S43, input the similarity matrix and the virtual reference frame into the recurrent neural network to determine the initial optical flow field that maps the sample image to the virtual reference frame, and input the initial optical flow field into the recurrent neural network for multiple iterations to obtain the target optical flow field;
[0099] S44, Input the sample acquisition parameters into the yield stress function to construct the deformability constraint, where the deformability constraint is used to characterize the yield stress limit on the surface displacement of the concrete sample;
[0100] S45, based on deformability constraint calibration of the target optical flow field, obtain the local displacement field corresponding to each preset label.
[0101] It should be noted that in this embodiment, a virtual reference frame is constructed based on the first height map and sample acquisition parameters. The virtual reference frame is used to characterize the surface of the concrete sample without preset markings. The virtual reference frame can also be synthesized by Gaussian smoothing of the first height map, and the unmarked surface of the concrete sample can be characterized by an undisturbed, ideally flat surface.
[0102] It should be noted that after obtaining the virtual reference frame, the RAFT optical flow model in this embodiment is equipped with a ResNet-18 backbone network. The ResNet-18 backbone network extracts a second feature map from the sample image, extracting high-level semantic features of the image and providing a foundation for optical flow calculation. Based on the second feature map, every two pixels are combined into pixel pairs, and the cosine similarity between all pixel pairs is calculated as the feature similarity. The feature similarities are sorted according to pixel position to obtain a similarity matrix, thereby quantifying the similarity of different regions in the image and providing a basis for optical flow estimation.
[0103] It should be noted that the RAFT optical flow model is essentially a data-driven pixel motion estimator, and its internal network structure does not accept scalars such as temperature and humidity as input. Therefore, in this embodiment, a virtual reference frame is input into the RNN to ensure that the final output displacement field has environmentally aware physical consistency. After inputting the similarity matrix and the virtual reference frame into the RNN to calculate the initial optical flow field, the final target optical flow field is obtained through multiple rounds of iterative optimization, enabling the target optical flow field to accurately characterize the local displacement caused by the preset marker on the concrete surface.
[0104] It should be noted that the maximum surface displacement of wet concrete is limited by its yield stress. Therefore, this embodiment introduces a yield stress function to construct a deformability constraint. The yield stress is a function of temperature and age, and the specific formula is as follows: ,in, For ambient temperature, For yield stress, The reference yield stress is used to characterize the initial yield stress of concrete immediately after mixing and before it has settled. It is typically measured at a temperature of 20°C. The unit is Pa. This represents the time difference between the initial setting time, i.e., the time between the moment the image was captured and the moment the concrete was completely mixed. This is a preset temperature sensitivity coefficient used to describe the linear response intensity when the yield stress deviates from 20℃. is the structural reconstruction rate coefficient, used to characterize the rate at which the yield stress increases exponentially with time, and e is the natural constant.
[0105] It should be noted that after determining the deformability constraint according to the above yield stress formula, the target optical flow field is verified by calculating the maximum allowable displacement of the deformability constraint (by back-calculating the Bingham model). If there are no outliers, the optical flow field region corresponding to each preset label in the target optical flow field can be determined as a local displacement field. If there are outliers, the outliers are clipped according to the maximum allowable displacement.
[0106] In another embodiment, step S41 specifically includes, but is not limited to, the following steps:
[0107] S411, determine the natural settlement based on the ambient temperature and humidity, and determine the corresponding marker height area for each preset marker in the first height map;
[0108] S412, each marker height area is non-uniformly smoothed, wherein the natural settlement is used to adjust the center area of the marker height area during the non-uniform equilibrium process.
[0109] S413, render the adjusted first height map into a grayscale image to obtain a virtual reference frame.
[0110] It should be noted that when constructing the virtual reference frame, this embodiment first determines the natural settlement of the concrete under undisturbed conditions based on the ambient temperature and humidity. The specific formula is as follows: ,in, , and These are preset empirical coefficients, and their values are not equal. This represents the amount of natural settlement.
[0111] It should be noted that the area of the preset marking is fixed. The corresponding area can be determined by image recognition from the sample image, and the corresponding sample is selected in the first height map to determine the marking height area.
[0112] It should be noted that the center area of each sign height zone is determined according to... Fine-tuning is performed to simulate gravity settlement, with higher values maintained in the edge regions to achieve non-uniform smoothness. After adjusting the first height map, it is rendered as a grayscale image as a virtual reference frame, which allows the virtual reference frame to simulate gravity settlement in the marked height region, thereby simulating a surface without preset markings.
[0113] In another embodiment, step S50 specifically includes, but is not limited to, the following steps:
[0114] S51, determine the target elastic constant matrix from the preset mapping table according to the sample collection parameters. The preset mapping table contains multiple optional elastic constant matrices, which are used to characterize the elasticity of concrete under different temperatures and humidity.
[0115] S52, the strain field is obtained by calculating the strain tensor of the local displacement field, and the initial stress disturbance distribution map is determined based on the target elastic constant matrix and the strain field;
[0116] S53 extracts stress feature vectors from the initial stress perturbation distribution map based on PCA dimensionality reduction.
[0117] It should be noted that concrete has different elasticity under different temperatures and humidity. In this embodiment, a specific elastic constant matrix is recorded by a preset mapping plate, and the target elastic constant matrix is obtained by looking up the concrete temperature and humidity in the sample collection parameters, thereby realizing the dynamic adjustment of the calculation process according to environmental parameters.
[0118] It should be noted that in this embodiment, the strain field is obtained by calculating the strain tensor of the local displacement field, thereby converting the displacement information into the basis for stress calculation. The specific formula is as follows: ,in, For local displacement field, For strain tensor, It is the transpose of the local displacement field.
[0119] It should be noted that after obtaining the strain field, the initial stress disturbance distribution diagram is calculated according to Hooke's Law, which is as follows: , where C is the target elastic constant matrix, and the stress distribution on the concrete surface caused by the preset marking is quantified by the initial stress disturbance distribution map.
[0120] It should be noted that in this embodiment, PCA is used to reduce the initial stress disturbance distribution map to extract the main stress features. 95% of the variance is retained to obtain the stress feature vector, generating a compact stress feature representation for subsequent anti-counterfeiting information encoding. PCA dimensionality reduction is a technique well known to those skilled in the art, and will not be elaborated on here.
[0121] In another embodiment, the coupled prediction model includes an initial state encoder, a rheological evolution simulator, a solidification shrinkage predictor, and a calibrator. Step S60 specifically includes, but is not limited to, the following steps:
[0122] S61, after splicing the first height map, local displacement field and stress feature vector into a multi-channel tensor through the initial state encoder, extracts spatial features and fuses the spatial features with the sample acquisition parameters into an encoded feature map;
[0123] S62, input the preset curing time and coded feature map into the rheological evolution simulator, obtain the rheological simulation height map through Bingham plasticity, and reconstruct the structure of the rheological simulation height map based on the preset time decay function to obtain the second height map;
[0124] S63, based on the second height map, sample collection parameters and curing time, uses a solidification shrinkage predictor to model drying shrinkage and non-uniform shrinkage mapping, and updates the second height map to the target surface features.
[0125] It should be noted that in this embodiment, the first height map, local displacement field, and stress feature vector of the initial state encoder are concatenated into a multi-channel tensor. Since the first height map, local displacement field, and stress feature vector are all two-dimensional vectors, a six-channel tensor is obtained. Spatial features are extracted through lightweight convolutional encoding (4 layers Conv+BN+ReLU, number of channels: 6→32→64→128→256). Then, the sample acquisition parameters are embedded using MLP (2 layers fully connected) to obtain a multi-dimensional environment embedding vector. Finally, the spatial features and the environment embedding vector are fused through spatial broadcasting addition, that is, the environment vector is added at each spatial location to obtain the encoded feature map. This jointly encodes the mechanical disturbances and geometric shapes retrieved from visual inversion, rather than using only images. Environmental parameters are injected into the feature map in a physically perceptual manner, enabling the model to distinguish between "high-temperature rapid solidification" and "low-temperature slow solidification" scenarios.
[0126] It should be noted that in this embodiment, the curing time for concrete samples sent to the testing center is defined as the curing time, such as the common 28 days. The curing time and coded feature map are input into the rheological evolution simulator. Based on the settlement and flow before the initial setting (0–6 hours) of the Bingham plastic model, and the yield stress obtained in the above embodiment, the Navier-Stokes equation is approximately solved using a differentiable finite difference layer (Differentiable FDM Layer) to obtain a rheological simulation height map. Then, according to a preset time decay function, the rheological simulation height map is structurally reconstructed to obtain a second height map, which is the surface height map at the end of the rheological stage. This embodiment embeds the Bingham model into a neural network architecture to achieve end-to-end trainable physical simulation, introduces a temperature-dependent dynamic adjustment mechanism for yield stress, which is more consistent with the behavior of real concrete and improves the accuracy of prediction. The use of a differentiable numerical layer to replace the pure data-driven black box improves the robustness of extrapolation.
[0127] It should be noted that the second height map, sample collection parameters, and curing time are finally input into the solidification shrinkage predictor to predict solidification. Firstly, based on the existing ACI 209R empirical formula, the final shrinkage strain can be set as a learnable variable. The neural network then dynamically predicts the shrinkage strain field based on the initial density of the concrete to complete the drying shrinkage model. The formula for calculating the shrinkage strain field is: ,in, For maintenance duration, The final shrinkage strain is given by RH, where RH represents the ambient humidity and t represents the predicted time of the shrinkage strain field. Then, the initial stress perturbation distribution map is used as the shrinkage sensitivity weight to make the high stress area (such as the pre-marked indentation edge) shrink more, predicting the surface height map after solidification to achieve non-uniform shrinkage mapping. The empirical formula is parameterized and data-driven optimization is used to balance physical rationality and actual deviation compensation.
[0128] It should be noted that after modeling drying shrinkage and mapping non-uniform shrinkage for the second height map, a lightweight upsampling network (3 layers of transposed convolution) is used to reconstruct the second height map, improving its spatial resolution to match that of the sample image. Since the indentation embedded by the preset marker is irreversible, this embodiment applies a physical constraint loss to the region corresponding to the preset marker to ensure that the predicted morphology retains the contour of the embedded preset marker. The resulting height map represents the target surface features, enabling the embedding of physical prior constraints in super-resolution reconstruction, preventing distortion of key anti-spoofing areas, and quantifying the uncertainty of concrete solidification, making subsequent verification more robust.
[0129] As shown in Figure 3, Figure 3 is a structural diagram of an anti-counterfeiting information generation device based on surface features provided in an embodiment of the present invention. The present invention also provides an anti-counterfeiting information generation device based on surface features, comprising:
[0130] The processor 401 can be implemented using a general-purpose central processing unit (CPU), microprocessor, application specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application.
[0131] The memory 402 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 402 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 402 and is called and executed by the processor 401 to execute the surface feature-based anti-counterfeiting information generation method of the embodiments of this application.
[0132] Input / output interface 403 is used to implement information input and output;
[0133] The communication interface 404 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0134] Bus 405 transmits information between various components of the device (e.g., processor 401, memory 402, input / output interface 403, and communication interface 404);
[0135] The processor 401, memory 402, input / output interface 403 and communication interface 404 are connected to each other within the device via bus 405.
[0136] This application also provides an electronic device, including the anti-counterfeiting information generation device based on surface features as described above.
[0137] This application embodiment also provides a storage medium, which is a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the above-described method for generating anti-counterfeiting information based on surface features.
[0138] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof. The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separate, and may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0139] It will be understood by those skilled in the art that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is known to those skilled in the art, communication media typically include computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
[0140] The above provides a detailed description of the preferred embodiments of the present invention. However, the present invention is not limited to the above embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention. All such equivalent modifications or substitutions are included within the scope defined by the claims of the present invention.
Claims
1. A method for generating anti-counterfeiting information based on surface features, characterized in that, include: Acquire sample images and sample acquisition parameters of a concrete sample, wherein the sample acquisition parameters include the image capture time and ambient temperature and humidity, and the sample image includes multiple preset markers; input the sample image into a phase consistency model to generate a microstructure intensity map, wherein the microstructure intensity map is used to describe the undulating structure of the concrete sample surface; perform MiDaS depth estimation based on the microstructure intensity map and the sample acquisition parameters to obtain a first height map, wherein the first height map is used to characterize the three-dimensional height distribution of the concrete sample surface; input the sample image, the first height map, and the sample acquisition parameters into a RAFT optical flow model to determine the local displacement field corresponding to each of the preset markers. The local displacement field is used to characterize the concrete displacement caused by embedding the preset identifier into the concrete sample; the local displacement field is input into a stress perturbation model to obtain a stress feature vector; based on the stress feature vector, a preset coupling prediction model is used to predict the target surface features, wherein the target surface features are used to characterize the surface morphology of the concrete sample after solidification; the target anti-counterfeiting information of the concrete sample is obtained based on the microstructure strength map, the local displacement field, the first height map, and the target surface feature encoding; the sample image is input into a phase consistency model to generate a microstructure strength map, including: converting the sample image into a grayscale image and performing gamma correction; based on multiple filtering scales and Multiple Gabor filters with different filtering directions are used to filter the grayscale image to obtain multiple filtered response images, wherein one filtering scale and one filtering direction correspond to one filtered response image; a phase consistency map is obtained by calculating the phase consistency of all filtered response images corresponding to each image pixel; after adaptive thresholding of the phase consistency map based on the Otsu algorithm, the microstructure intensity map is obtained through morphological closing operation; the local displacement field is input into a stress perturbation model to obtain a stress feature vector, including: determining the target elastic constant matrix from a preset mapping table according to the sample acquisition parameters, wherein the preset mapping table records multiple optional elastic constant matrices, and the optional elastic constants... The number matrix is used to characterize the elasticity of concrete under different temperatures and humidity conditions; the strain field is obtained by calculating the strain tensor of the local displacement field, and the initial stress disturbance distribution map is determined based on the target elastic constant matrix and the strain field; the stress feature vector is extracted from the initial stress disturbance distribution map based on PCA dimensionality reduction; the coupled prediction model includes an initial state encoder, a rheological evolution simulator, a solidification shrinkage predictor, and a calibrator, and predicts the target surface features through the preset coupled prediction model, including: extracting spatial features by concatenating the first height map, the local displacement field, and the stress feature vector into a multi-channel tensor through the initial state encoder, and fusing the spatial features with the sample acquisition parameters into an encoded feature map;The preset curing time and the coded feature map are input into the rheological evolution simulator. A rheological simulation height map is obtained through Bingham plasticity. Based on a preset time decay function, the rheological simulation height map is reconstructed to obtain a second height map. Based on the second height map, the sample collection parameters, and the curing time, drying shrinkage modeling and non-uniform shrinkage mapping are performed through the solidification shrinkage predictor. The second height map is then updated to reflect the target surface features.
2. The method for generating anti-counterfeiting information based on surface features according to claim 1, characterized in that, The method for obtaining a first height map by performing MiDaS depth estimation based on the microstructure intensity map and the sample acquisition parameters includes: constructing a multidimensional feature vector based on the microstructure intensity map and the sample acquisition parameters; performing convolution and residual calculations sequentially on the multidimensional feature vector to obtain a first feature map, wherein the spatial resolution of the first feature map is half that of the microstructure intensity map; performing cross-scale fusion on the first feature map based on multiple preset scales to obtain a fused feature map; performing upsampling, convolution, and sigmoid activation functions sequentially on the fused feature map to obtain the first height map; and performing normalization processing on the first height map, wherein the spatial resolution of the first height map is the same as that of the microstructure intensity map.
3. The method for generating anti-counterfeiting information based on surface features according to claim 2, characterized in that, Determining the local displacement field corresponding to each of the preset identifiers includes: constructing a virtual reference frame based on the first height map and the sample acquisition parameters, wherein the virtual reference frame is used to characterize the surface of the concrete sample excluding the preset identifiers; extracting image features from the sample image using a ResNet-18 backbone network to obtain a second feature map, and calculating the feature similarity between all pixel pairs of the second feature map using cosine similarity to obtain a similarity matrix; inputting the similarity matrix and the virtual reference frame into a recurrent neural network to determine an initial optical flow field mapped from the sample image to the virtual reference frame, and inputting the initial optical flow field into the recurrent neural network for multiple iterations to obtain a target optical flow field; inputting the sample acquisition parameters into a yield stress function to construct a deformability constraint, wherein the deformability constraint is used to characterize the yield stress limitation on the surface displacement of the concrete sample; and calibrating the target optical flow field based on the deformability constraint to obtain the local displacement field corresponding to each of the preset identifiers.
4. The method for generating anti-counterfeiting information based on surface features according to claim 3, characterized in that, Constructing a virtual reference frame based on the first height map and the sample collection parameters includes: determining the natural settlement amount based on the ambient temperature and humidity; determining the corresponding marker height region for each preset marker in the first height map; performing non-uniform smoothing on each marker height region, wherein the natural settlement amount is used to adjust the central region of the marker height region during the non-uniform equilibrium process; and rendering the adjusted first height map into a grayscale image to obtain the virtual reference frame.
5. A surface feature-based anti-counterfeiting information generation device, characterized in that, It includes at least one control processor and a memory for communicatively connecting to the at least one control processor; the memory stores instructions executable by the at least one control processor, which, when executed by the at least one control processor, enable the at least one control processor to perform the surface feature-based anti-counterfeiting information generation method as described in any one of claims 1 to 4.
6. An electronic device, characterized in that, It includes the anti-counterfeiting information generation device based on surface features as described in claim 5.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions for causing a computer to perform the anti-counterfeiting information generation method based on surface features as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Water area surface flow velocity area monitoring method based on intelligent visual analysis
CN119470967A
Weight metering automatic classification and calibration method and system based on image recognition
CN120495742A