Product quality analysis method, device, equipment and medium
By processing images of lithium hydroxide particles using Fourier transform and low-frequency masking techniques, the problem of low reliability in existing technologies is solved, and accurate characterization of edge information and reliable analysis of size distribution are achieved.
Patent Information
- Application Number
- CN202510995375.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-18
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2045-07-18
AI Technical Summary
Existing methods for analyzing the quality of lithium hydroxide particles are sensitive to image noise, particle overlap, and uneven illumination, leading to edge detection failures or inconsistent results. They also make it difficult to accurately measure the size of irregular particles, resulting in low analytical reliability.
Fourier transform and low-frequency masking techniques were used to process lithium hydroxide particle images to form frequency domain data. By inverse Fourier transform and correlation coding, edge information was extracted. By combining spatial and temporal correlation coding, the reliability of the analysis was improved.
This study enables reliable analysis of the size distribution of lithium hydroxide particles, ensuring accurate characterization of edge information and improving the reliability of quality analysis.
Smart Images

Figure CN120976569A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of product quality analysis, in particular to a product quality analysis method, device, equipment and medium. BACKGROUND
[0002] The quality analysis of lithium hydroxide particles is an important step in evaluating their physical properties and performance. Existing methods for quality analysis of lithium hydroxide particles usually rely on microscopic imaging technology and image processing algorithms. Traditional image processing algorithms mainly rely on contour recognition technology. However, edge detection methods are very sensitive to image noise, overlapping between particles, and uneven lighting, etc. These factors can cause edge detection to fail or detect false edges, thereby affecting the accuracy of size measurement. Moreover, edge detection algorithms often rely on the setting of multiple parameters, such as the threshold of the edge detection operator, the size of the filter, etc. Different parameter settings can lead to inconsistent detection results, increasing the instability of the method. In addition, for irregularly shaped particles, edge detection may not accurately capture all edge information, resulting in inaccurate size measurement. That is, in the prior art, there is a problem of relatively low reliability of quality analysis of lithium hydroxide particles. SUMMARY
[0003] Therefore, the purpose of the present application is to provide a product quality analysis method, device, equipment and medium to improve the problem of relatively low reliability of quality analysis of lithium hydroxide particles in the prior art.
[0004] To achieve the above-mentioned purpose, the present application adopts the following technical solutions: A product quality analysis method, comprising: obtaining a lithium hydroxide particle image and performing Fourier transform on the lithium hydroxide particle image to form first particle frequency domain data, wherein the lithium hydroxide particle image is formed by image acquisition operation of lithium hydroxide particles by an electron microscope; performing at least one low-frequency mask on the first particle frequency domain data to form at least one second particle frequency domain data, wherein one low-frequency mask corresponds to one second particle frequency domain data; performing inverse Fourier transform on each of the second particle frequency domain data to form at least one lithium hydroxide conversion image; performing correlation coding on the lithium hydroxide particle image based on the at least one lithium hydroxide conversion image and the at least one second particle frequency domain data to form image coding features; decoding the image coding features to form image decoding data, wherein the image decoding data is used to represent the quality of the lithium hydroxide particles in the particle size distribution dimension.
[0005] In the preferred selection of the present application, in the product quality analysis method described above, the step of performing at least one low-frequency mask on the first particle frequency domain data to form at least one second particle frequency domain data comprises: generating an initial parameter matrix based on the size of the first particle frequency domain data, wherein the size of the initial parameter matrix is the same as the size of the first particle frequency domain data, and each parameter in the initial parameter matrix is equal to 1; determining a rectangular region with a size smaller than the size of the initial parameter matrix randomly with the center point of the initial parameter matrix as the center, and updating each parameter in the rectangular region to 0; forming at least one updated parameter matrix by performing the step of determining a rectangular region with a size smaller than the size of the initial parameter matrix randomly with the center point of the initial parameter matrix as the center and updating each parameter in the rectangular region to 0 at least once, wherein when the number of times of performing the step is greater than or equal to 2, the size of the rectangular region determined randomly each time is different; respectively performing bitwise multiplication operation on each of the updated parameter matrix and the first particle frequency domain data to realize low-frequency mask and form at least one second particle frequency domain data.
[0006] In the preferred selection of the present application, in the product quality analysis method described above, the step of performing at least one low-frequency mask on the first particle frequency domain data to form at least one second particle frequency domain data comprises: respectively performing semantic coding on the at least one lithium hydroxide conversion image, the at least one second particle frequency domain data, and the lithium hydroxide particle image to form at least one conversion image coding feature, at least one frequency domain data coding feature, and a particle image coding feature; performing first associated coding on the particle image coding feature based on the at least one conversion image coding feature to form an image associated coding feature; performing second associated coding on the image associated coding feature based on the at least one frequency domain data coding feature to form an image coding feature, wherein in the second associated coding, feature space mapping is performed on the frequency domain data coding feature.
[0007] In the preferred selection of the present application, in the product quality analysis method described above, the step of performing at least one low-frequency mask on the first particle frequency domain data to form at least one second particle frequency domain data comprises: sorting a plurality of conversion image coding features in descending order of the range of low-frequency mask to form a first coding feature sequence; In the a-th time step, the first coding feature sequence is traversed forward to form a conversion image coding feature in the a-th time step, where a is an odd number greater than or equal to 1; In the b-th time step, the first coding feature sequence is traversed backward to form a conversion image coding feature in the b-th time step, where b is an even number greater than 1, and when the conversion image coding feature in the current time step coincides with the conversion image coding feature in the next time step, the traversal is stopped; Based on the order in which each of the conversion image coding features is traversed, the particle image coding features are sequentially first associated coded to form image associated coding features.
[0008] In the preferred selection of the present application, in the above product quality analysis method, the step of sequentially first associated coding the particle image coding features based on the order in which each of the conversion image coding features is traversed to form image associated coding features comprises: For the first conversion image coding feature traversed, the conversion image coding feature is fully connected to obtain a fully connected feature, and the fully connected feature is activated to form an activated feature, and each parameter in the activated feature is taken as a weight coefficient of a parameter at a corresponding position in the particle image coding feature to adjust the parameter of the particle image coding feature to form an adjusted particle image coding feature, and the particle image coding feature and the adjusted particle image coding feature are added to form a local associated coding feature corresponding to the first conversion image coding feature; For the conversion image coding features other than the first one traversed, the conversion image coding feature is fully connected to obtain a fully connected feature, and the fully connected feature is activated to form an activated feature, and each parameter in the activated feature is taken as a weight coefficient of a parameter at a corresponding position in a local associated coding feature corresponding to a previous conversion image coding feature to adjust the parameter of the local associated coding feature to form an adjusted local associated coding feature, and the local associated coding feature and the adjusted local associated coding feature are added to form a local associated coding feature corresponding to the current conversion image coding feature; Based on the local associated coding feature corresponding to the last conversion image coding feature, the image associated coding feature is formed.
[0009] In the preferred selection of the present application, in the above product quality analysis method, the step of sequentially first associated coding the particle image coding features based on the order in which each of the conversion image coding features is traversed to form image associated coding features comprises: Sort the multiple frequency domain data coding features in descending order of the range of the low-frequency mask to form a second coding feature sequence; At the cth time step, the second coding feature sequence is traversed in a forward direction to form a frequency domain data coding feature at the cth time step, where c is an odd number greater than or equal to 1; At the dth time step, the second coding feature sequence is traversed in a reverse direction to form a frequency domain data coding feature at the dth time step, where d is an even number greater than 1, and the traversal stops when the frequency domain data coding feature at the current time step coincides with the frequency domain data coding feature at the next time step; Based on the order in which each of the frequency domain data coding features is traversed, the image-related coding feature is sequentially subjected to a second association coding to form an image coding feature.
[0010] In a preferred selection of the present application, in the product quality analysis method described above, the step of sequentially performing second association coding on the image-related coding feature based on the order in which each of the frequency domain data coding features is traversed to form an image coding feature includes: For the first frequency domain data coding feature that is traversed, the image-related coding feature is adjusted based on the attention parameter between the frequency domain data coding feature and the image-related coding feature to form an adjusted image-related coding feature, and the image-related coding feature and the adjusted image-related coding feature are added to form a local association coding feature corresponding to the first frequency domain data coding feature; For the other frequency domain data coding features other than the first one that are traversed, the local association coding feature corresponding to the previous frequency domain data coding feature is adjusted based on the attention parameter between the frequency domain data coding feature and the local association coding feature to form an adjusted local association coding feature, and the local association coding feature and the adjusted local association coding feature are added to form a local association coding feature corresponding to the current frequency domain data coding feature; Based on the local association coding feature corresponding to the last frequency domain data coding feature, an image coding feature is formed.
[0011] The present application also provides a product quality analysis device, comprising: A frequency domain data acquisition module is configured to acquire a lithium hydroxide particle image and perform Fourier transform on the lithium hydroxide particle image to form first particle frequency domain data, wherein the lithium hydroxide particle image is formed by image acquisition operation of lithium hydroxide particles by an electron microscope; a low-frequency mask module, configured to perform at least one low-frequency mask on the first particle frequency domain data to form at least one second particle frequency domain data, wherein one low-frequency mask corresponds to one second particle frequency domain data; an inverse Fourier transform module, configured to perform inverse Fourier transform on each of the second particle frequency domain data respectively to form at least one lithium hydroxide conversion image; an image correlation coding module, configured to perform correlation coding on the lithium hydroxide particle image based on the at least one lithium hydroxide conversion image and the at least one second particle frequency domain data to form image coding features; an encoding feature decoding module, configured to decode the image coding features to form image decoding data, wherein the image decoding data is used to represent the quality of the lithium hydroxide particles in the particle size distribution dimension.
[0012] On the basis of the above, the present application further provides an electronic device, comprising: a memory, configured to store a computer program; a processor connected with the memory, configured to execute the computer program stored in the memory to realize the product quality analysis method described above.
[0013] On the basis of the above, the present application further provides a computer readable storage medium, which stores a computer program, and the computer program performs the steps of the product quality analysis method described above when running.
[0014] The product quality analysis method, device, equipment and medium provided by the application first acquire a lithium hydroxide particle image, and perform Fourier transform on the lithium hydroxide particle image to form first particle frequency domain data; secondly, at least one second particle frequency domain data is formed by performing at least one low-frequency mask on the first particle frequency domain data; then, at least one lithium hydroxide conversion image is formed by performing inverse Fourier transform on each second particle frequency domain data; further, the lithium hydroxide particle image is associatedly coded based on the at least one lithium hydroxide conversion image and the at least one second particle frequency domain data to form image coding features; finally, the image coding features are decoded to form image decoding data. Based on the above, since the low-frequency component is usually related to the overall distribution and background information of the particles, and the high-frequency component is related to the surface details and edges of the particles, the second particle frequency domain data formed by performing low-frequency masking can focus on the high-frequency component, thereby realizing the focused mining of edge information, so that the coding features formed can accurately represent the edge information, thereby guaranteeing the reliability of the quality of the decoding result in the granularity (size) distribution dimension. And, inverse Fourier transform is performed, so that the lithium hydroxide particle image can be associatedly coded based on the lithium hydroxide conversion image in the spatial domain and the second particle frequency domain data in the time domain, to further improve the reliability of the associated coding, thereby improving the relatively low reliability of the quality analysis of the lithium hydroxide particles in the prior art. BRIEF DESCRIPTION OF DRAWINGS
[0015] In order to make the above-mentioned purposes, features and advantages of the application more obvious and easy to understand, the following preferred embodiments are specifically described below with reference to the accompanying drawings.
[0016] Figure 1 The structural block diagram of the electronic device provided by the embodiments of the application.
[0017] Figure 2 The flowchart of the product quality analysis method provided by the embodiments of the application.
[0018] Figure 3 The schematic diagram of the first associated coding provided by the embodiments of the application.
[0019] Figure 4 The schematic diagram of the second associated coding provided by the embodiments of the application.
[0020] Figure 5 The block schematic diagram of the product quality analysis device provided by the embodiments of the application. DETAILED DESCRIPTION
[0021] In order to make the purposes, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. The components of the embodiments of the present application described and shown in the drawings herein can be arranged and designed in various different configurations.
[0022] Therefore, the detailed description of the embodiments of the present application provided below in the drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work under the premise that the embodiments in the present application are within the scope of protection of the present application.
[0023] As shown in Figure 1 The embodiments of the present application provide an electronic device. The electronic device can include a memory, a processor, and a product quality analysis apparatus.
[0024] In detail, the memory and the processor are directly or indirectly electrically connected to realize data transmission or interaction. For example, the memory and the processor can be electrically connected through one or more communication buses or signal lines. The product quality analysis apparatus includes at least one software function module stored in the memory in the form of software or firmware. The processor is configured to execute the executable computer programs stored in the memory, for example, the software function modules and computer programs included in the product quality analysis apparatus, to realize the product quality analysis method provided by the embodiments of the present application.
[0025] Optionally, the memory can be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read only memory (PROM), an erasable programmable read only memory (EPROM), an electrically erasable programmable read only memory (EEPROM), and the like.
[0026] Optionally, the processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), a system on chip (SoC), etc. It can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component.
[0027] It can be understood that Figure 1 The structure shown is only schematic, and the electronic device can further include more or fewer components than those shown in the figure, or have a different configuration from that shown in the figure, for example, it can also include a communication unit for information interaction with other devices (such as an electron microscope). Figure 1 It can be understood that Figure 1 The structure shown is only schematic, and the electronic device can further include more or fewer components than those shown in the figure, or have a different configuration from that shown in the figure, for example, it can also include a communication unit for information interaction with other devices (such as an electron microscope).
[0028] In combination with Figure 2 The embodiments of the present application also provide a product quality analysis method applicable to the above-mentioned electronic device. The method steps defined by the flow of the product quality analysis method can be realized by the electronic device. The specific flow shown in the figure will be described in detail below. Figure 2 The structure shown is only schematic, and the electronic device can further include more or fewer components than those shown in the figure, or have a different configuration from that shown in the figure, for example, it can also include a communication unit for information interaction with other devices (such as an electron microscope).
[0029] In step S110, a lithium hydroxide particle image is obtained, and Fourier transform is performed on the lithium hydroxide particle image to form first particle frequency domain data.
[0030] In the embodiments of the present application, the electronic device can obtain a lithium hydroxide particle image, and perform Fourier transform on the lithium hydroxide particle image (the image can be converted from the spatial domain to the frequency domain to generate a frequency spectrum graph), to form first particle frequency domain data. The lithium hydroxide particle image is formed by image acquisition operation of the lithium hydroxide particle by an electron microscope (considering that the size of the lithium hydroxide particle is micron level, therefore, a high-resolution electron microscope can be used).
[0031] In step S120, at least one low-frequency mask is performed on the first particle frequency domain data to form at least one second particle frequency domain data.
[0032] In the embodiment of the present application, after the first particle frequency domain data is formed, the electronic device can perform at least one low frequency mask on the first particle frequency domain data to form at least one second particle frequency domain data. One low frequency mask corresponds to one second particle frequency domain data, and the low frequency mask can refer to masking the low frequency component. In addition, the spectrum diagram (i.e., the frequency domain data) is a two-dimensional frequency distribution diagram, the central region corresponds to the low frequency component, and the edge region corresponds to the high frequency component. Therefore, the central region can be masked to form the corresponding second particle frequency domain data.
[0033] Step S130, respectively performing inverse Fourier transform on each of the second particle frequency domain data to form at least one lithium hydroxide conversion image.
[0034] In the embodiment of the present application, after the second particle frequency domain data is formed, the electronic device can respectively perform inverse Fourier transform on each of the second particle frequency domain data (which is reciprocal to the Fourier transform, i.e., from the frequency domain to the spatial domain) to form at least one lithium hydroxide conversion image. That is, one second particle frequency domain data corresponds to one lithium hydroxide conversion image.
[0035] Step S140, performing associated coding on the lithium hydroxide particle image based on the at least one lithium hydroxide conversion image and the at least one second particle frequency domain data to form image coding features.
[0036] In the embodiment of the present application, after the lithium hydroxide conversion image is formed, the electronic device can perform associated coding on the lithium hydroxide particle image based on the at least one lithium hydroxide conversion image and the at least one second particle frequency domain data to form image coding features. That is, the semantic information of the lithium hydroxide particle image can be associatedly mined based on the semantic information of the spatial domain and the frequency domain of the high frequency component, so that the representation accuracy of the formed image coding features is higher, that is, more attention is paid to the edge information.
[0037] Step S150, decoding the image coding features to form image decoding data.
[0038] In the embodiments of the present application, after the image encoding feature is formed, the electronic device can decode the image encoding feature to form image decoding data. The image decoding data is used to represent the quality of the lithium hydroxide particles in the particle size distribution dimension. For example, the image encoding feature can be processed by a fully connected network layer to obtain corresponding output features (the size can be 1*1), and then the output features are processed (such as identity mapping or linear mapping) to obtain image decoding data, such as a value of 1-10. The higher the value, the higher the quality. The lower the value, the lower the quality.
[0039] It should be noted that the above steps S140 and S150 can be implemented by a corresponding neural network model, which can be formed by learning the sample lithium hydroxide particle image and the quality label corresponding to the sample lithium hydroxide particle image (for example, the size distribution is concentrated and belongs to the target interval, then the quality is high, and for example, the size distribution is not concentrated or does not belong to the target interval, then the quality is low). Specifically, the neural network model can include an encoding network and a decoding network. The encoding network can be used for associated encoding, and the decoding network can include a fully connected network layer for decoding.
[0040] Based on the above, since the low-frequency component is generally related to the overall distribution and background information of the particles, and the high-frequency component is related to the surface details and edges of the particles, by performing low-frequency masking, the second particle frequency domain data formed can focus on the high-frequency component, thereby realizing the focused mining of edge information, so that the encoding feature formed can accurately represent the edge information, thereby ensuring the reliability of the quality in the particle size (size) distribution dimension obtained by decoding. And, inverse Fourier transform is also performed, so that the lithium hydroxide particle image can be associated encoded based on the spatial domain lithium hydroxide conversion image and the time domain second particle frequency domain data, respectively, to further improve the reliability of the associated encoding, thereby improving the problem that the reliability of the quality analysis of the lithium hydroxide particles in the prior art is relatively low.
[0041] In the first aspect, for step S120, it should be noted that the specific way of performing at least one low-frequency mask on the first particle frequency domain data is not limited and can be selected according to actual needs.
[0042] For example, in an alternative implementation, low-frequency masking can be performed based on a determined frequency threshold, for example, regions less than the frequency domain threshold can be masked. The frequency threshold can be set according to experience or can be a parameter of the above-mentioned neural network model formed in the training and learning.
[0043] For example, in another alternative embodiment, in order to improve the reliability of the overall characterization of the low-frequency mask to the high-frequency component, i.e. to avoid the inherent bias caused by the fixed frequency threshold, the above-mentioned step S120 can further include the following contents: Firstly, an initial parameter matrix can be generated based on the size of the first particle frequency domain data, wherein the size of the initial parameter matrix is the same as the size of the first particle frequency domain data, and each parameter in the initial parameter matrix is equal to 1. Secondly, a rectangular region with a size smaller than that of the initial parameter matrix is randomly determined with the center point of the initial parameter matrix as the center, and the parameters in the rectangular region are updated to 0, so that a corresponding updated parameter matrix can be formed. Then, at least one updated parameter matrix is formed by performing the above-mentioned step of randomly determining a rectangular region with a size smaller than that of the initial parameter matrix with the center point of the initial parameter matrix as the center and updating the parameters in the rectangular region to 0 at least once, wherein when the number of times of performing the above-mentioned step is greater than or equal to 2, the size of the rectangular region randomly determined each time is different, so that low-frequency components of different scales can be suppressed, and such multi-scale processing can more comprehensively capture the characteristics of particles at different scales, thereby improving the comprehensiveness of detection. Finally, each of the updated parameter matrices and the first particle frequency domain data can be multiplied bit by bit to realize the low-frequency mask and form at least one second particle frequency domain data, for example, the first updated parameter matrix and the first particle frequency domain data can be multiplied to form the first second particle frequency domain data, and the second updated parameter matrix and the first particle frequency domain data can be multiplied to form the second second particle frequency domain data.
[0044] Secondly, the specific way of correlatively encoding the lithium hydroxide particle image based on the at least one lithium hydroxide conversion image and the at least one second particle frequency domain data is not limited and can be selected according to actual conditions.
[0045] For example, in an alternative embodiment, the encoding feature corresponding to the lithium hydroxide particle image can be cross-attention processed based on the encoding feature corresponding to each lithium hydroxide conversion image and the encoding feature corresponding to each second particle frequency domain data to form each cross-attention feature, and then each cross-attention feature can be subjected to mean or summation operation to form the image encoding feature.
[0046] For example, in another alternative implementation, in order to improve the reliability of the associated coding, the step S140 can further include steps S141, S142 and S143, the specific contents of which are described as follows.
[0047] Step S141, respectively performing semantic coding on the at least one lithium hydroxide conversion image, the at least one second particle frequency domain data and the lithium hydroxide particle image to form at least one conversion image coding feature, at least one frequency domain data coding feature and a particle image coding feature.
[0048] In the embodiments of the present application, the at least one lithium hydroxide conversion image, the at least one second particle frequency domain data and the lithium hydroxide particle image are respectively subjected to semantic coding to form at least one conversion image coding feature, at least one frequency domain data coding feature and a particle image coding feature. For example, one lithium hydroxide conversion image can be subjected to convolution processing to form one conversion image coding feature, one second particle frequency domain data can be subjected to convolution processing to form one frequency domain data coding feature, and the lithium hydroxide particle image can be subjected to convolution processing to form a particle image coding feature.
[0049] Step S142, performing first associated coding on the particle image coding feature based on the at least one conversion image coding feature to form an image associated coding feature.
[0050] In the embodiments of the present application, after the conversion image coding feature and the particle image coding feature are formed, the particle image coding feature can be subjected to first associated coding based on the at least one conversion image coding feature to form an image associated coding feature.
[0051] Step S143, performing second associated coding on the image associated coding feature based on the at least one frequency domain data coding feature to form an image coding feature.
[0052] In the embodiment of the present application, after the conversion image coding features and the particle image coding features are formed, the image association coding features can be secondly associated coded based on the at least one frequency domain data coding feature to form image coding features. In the second association coding, the frequency domain data coding feature is mapped in a feature space. That is, since the conversion image coding features and the particle image coding features both belong to semantic features in a spatial domain, the association coding can be firstly performed to guarantee the reliability of the association coding. Moreover, since the frequency domain data coding feature belongs to semantic features in a frequency domain, which is different from the image association coding features in the spatial domain, the frequency domain data coding feature needs to be mapped in a feature space to perform the association coding in a similar feature domain (i.e., a similar semantic space), so that the reliability of the second association coding can be improved.
[0053] It can be understood that the specific manner of the first association coding of the particle image coding features in the step S142 is not limited, for example, in an alternative embodiment, in order to mine the complex potential semantic relationship through the first association coding, the step S142 can further include a step S142a, a step S142b, a step S142c and a step S142d, and the specific contents of each step are as follows (combined with the above description of the step S142). Figure 3 )。
[0054] The step S142a sorts the plurality of conversion image coding features in an order from large to small according to the range of the low-frequency mask to form a first coding feature sequence.
[0055] In the embodiment of the present application, the plurality of conversion image coding features can be sorted in an order from large to small according to the range of the low-frequency mask to form a first coding feature sequence, that is, sorted in an order from large to small according to the size of the rectangular region.
[0056] The step S142b forwards traverses the first coding feature sequence at an a-th time step to form a conversion image coding feature at the a-th time step.
[0057] In the embodiment of the present application, after the first coding feature sequence is formed, the first coding feature sequence can be forwardly traversed at an a-th time step to form a conversion image coding feature at the a-th time step, where a is an odd number greater than or equal to 1, such as the first time step, the third time step, the fifth time step, the seventh time step, etc.
[0058] The step S142c reversely traverses the first coding feature sequence at a b-th time step to form a conversion image coding feature at the b-th time step.
[0059] In the embodiment of the present application, after the first sequence of encoding features is formed, the first sequence of encoding features can be traversed reversely at the bth time step to form the converted image encoding feature of the bth time step. Wherein, b is an even number greater than 1, such as the second time step, the fourth time step, the sixth time step, the eighth time step, etc. When the converted image encoding feature of the current time step coincides with the converted image encoding feature of the next time step, the traversal is stopped.
[0060] Step S142d, based on the order in which each of the converted image encoding features is traversed, sequentially performing first associated encoding on the particle image encoding features to form image associated encoding features.
[0061] In the embodiment of the present application, the particle image encoding features can be sequentially first associated encoded based on the order in which each of the converted image encoding features is traversed to form image associated encoding features, such as the first converted image encoding feature, the last converted image encoding feature, the second converted image encoding feature, etc. In this way, the difference between two adjacent traversed converted image encoding features can be gradually reduced over time, so that the amount of information fusion can be gradually increased, and the size of the rectangular region corresponding to the intermediate converted image encoding feature is moderate, which can avoid the problem of excessive loss of high-frequency component semantic information or excessive attention to low-frequency component semantic information caused by ending the associated encoding from the beginning and end of the sequence.
[0062] It can be understood that in the above step S142d, the specific way of sequentially first associated encoding the particle image encoding features is not limited, for example, in an alternative embodiment, considering that the converted image encoding features and the particle image encoding features both belong to spatial domain semantic features, therefore, taking one as the basis for adjusting the other has relative reliable stability, which can guarantee the reliability of the first associated encoding, so the above step S142d can include: Firstly, for the first converted image coding feature traversed, full connection processing is performed on the converted image coding feature (i.e. the converted image coding feature is multiplied by a weight matrix of full connection to obtain a corresponding multiplied feature, and then the multiplied feature can be added with a bias parameter of full connection to complete the full connection processing), to obtain a full connection feature, and activation is performed on the full connection feature (such as by sigmiod function), to form an activated feature, and each parameter in the activated feature is taken as a weight coefficient of a parameter at a corresponding position in the particle image coding feature, to perform parameter adjustment (i.e. multiplication of the weight coefficient and the corresponding parameter) on the particle image coding feature, to form an adjusted particle image coding feature, and the particle image coding feature and the adjusted particle image coding feature are added (to avoid loss of global semantic information), to form a local correlation coding feature corresponding to the first converted image coding feature; Secondly, for the first converted image coding feature traversed, full connection processing is performed on the converted image coding feature (i.e. the converted image coding feature is multiplied by a weight matrix of full connection to obtain a corresponding multiplied feature, and then the multiplied feature can be added with a bias parameter of full connection to complete the full connection processing), to obtain a full connection feature, and activation is performed on the full connection feature (such as by sigmiod function), to form an activated feature, and each parameter in the activated feature is taken as a weight coefficient of a parameter at a corresponding position in the particle image coding feature, to perform parameter adjustment (i.e. multiplication of the weight coefficient and the corresponding parameter) on the particle image coding feature, to form an adjusted particle image coding feature, and the particle image coding feature and the adjusted particle image coding feature are added (to avoid loss of global semantic information), to form a local correlation coding feature corresponding to the first converted image coding feature; Finally, based on the local correlation coding feature corresponding to the last converted image coding feature, an image correlation coding feature can be formed, for example, the local correlation coding feature corresponding to the last converted image coding feature can be directly taken as the image correlation coding feature.
[0063] It can be understood that the specific manner of performing second correlation coding on the image correlation coding feature in the above step S143 is not limited, for example, in an alternative embodiment, in order to mine complex potential semantic relationships through second correlation coding, the above step S143 can further include steps S143a, S143b, S143c and S143d, and the specific contents of each step are as follows (in combination with Figure 4 ).
[0064] Step S143a, according to the order of the range of low-frequency masks from large to small, the multiple frequency domain data coding features are sorted to form a second coding feature sequence.
[0065] In the embodiments of the present application, the plurality of frequency domain data coding features can be sorted in the order of the low-frequency mask range from large to small to form a second coding feature sequence, that is, sorted in the order of the size of the rectangular region from large to small.
[0066] In step S143b, the second coding feature sequence is traversed forward at the cth time step to form a frequency domain data coding feature at the cth time step.
[0067] In the embodiments of the present application, after the second coding feature sequence is formed, the second coding feature sequence can be traversed forward at the cth time step to form a frequency domain data coding feature at the cth time step. Wherein c is an odd number greater than or equal to 1, such as the first time step, the third time step, the fifth time step, the seventh time step, etc.
[0068] In step S143c, the second coding feature sequence is traversed backward at the dth time step to form a frequency domain data coding feature at the dth time step.
[0069] In the embodiments of the present application, after the second coding feature sequence is formed, the second coding feature sequence can be traversed backward at the dth time step to form a frequency domain data coding feature at the dth time step. Wherein d is an even number greater than 1, such as the second time step, the fourth time step, the sixth time step, the eighth time step, etc. When the frequency domain data coding feature at the current time step coincides with the frequency domain data coding feature at the next time step, the traversal is stopped.
[0070] In step S143d, the image-related coding feature is sequentially secondly associated coded based on the order in which each of the frequency domain data coding features is traversed to form an image coding feature.
[0071] In the embodiments of the present application, the image-related coding feature can be sequentially secondly associated coded based on the order in which each of the frequency domain data coding features is traversed to form an image coding feature, such as the first frequency domain data coding feature, the last frequency domain data coding feature, the second frequency domain data coding feature, etc. In this way, the difference between two adjacent frequency domain data coding features traversed can be gradually reduced over time, so that the amount of information fusion can be gradually increased, and the size of the rectangular region corresponding to the intermediate frequency domain data coding feature is moderate, which can avoid the problem of excessive loss of semantic information of high-frequency components or excessive attention to semantic information of low-frequency components caused by ending the associated coding from both ends of the sequence.
[0072] It can be understood that in the step S143d, the specific manner of sequentially performing the second associated coding on the image associated coding feature is not limited, for example, in an alternative embodiment, considering that the frequency domain data coding feature and the image associated coding feature belong to the semantic features of the frequency domain and the semantic features of the spatial domain respectively, if one of them is directly used as the basis for adjustment of the other, it is difficult to guarantee the reliability of the second associated coding, so the step S143d includes: Firstly, for the first frequency domain data coding feature traversed, the image associated coding feature is adjusted based on the attention parameter between the frequency domain data coding feature and the image associated coding feature (i.e. the query vector corresponding to the frequency domain data coding feature and the transpose vector of the key vector corresponding to the image associated coding feature are multiplied by the matrix to obtain the corresponding attention parameter), that is, the image associated coding feature is adjusted based on the attention parameter (i.e. weighted summation based on the attention parameter, so that cross-attention processing of the image associated coding feature based on the frequency domain data coding feature can be realized), that is, by performing cross-attention processing, the capture of complex potential semantic relationships can be realized, thereby improving the reliability of the obtained coding feature, forming an adjusted image associated coding feature, and adding the image associated coding feature and the adjusted image associated coding feature (to avoid loss of global semantic information), forming a local associated coding feature corresponding to the first frequency domain data coding feature; Secondly, for the other frequency domain data coding features except the first one traversed, the local associated coding feature corresponding to the previous frequency domain data coding feature is adjusted based on the attention parameter between the frequency domain data coding feature and the local associated coding feature, forming an adjusted local associated coding feature, and adding the local associated coding feature and the adjusted local associated coding feature, forming a local associated coding feature corresponding to the current frequency domain data coding feature; Finally, the image coding feature can be formed based on the local associated coding feature corresponding to the last frequency domain data coding feature, for example, the local associated coding feature corresponding to the last frequency domain data coding feature can be directly used as the image coding feature.
[0073] In combination Figure 5 The embodiments of the present application also provide a product quality analysis device applicable to the above-mentioned electronic device. The product quality analysis device can include a frequency domain data acquisition module, a low-frequency mask module, an inverse Fourier transform module, an image associated coding module and an encoding feature decoding module.
[0074] In details, the frequency domain data obtaining module can be configured to obtain a lithium hydroxide particle image, and perform Fourier transform on the lithium hydroxide particle image to form first particle frequency domain data. The lithium hydroxide particle image is formed by image collection of the lithium hydroxide particle by an electron microscope. In the embodiment of the present application, the frequency domain data obtaining module can be configured to perform Figure 2 The step S110 is shown, and the related content of the frequency domain data obtaining module can be referred to the foregoing description of the step S110.
[0075] In details, the low frequency mask module can be configured to perform at least one low frequency mask on the first particle frequency domain data to form at least one second particle frequency domain data. One low frequency mask corresponds to one second particle frequency domain data. In the embodiment of the present application, the low frequency mask module can be configured to perform Figure 2 The step S120 is shown, and the related content of the low frequency mask module can be referred to the foregoing description of the step S120.
[0076] In details, the inverse Fourier transform module can be configured to perform inverse Fourier transform on each of the second particle frequency domain data to form at least one lithium hydroxide conversion image. In the embodiment of the present application, the inverse Fourier transform module can be configured to perform Figure 2 The step S130 is shown, and the related content of the inverse Fourier transform module can be referred to the foregoing description of the step S130.
[0077] In details, the image correlation coding module can be configured to perform correlation coding on the lithium hydroxide particle image based on the at least one lithium hydroxide conversion image and the at least one second particle frequency domain data to form image coding features. In the embodiment of the present application, the image correlation coding module can be configured to perform Figure 2 The step S140 is shown, and the related content of the image correlation coding module can be referred to the foregoing description of the step S140.
[0078] In details, the coding feature decoding module can be configured to decode the image coding features to form image decoding data. The image decoding data is used to represent the quality of the lithium hydroxide particle in the particle size distribution dimension. In the embodiment of the present application, the coding feature decoding module can be configured to perform Figure 2 The step S150 is shown, and the related content of the coding feature decoding module can be referred to the foregoing description of the step S150.
[0079] In the embodiments of the present application, corresponding to the product quality analysis method applied to the electronic device described above, a computer readable storage medium is also provided, and the computer readable storage medium stores a computer program. When the computer program runs, it executes each step of the product quality analysis method.
[0080] Wherein, each step executed by the computer program when running is not repeated here, and can be referred to the previous explanation of the product quality analysis method.
[0081] In summary, the product quality analysis method, device, equipment and medium provided by the present application, first, the lithium hydroxide particle image is obtained, and the Fourier transform is performed on the lithium hydroxide particle image to form the first particle frequency domain data; second, at least one second particle frequency domain data is formed by performing at least one low frequency mask on the first particle frequency domain data; then, inverse Fourier transform is performed on each second particle frequency domain data to form at least one lithium hydroxide conversion image; further, the lithium hydroxide particle image is associated with the coding based on at least one lithium hydroxide conversion image and at least one second particle frequency domain data to form image coding features; finally, the image coding features are decoded to form image decoding data. Based on the above content, since the low frequency component is usually related to the overall distribution of the particle and the background information, and the high frequency component is related to the surface details and edges of the particle, by performing low frequency mask, the second particle frequency domain data formed can focus on the high frequency component, so as to realize the key mining of the edge information, so that the coding features formed can accurately represent the edge information, so as to guarantee the reliability of the decoding in the granularity (size) distribution dimension. And, inverse Fourier transform is also performed, so that the lithium hydroxide particle image can be associated with the coding based on the spatial domain lithium hydroxide conversion image and the time domain second particle frequency domain data, to further improve the reliability of the associated coding, so as to improve the problem of relatively low reliability of the quality analysis of the lithium hydroxide particle in the prior art.
[0082] In several embodiments provided by the embodiments of the present application, it should be understood that the disclosed apparatus and method can also be implemented by other manners. The apparatus and method embodiments described above are only illustrative. For example, the flowchart and block diagram in the drawings show the possible implementation architecture, function and operation of the apparatus, method and computer program product according to the embodiments of the present application. In this regard, each block in the flowchart or block diagram can represent a module, a program segment or a part of code, which includes one or more executable instructions for implementing the specified logic function. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur in different order from that shown in the drawings. For example, two consecutive blocks can actually be executed substantially in parallel, and sometimes they can be executed in reverse order, depending on the function involved. It should also be noted that each block in the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for implementing the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0083] In addition, each functional module in the embodiments of the present application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0084] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application can be embodied in the form of a software product, and the computer software product is stored in a storage medium, and includes a number of instructions for causing a computer device (which can be a personal computer, an electronic device, or a network device, etc.) to execute all or part of the steps of the methods described in the embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes. It should be noted that in this document, the terms "include", "contain" or any other variant thereof are intended to cover non-exclusive inclusion, so that the processes, methods, articles or devices that include a series of elements not only include those elements, but also include other elements not explicitly listed, or include elements inherent to such processes, methods, articles or devices. Without more limitations, the element defined by the statement "includes a" does not exclude the presence of another identical element in the process, method, article or device that includes the element.
[0085] The above descriptions are only the preferred embodiment of the present application, but not for limiting the present application. For those skilled in the art, the present application can have various modifications and changes. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A product quality analysis method, characterized in that, include: Acquire images of lithium hydroxide particles and perform Fourier transform on the lithium hydroxide particle images to form first particle frequency domain data. The lithium hydroxide particle images are formed by image acquisition operations on lithium hydroxide particles using an electron microscope. The first particle frequency domain data is subjected to at least one low-frequency mask to form at least one second particle frequency domain data, wherein one low-frequency mask corresponds to one second particle frequency domain data. Perform inverse Fourier transform on each of the frequency domain data of the second particle to form at least one lithium hydroxide transformation image; Based on the at least one lithium hydroxide conversion image and the at least one second particle frequency domain data, the lithium hydroxide particle image is correlated and encoded to form image coding features; The image encoding features are decoded to form image decoding data, wherein the image decoding data is used to characterize the quality of the lithium hydroxide particles in the particle size distribution dimension.
2. The product quality analysis method according to claim 1, characterized in that, The step of performing at least one low-frequency mask on the first particle frequency domain data to form at least one second particle frequency domain data includes: Based on the size of the first particle frequency domain data, an initial parameter matrix is generated, wherein the size of the initial parameter matrix is the same as the size of the first particle frequency domain data, and each parameter in the initial parameter matrix is equal to 1; Using the center point of the initial parameter matrix as the center, randomly determine a rectangular region with a size smaller than the size of the initial parameter matrix, and update all parameters in the rectangular region to 0; By performing the step of randomly determining a rectangular region with a size smaller than the size of the initial parameter matrix centered at the center point of the initial parameter matrix, and updating each parameter in the rectangular region to 0 at least once, at least one update parameter matrix is formed. Wherein, when the number of executions of this step is greater than or equal to 2, the size of the rectangular region determined randomly in each two executions is different. Each of the updated parameter matrices and the first particle frequency domain data are multiplied bitwise to achieve a low-frequency mask, forming at least one second particle frequency domain data.
3. The product quality analysis method according to claim 1 or 2, characterized in that, The step of associating and encoding the lithium hydroxide particle image based on the at least one lithium hydroxide converted image and the at least one second particle frequency domain data to form image coding features includes: Semantic coding is performed on the at least one lithium hydroxide converted image, the at least one second particle frequency domain data and the lithium hydroxide particle image respectively to form at least one converted image coding feature, at least one frequency domain data coding feature and particle image coding feature; Based on the at least one transformed image coding feature, the particle image coding feature is subjected to a first association coding to form an image association coding feature; Based on the at least one frequency domain data coding feature, the image association coding feature is subjected to a second association coding to form an image coding feature, wherein the second association coding includes feature space mapping of the frequency domain data coding feature.
4. The product quality analysis method according to claim 3, characterized in that, The step of performing a first association coding on the particle image coding features based on the at least one transformed image coding feature to form image association coding features includes: The coding features of multiple transformed images are sorted in descending order of the range of the low-frequency mask to form the first coding feature sequence; At the a-th time step, the first encoded feature sequence is traversed in a forward direction to form the transformed image encoded feature at the a-th time step, where a is an odd number greater than or equal to 1; At the b-th time step, the first encoded feature sequence is traversed in reverse to form the transformed image encoded feature at the b-th time step, where b is an even number greater than 1. The traversal stops when the transformed image encoded feature at the current time step coincides with the transformed image encoded feature at the next time step. Based on the order in which each of the transformed image coding features is traversed, the particle image coding features are sequentially subjected to first association coding to form image association coding features.
5. The product quality analysis method according to claim 4, characterized in that, The step of performing a first association encoding on the particle image encoding features sequentially based on the order in which each of the transformed image encoding features is traversed, to form image association encoding features, includes: For the first transformed image coding feature traversed, a fully connected process is performed on the transformed image coding feature to obtain a fully connected feature. The fully connected feature is then activated to form an activated feature. Each parameter in the activated feature is used as a weight coefficient of the parameter at the corresponding position in the particle image coding feature to adjust the parameters of the particle image coding feature and form an adjusted particle image coding feature. Finally, the particle image coding feature and the adjusted particle image coding feature are added together to form the local association coding feature corresponding to the first transformed image coding feature. For the transformed image coding features other than the first one traversed, the transformed image coding features are fully connected to obtain fully connected features. The fully connected features are then activated to form activated features. Each parameter in the activated features is used as a weight coefficient of the parameter at the corresponding position in the local association coding feature corresponding to the previous transformed image coding feature to adjust the parameters of the local association coding feature to form an adjusted local association coding feature. Finally, the local association coding feature and the adjusted local association coding feature are added together to form the local association coding feature corresponding to the current transformed image coding feature. Based on the local correlation coding features corresponding to the coding features of the last transformed image, image correlation coding features are formed.
6. The product quality analysis method according to claim 3, characterized in that, The step of performing a second association coding on the image association coding features based on the at least one frequency domain data coding feature to form image coding features includes: The encoding features of multiple frequency domain data are sorted in descending order of the range of the low-frequency mask to form a second encoding feature sequence; At the c-th time step, the second coding feature sequence is traversed in a forward direction to form the frequency domain data coding feature at the c-th time step, where c is an odd number greater than or equal to 1; At the d-th time step, the second coding feature sequence is traversed in reverse to form the frequency domain data coding feature at the d-th time step, where d is an even number greater than 1. The traversal stops when the frequency domain data coding feature at the current time step coincides with the frequency domain data coding feature at the next time step. Based on the order in which each frequency domain data coding feature is traversed, the image association coding features are sequentially subjected to second association coding to form image coding features.
7. The product quality analysis method according to claim 6, characterized in that, The step of performing a second association encoding on the image association encoding features sequentially based on the order in which each of the frequency domain data encoding features is traversed, to form image encoding features, includes: For the first frequency domain data coding feature traversed, the image association coding feature is adjusted based on the attention parameter between the frequency domain data coding feature and the image association coding feature to form an adjusted image association coding feature. Then, the image association coding feature and the adjusted image association coding feature are added together to form the local association coding feature corresponding to the first frequency domain data coding feature. For frequency domain data coding features other than the first one traversed, the parameters of the local correlation coding features are adjusted based on the attention parameters between the frequency domain data coding features and the local correlation coding features corresponding to the previous frequency domain data coding features, forming the adjusted local correlation coding features. The local correlation coding features and the adjusted local correlation coding features are then added together to form the local correlation coding features corresponding to the current frequency domain data coding features. Image coding features are formed based on the local correlation coding features corresponding to the last frequency domain data coding features.
8. A product quality analysis device, characterized in that, include: The frequency domain data acquisition module is used to acquire images of lithium hydroxide particles and perform Fourier transform on the lithium hydroxide particle images to form first particle frequency domain data. The lithium hydroxide particle images are formed by image acquisition operations on lithium hydroxide particles using an electron microscope. A low-frequency masking module is used to perform at least one low-frequency masking on the first particle frequency domain data to form at least one second particle frequency domain data, wherein one low-frequency masking corresponds to one second particle frequency domain data. The inverse Fourier transform module is used to perform inverse Fourier transform on each of the frequency domain data of the second particle to form at least one lithium hydroxide transformed image; An image association coding module is used to perform association coding on the lithium hydroxide particle image based on the at least one lithium hydroxide converted image and the at least one second particle frequency domain data to form image coding features; The encoding feature decoding module is used to decode the image encoding features to form image decoding data, wherein the image decoding data is used to characterize the quality of the lithium hydroxide particles in the particle size distribution dimension.
9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor connected to the memory is used to execute the computer program stored in the memory to implement the product quality analysis method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium contains a computer program that, when executed, performs the product quality analysis method according to any one of claims 1-7.
Citation Information
Patent Citations
Bidirectional feature fusion deep convolutional neural network construction method based on discrete wavelet transform
CN113435376A
Image feature enhancement algorithm fusing frequency domain and spatial domain features
CN118172635A
Low-illumination image enhancement network and image enhancement method
CN118247164A
Film grain measurement based on subband analysis in frequency domain
US20250117909A1
Image processing algorithm for characterization of uniformity of printed images
US6571000B1