Material granularity measurement method, device and equipment and storage medium
By segmenting the material image into multiple sub-maps and performing fusion processing, the problem of high hardware requirements for material particle size measurement in the prior art and poor recognition effect is solved, and higher measurement accuracy and efficiency are achieved.
Patent Information
- Application Number
- CN202510026452.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-08
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2045-01-08
AI Technical Summary
Existing material particle size measurement methods have high hardware requirements and poor recognition effect, especially in the recognition of small particles.
By dividing the material image into multiple sub-maps for processing, and fusing the recognition results of each sub-maps, the recognition results of the entire image are obtained, and the material particle size measurement is performed. Specific steps include acquiring material images, image segmentation, image recognition, particle fusion and particle size measurement.
It improves the accuracy and efficiency of material particle size measurement, reduces the hardware requirements, is suitable for particle size analysis of various materials, ensures that the chunked material images will not lose key information during the fusion process, and accurately reflect the true structure of the original material.
Smart Images

Figure CN119515956A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a material particle size measurement method, device, equipment and storage medium. Background Art
[0002] Material particle size detection is a very important analytical technique in the field of materials science and engineering, which involves measuring the size distribution of various materials (such as powders, granules, fibers, etc.). The results of particle size detection are of great significance for understanding the physical properties, chemical reactivity, flow characteristics and final application performance of the material.
[0003] Traditional particle size measurement methods such as screening and laser scattering have problems such as complex operation, long time consumption, and limited accuracy. In recent years, particle size measurement methods based on image recognition have attracted attention due to their advantages such as rapidity, non-contact, and rich information. However, the processing of high-resolution images has high hardware requirements, and the recognition effect of small particles is not good. Summary of the invention
[0004] The main purpose of this application is to provide a material particle size measurement method, device, equipment and storage medium, aiming to solve the current technical problems that material particle size measurement has high hardware requirements and poor recognition effect.
[0005] In a first aspect, the present application provides a material particle size measurement method, the material particle size measurement method comprising: Get the current material image; Perform image segmentation on the current material image to obtain multiple block material images; Performing image recognition on a plurality of block material images to obtain regional features of the block material images; Based on the regional features of the block material images, a particle fusion process is performed on the multiple block material images to obtain a fused image; The material particle size is measured based on the fused image.
[0006] In this solution, the image is divided into multiple sub-images for processing, and the recognition results of each sub-image are fused to obtain the recognition result of the entire image, so that the material particle size is measured based on the fused image, which improves the measurement accuracy and efficiency. It is suitable for particle size analysis of various materials and effectively reduces the hardware requirements.
[0007] In some embodiments, performing particle fusion processing on multiple block material images based on the regional features of the block material images to obtain a fused image includes: Performing boundary detection on a plurality of block material images based on the regional features of the block material images to obtain boundary features of each block material image; Perform boundary matching based on boundary features to obtain matching results; When the matching result is that the boundary features match consistently, particles are fused based on the boundary features to obtain a fused image.
[0008] In this scheme, accurate particle fusion is achieved through boundary detection and matching, which ensures that key information is not lost in the fusion process of the block material image, and can accurately reflect the real structure of the original material, thereby improving the accuracy of particle size measurement.
[0009] In some embodiments, performing boundary detection on a plurality of block material images based on the block material image region features to obtain the boundary features of each block material image includes: Obtaining a segmentation mask of each block material image based on the regional features of the block material image; Perform boundary detection on each block material image according to the segmentation mask to obtain a boundary segmentation mask; The boundary features of each block material image are obtained according to the boundary segmentation mask.
[0010] In this scheme, segmentation masks are used for boundary detection, which makes the extraction of boundary features more accurate and automatic, reduces the need for manual intervention, and improves the speed and quality of image processing.
[0011] In some embodiments, performing boundary detection on each block material image according to the segmentation mask to obtain the boundary segmentation mask includes: Get the sub-image index of each block material image; Get the index number of the segmentation mask in the corresponding block material image; Obtain the segmentation mask index in each block material image according to the sub-image index and the index number; Determine the boundary segmentation mask based on the segmentation mask index.
[0012] In this scheme, the process of determining the boundary segmentation mask based on the sub-image index and the segmentation mask index enhances the flexibility and adaptability of boundary detection and can better adapt to different types of material images.
[0013] In some embodiments, boundary matching is performed based on boundary features, and the matching result obtained includes: Determining a boundary segmentation mask based on the boundary features; Get the boundary segmentation mask index of the boundary segmentation mask; Boundary matching is performed through the boundary segmentation mask index to obtain the matching result.
[0014] In this scheme, a matching method based on boundary segmentation mask index is proposed, which simplifies the matching logic, improves the success rate and speed of boundary matching, and thus speeds up the entire particle fusion processing.
[0015] In some embodiments, boundary matching is performed by using the boundary segmentation mask index, and the matching result obtained includes: Match the target segmentation mask of each boundary segmentation mask through the boundary segmentation mask index; When matching the target segmentation mask, determining the matching result as a boundary feature match consistency; When the target segmentation mask is not matched, it is determined that the matching result is inconsistent with the boundary feature matching.
[0016] In this scheme, it is specifically explained how to match the target segmentation mask through the boundary segmentation mask index, further clarifying the operational details of the boundary matching and ensuring the reliability and accuracy of the matching results.
[0017] In some embodiments, when the matching result is that the boundary features match consistently, performing particle fusion based on the boundary features to obtain a fused image includes: When the matching result is consistent with the boundary feature match, the target segmentation mask is obtained based on the boundary feature; Get the target segmentation mask index; Pair the target segmentation mask indexes to obtain target index pairs, and summarize the target index pairs to obtain a target index pair list; Fusing the target index pair list to obtain a fused index pair list; Get the segmentation mask index that does not match the consistency; The fused image is obtained based on the list of unmatched segmentation mask indices and fusion index pairs.
[0018] In this scheme, particles are fused for matching consistent boundary features, including generating a target index pair list and a fusion index pair, which ensures the transparency and controllability of the fusion process and improves the quality of the final fused image.
[0019] In some embodiments, performing image segmentation on the current material image to obtain a plurality of segmented material images includes: Get material properties; The current material image is segmented according to the material properties to obtain a plurality of segmented material images.
[0020] In this scheme, image segmentation is performed according to material properties, making the segmentation process more targeted and scientific, and being able to more accurately reflect the actual structure of the material, providing a better basis for subsequent image recognition and particle size measurement.
[0021] In some embodiments, performing image segmentation on the current material image according to the material properties to obtain a plurality of segmented material images includes: Obtain particle size and particle distribution density based on material properties; The current material image is segmented according to the particle size and particle distribution density to obtain a plurality of segmented material images.
[0022] In this scheme, the particle size and distribution density are taken into consideration for segmentation, which makes the segmentation strategy closer to the actual situation of the material, improves the effect of image segmentation, and thus improves the accuracy of particle size measurement.
[0023] In some embodiments, performing image recognition on a plurality of block material images to obtain the block material image region features includes: Inputting a plurality of block material images into a target image recognition model, extracting image features through a backbone network in the target image recognition model, and obtaining a first feature map; The first feature map is processed by a region generation network in a target image recognition model to generate a candidate region; Feature extraction is performed on the candidate region through the interest extraction network in the target image recognition model to obtain candidate features; The head network in the target image recognition model performs object detection and instance segmentation on the candidate features to obtain the category, bounding box and segmentation mask of each block material image; The block material image region features are obtained through categories, bounding boxes and segmentation masks.
[0024] In this solution, the trained target image recognition model is used to recognize the block material image, which not only improves the recognition speed, but also enhances the recognition accuracy. The role of each network layer in the target image recognition model is deeply analyzed, from image feature extraction to object detection and instance segmentation. This process ensures the high quality of the recognition results and provides a reliable basis for subsequent particle size measurement.
[0025] In some embodiments, obtaining the block material image region features by category, bounding box, and segmentation mask includes: Get object confidence based on the bounding box; filtering the block material image based on the object confidence to obtain a filtered block material image; The block material image region features are obtained according to the type, bounding box and segmentation mask of the filtered block material image.
[0026] In this scheme, the block material image is filtered by evaluating the object confidence, the low-quality or irrelevant information is removed, the most representative image part is retained, and the effectiveness and practicality of the regional features of the block material image are improved.
[0027] In some embodiments, the target image recognition model is trained by: Acquire a first training sample and a first verification sample, wherein the first training sample and the first verification sample include an original material image with a segmentation mask marked with particles; Initialize the deep learning model and determine the training parameters; The initialized deep learning model is trained using the first training sample and the training parameters to obtain a training result; Calculate the loss value based on the training results and the first validation sample; The training parameters of the initialized deep learning model are adjusted through the loss value to obtain the target image recognition model.
[0028] In this solution, the model is trained by using training samples and verification samples to obtain a target image recognition model. The target image recognition model can more quickly and accurately identify the segmentation mask in the image, thereby improving the accuracy and efficiency of recognition.
[0029] In some embodiments, the method further comprises: Amplifying the multiple block material images to obtain multiple amplified block material images; Accordingly, image recognition is performed on multiple block material images to obtain the block material image region features including: Image recognition is performed on a plurality of enlarged block material images to obtain the regional features of the block material images.
[0030] In this solution, by enlarging the block material image, the recognition difficulty problem caused by insufficient image resolution is solved, and the accuracy of image recognition is improved.
[0031] In some embodiments, performing image magnification on a plurality of segmented material images to obtain a plurality of magnified segmented material images comprises: Inputting a plurality of block material images into a target generator in an image magnification model, and performing image magnification on the plurality of block material images through the target generator to obtain a block image of a target resolution; Input the target resolution block image into the target discriminator in the image magnification model, and use the target discriminator to discriminate the target resolution block image to obtain a probability value; When the probability value is greater than or equal to a preset threshold, the target resolution block image is used as the enlarged block material image.
[0032] In this scheme, a trained image magnification model is used to magnify the images of block materials. The image magnification model including a target generator and a target discriminator is used to achieve efficient image magnification while ensuring the quality and authenticity of the magnification, which helps to improve the accuracy of subsequent image recognition and particle size measurement.
[0033] In some embodiments, inputting a plurality of block material images into a target generator in an image magnification model, and performing image magnification on the plurality of block images by the target generator to obtain block images of target resolution includes: Inputting a plurality of block material images into a target generator in an image magnification model, and magnifying the size of the images through a pre-upsampling layer in the target generator to obtain an initial block material image; Perform feature extraction and residual connection on the initial block material image through the residual block in the target generator to obtain a reference block material image; The reference block material image is convolved and upscaled through the post-processing layer in the target generator to obtain the target resolution block image.
[0034] In this scheme, the functions of each layer inside the target generator are explained in detail, such as the role of the pre-upsampling layer, the residual block, and the post-processing layer, which ensures the efficiency and stability of image enlargement and improves the visual effect and analytical value of the enlarged image.
[0035] In some embodiments, the target resolution block image is input into a target discriminator in the image magnification model, and the target resolution block image is discriminated by the target discriminator to obtain a probability value including: Input the target resolution block image into the target discriminator in the image magnification model, and convolve, normalize and activate the target resolution block image through multiple convolution layers, normalization layers and activation functions in the target discriminator to obtain a nonlinear activation map; The nonlinear activation map is pooled through the pooling layer in the target discriminator to obtain the second feature map; The second feature map is transformed through the fully connected layer in the target discriminator to obtain the probability value.
[0036] In this scheme, it is explained how the discriminator evaluates the enlarged image through convolution layers, normalization layers, activation functions, and pooling layers, and finally outputs a probability value, ensuring the scientificity and objectivity of the quality evaluation process of the enlarged image.
[0037] In some embodiments, the image magnification model is trained by: Acquire a second training sample and a third training sample, wherein the second training sample and the third training sample are material images at an initial resolution; Inputting the second training sample into the initial generator to generate target sample data; Inputting the third training sample and the target sample data into the initial discriminator for determination, and obtaining a determination result; The parameters are adjusted according to the judgment results to train the initial generator and the initial discriminator to obtain the target generator and the target discriminator; The image enlargement model is obtained through the target generator and the target discriminator.
[0038] In this proposal, an image enlargement model is described in which a generator and a discriminator are continuously optimized through training. This training method improves the robustness and adaptability of the model, enabling it to produce high-quality enlargement results when processing images of various materials.
[0039] In some embodiments, measuring the particle size of the material based on the fused image includes: Obtain the number of pixels according to the fused image; Calculate the equivalent diameter of pixel units based on the number of pixels; The equivalent diameter of the pixel unit is converted to obtain the equivalent diameter of the material particles.
[0040] In this scheme, the equivalent diameter of material particles is calculated based on the fused image, and the image information is converted into specific physical quantities, completing the complete closed loop from image analysis to particle size measurement, providing important technical support for materials science research and industrial applications.
[0041] In the second aspect, in order to achieve the above-mentioned purpose, the present application also proposes a material particle size measuring device, the device comprising: An acquisition module is used to acquire the current material image; A segmentation module is used to segment the current material image to obtain multiple block material images; A recognition module, used for performing image recognition on a plurality of block material images to obtain regional features of the block material images; A fusion module, used for performing particle fusion processing on multiple block material images based on the regional features of the block material images to obtain a fused image; The measurement module is used to measure the particle size of materials based on the fused image.
[0042] On the third aspect, in order to achieve the above-mentioned purpose, the present application also proposes a material particle size measurement device, the device comprising: a memory, a processor and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the material particle size measurement method as described above.
[0043] Fourthly, in order to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the material particle size measurement method as described above are implemented.
[0044] In a fifth aspect, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the material particle size measurement method as described above are implemented.
[0045] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Moreover, the same figure numbers are used throughout the drawings to represent the same components. In the drawings: Figure 1 A schematic diagram of a process flow of an embodiment of a material particle size measurement method proposed in an embodiment of the present application; Figure 2 A schematic diagram of a process flow of an embodiment of a material particle size measurement method proposed in an embodiment of the present application; Figure 3 A schematic diagram of a segmentation mask for fusion of block material images in an embodiment of a material particle size measurement method proposed in an embodiment of the present application; Figure 4 A schematic diagram of a process flow of an embodiment of a material particle size measurement method proposed in an embodiment of the present application; Figure 5 A schematic diagram of a process flow of an embodiment of a material particle size measurement method proposed in an embodiment of the present application; Figure 6 A schematic diagram of a process flow of an embodiment of a material particle size measurement method proposed in an embodiment of the present application; Figure 7 A schematic diagram of a process flow of an embodiment of a material particle size measurement method proposed in an embodiment of the present application; Figure 8 A schematic diagram of a process flow of an embodiment of a material particle size measurement method proposed in an embodiment of the present application; Fig. 9 A schematic diagram of the particle recognition effect of a certain material in an embodiment of the material particle size measurement method proposed in the embodiment of the present application; Fig.10 This is a schematic diagram of the module structure of the material particle size measuring device according to an embodiment of the present application; Fig.11 Schematic diagram of the equipment structure of the hardware operating environment involved in the material particle size measurement method in the embodiment of the present application.
[0047] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0048] The following embodiments of the technical solution of the present application will be described in detail in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present application, and are therefore only used as examples, and cannot be used to limit the scope of protection of the present application.
[0049] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by technicians in the technical field to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" in the specification and claims of this application and the above-mentioned figure descriptions and any variations thereof are intended to cover non-exclusive inclusions.
[0050] In the description of the embodiments of the present application, the technical terms "first", "second", etc. are only used to distinguish different objects, and cannot be understood as indicating or implying relative importance or implicitly indicating the number, specific order or primary and secondary relationship of the indicated technical features. In the description of the embodiments of the present application, the meaning of "multiple" is more than two, unless otherwise clearly and specifically defined.
[0051] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0052] In the description of the embodiments of the present application, the term "and / or" is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0053] In the description of the embodiments of the present application, the term "multiple" refers to more than two (including two). Similarly, "multiple groups" refers to more than two groups (including two groups), and "multiple pieces" refers to more than two pieces (including two pieces).
[0054] Material particle size detection is a very important analytical technique in the field of materials science and engineering, which involves measuring the size distribution of various materials (such as powders, granules, fibers, etc.).
[0055] In the field of materials science, accurate measurement of the particle size distribution of materials is crucial to evaluating their performance. Traditional particle size measurement methods such as screening and laser scattering have problems such as complex operation, long time consumption, and limited accuracy. In recent years, particle size measurement methods based on image recognition have attracted attention due to their advantages such as rapidity, non-contact, and rich information. However, the processing of high-resolution images has high hardware requirements, and the recognition effect of small particles is not good.
[0056] In addition, the current material particle size measurement will divide some particles into multiple particles when dividing the image. Since the erroneously divided particles are not finally merged, the calculated particle size characteristics are inaccurate, for example, the calculated number of particles is too large or the particle size is too small.
[0057] Therefore, in order to improve the accuracy of particle size measurement of materials such as electrodes and electrolytes in the battery field, the inventive concept of this application is: The image is divided into multiple sub-images for processing, and the recognition results of each sub-image are fused to obtain the regional features of the entire image. Finally, the material particle size characteristics are calculated based on the identified particles. By dividing the image into multiple sub-images for processing, the hardware requirements are effectively reduced, and the segmented sub-images are fused to improve the accuracy of material particle size measurement.
[0058] Specifically, this solution obtains a photographed material image and performs preprocessing, image segmentation, image recognition, and image fusion on the material image to obtain a fused image, calculates the material particle size characteristics based on the identified particles, and improves the accuracy of particle size measurement.
[0059] In practical applications, the embodiments described in this application are applied to scenarios for evaluating the particle size distribution and shape characteristics of materials. They can also be applied to scenarios for measuring the particle size distribution of electrode materials, catalysts, etc. in energy material fields such as batteries and fuel cells, but this embodiment does not impose any restrictions on this.
[0060] This application aims to solve the technical problem of low accuracy of material particle size measurement and proposes a material particle size measurement method. Figure 1 In this example, the material particle size measurement methods include: Step S10: Acquire the current material image.
[0061] It should be noted that the current material image is an image of electrodes, catalysts and other related materials taken by a camera, and may also be an image of other new energy materials, which is not limited in this embodiment.
[0062] In a specific implementation, the current material image may be an image that has been preprocessed after being photographed, and the preprocessing process may include denoising, contrast enhancement, etc. Acquiring the current material image may specifically include: photographing the target material using a high-resolution camera (resolution may be 20 million pixels, 30 million pixels, etc.) to ensure image clarity and rich details. After the image of the material is photographed, image processing software (such as OpenCV) may be used for preprocessing, which may specifically include denoising, contrast enhancement, correction, etc. Denoising may use a median filter to denoise the photographed material image, and the specific parameters may be set to a window size of 3×3, thereby filtering out random noise in the photographed material image, and using histogram equalization technology to enhance the contrast of the material image after the noise is filtered out, thereby improving the distinction between particles and background, and obtaining an enhanced material image, and using a camera correction algorithm to correct the enhanced material image, thereby correcting lens distortion, ensuring image geometry accuracy, and obtaining the current material image, so as to improve the accuracy of subsequent recognition.
[0063] Step S20: performing image segmentation on the current material image to obtain a plurality of segmented material images.
[0064] In the specific implementation, in order to reduce the processing requirements for hardware, the current material image can be divided into multiple sub-images for processing. Therefore, a certain material segmentation strategy can be used to perform image segmentation on the current material image and divide the current material image into multiple sub-blocks to obtain multiple block material images.
[0065] Step S30: performing image recognition on a plurality of block material images to obtain the regional features of the block material images.
[0066] It can be understood that image recognition mainly identifies feature information in each block material image. The block material image region features may include feature information of each block material image. The feature information may include particle category, bounding box, segmentation mask, etc.
[0067] In a specific implementation, a certain feature extraction method or feature extraction model may be used to perform feature recognition on each block material image, thereby obtaining feature information of each block material image.
[0068] Step S40: performing particle fusion processing on multiple block material images based on the regional features of the block material images to obtain a fused image.
[0069] It should be noted that the material image can be subjected to particle fusion processing according to the characteristic information of each block material image, and the boundaries of particles that may be cut can be identified, so that the wrongly segmented particles can be merged, and the cut particles can be merged into a complete particle.
[0070] In a specific implementation, it can be determined whether the particles in adjacent small blocks in each block material image are adjacent, thereby deciding whether to merge the particles and finally obtaining a fused image.
[0071] Step S50: measuring the particle size of the material according to the fused image.
[0072] It should be understood that after obtaining the fused image, the particle size of the material can be measured based on the fused image, for example, the equivalent diameter of the particle size, the area of the particle size and other data can be calculated to finally obtain the measurement result.
[0073] In a specific implementation, the particle size and distribution of the material can be detected according to the particle size measurement results, thereby realizing material analysis, material development and other purposes.
[0074] This embodiment obtains the current material image; performs image segmentation on the current material image to obtain multiple block material images; performs image recognition on the multiple block material images to obtain the regional features of the block material images; performs particle fusion processing on the multiple block material images based on the regional features of the block material images to obtain a fused image; and performs material particle size measurement based on the fused image. By dividing the image into multiple sub-images for processing, and then fusing the recognition results of each sub-image to obtain the recognition result of the entire image, the material particle size is measured based on the fused image, which improves the measurement accuracy and efficiency, is applicable to the particle size analysis of various materials, and effectively reduces the hardware requirements.
[0075] In some embodiments, the particle fusion of each block material image is specifically to fuse the wrongly segmented particles, referring to Figure 2 , step S40 may include: Step S401: performing boundary detection on a plurality of block material images based on the regional features of the block material images to obtain boundary features of each block material image.
[0076] It should be noted that the boundary detection of each block material image can be performed through the feature information in the block material image region feature, so as to obtain the boundary feature of each block material image. The boundary feature can be the feature information of each block material image at the boundary. For example, if the boundary feature is a segmentation mask, the segmentation mask of each block material image can be obtained through the block material image region feature, so as to perform boundary detection, and thus obtain the boundary mask located at each block material image.
[0077] In a feasible implementation, step S401 may include: Step A10: obtaining a segmentation mask of each block material image based on the regional features of the block material image.
[0078] It should be noted that the block material image region features may include the segmentation mask of each block material image. Segmentation Mask is a concept in the field of image segmentation. It is an image used to indicate the pixel ownership of different regions or objects in another image. The segmentation mask can be a binary mask, a multi-category mask, an instance mask, etc.
[0079] In this embodiment, the segmentation mask may be a binary mask, which is a binary image in a visualized form. The segmentation mask is particles in each block material image. Characterizing the particles as a segmentation mask facilitates subsequent processing of the particles.
[0080] In a feasible implementation, each block material image has a corresponding index, so the specific index can be determined, so that boundary detection can be performed quickly, and step A10 includes: obtaining the sub-image index of each block material image; obtaining the index number of the segmentation mask in the corresponding block material image; obtaining the segmentation mask index in each block material image according to the sub-image index and the index number; and determining the boundary segmentation mask according to the segmentation mask index.
[0081] It should be noted that if Figure 3 As shown, for example, the number of block material images is 4, that is, the current material image is divided into 4 sub-images, each sub-image has multiple segmentation masks, and the number of segmentation masks in each sub-image can be equal or unequal, which is specifically related to the distribution of particles.
[0082] Each sub-image has a corresponding sub-image index, expressed as (i, j), that is, the index of the sub-image. For example, among the four sub-images, the sub-image indices are M1 (0, 0), M2 (0, 1), M3 (1, 0), and M4 (1, 1). In each sub-image (block material image), the segmentation mask has different index numbers at different positions. k is used to represent the index number of the segmentation mask in each sub-image in the corresponding sub-image. For example, in sub-image M1 (0, 0), the index number of the segmentation mask includes 0 and 1; in sub-image M2 (0, 1), the index number of the segmentation mask includes 1 and 0; in sub-image M3 (1, 0), the index number of the segmentation mask includes 0, 1, and 2; in sub-image M4 (1, 1), the index number of the segmentation mask includes 0 and 1.
[0083] In a specific implementation, the segmentation mask index in each block material image can be obtained according to the obtained sub-image index and index number, and the segmentation mask index is represented by (i, j, k). Therefore, the segmentation mask index in sub-image M1 (0,0) is (0,0,0) and (0,0,1); the segmentation mask index in sub-image M2 (0,1) is (0,1,0) and (0,1,1); the segmentation mask index in sub-image M3 (1,0) is (1,0,0), (1,0,1) and (1,0,2); the segmentation mask index in sub-image M4 (1,1) is (1,1,0) and (1,1,1).
[0084] It can be understood that the segmentation mask index located at the boundary in the segmentation mask index of each sub-image can be used to obtain the boundary segmentation mask index. For example, the boundary segmentation mask index in sub-image M3 (1,0) is (1,0,0) and (1,0,1). By screening the segmentation mask index of each sub-image, the boundary segmentation mask index in each sub-image is obtained, and then the boundary segmentation mask and the specific position of the boundary segmentation mask are determined. The process of determining the boundary segmentation mask based on the sub-image index and the segmentation mask index enhances the flexibility and adaptability of boundary detection, and can better adapt to different types of material images.
[0085] Step A11: Perform boundary detection on each block material image according to the segmentation mask to obtain a boundary segmentation mask.
[0086] It should be understood that the positions of all segmentation masks in each block material image can be determined, so as to perform boundary detection on each block material image and obtain a boundary segmentation mask among all segmentation masks, that is, a segmentation mask located at the boundary position of the block material image.
[0087] Step A12: Obtain boundary features of each segmented material image according to the boundary segmentation mask.
[0088] In a specific implementation, the boundary features of each block material image can be the boundary segmentation mask of each block material image, so the boundary features of each block material image can be determined according to the boundary segmentation mask. Using the segmentation mask for boundary detection makes the extraction of boundary features more accurate and automatic, reduces the need for manual intervention, and improves the speed and quality of image processing.
[0089] Step S402: performing boundary matching based on boundary features to obtain matching results.
[0090] It should be noted that, since the boundary feature includes a boundary segmentation mask, boundary matching can be performed according to the boundary segmentation mask to obtain a matching result.
[0091] The matching result can be a consistent boundary feature match or an inconsistent boundary feature match. A consistent boundary feature match indicates that the boundary segmentation masks (particles) in adjacent block particle images are adjacent, for example, the boundary segmentation masks in sub-image M1 and sub-image M2 have adjacent segmentation masks. An inconsistent boundary feature match indicates that the boundary segmentation masks (particles) in adjacent block particle images are not adjacent, that is, the boundary segmentation masks in sub-image M1 and sub-image M2 do not have adjacent segmentation masks.
[0092] In a feasible implementation, step S402 may include: Step A20: Determine a boundary segmentation mask based on the boundary features.
[0093] It should be noted that the boundary feature includes a boundary segmentation mask, so the boundary segmentation mask can be obtained according to the boundary feature. Specifically, the boundary segmentation mask of each sub-image can be obtained according to the boundary feature in each sub-image.
[0094] Step A21: Obtain a boundary segmentation mask index of the boundary segmentation mask.
[0095] It should be understood that each boundary segmentation mask corresponds to a boundary segmentation mask index, so the boundary segmentation mask indexes of all sub-images of the blocks can be obtained. Figure 3 As shown, there are 9 segmentation masks in total, of which there are 5 boundary segmentation masks, and the corresponding boundary segmentation mask indexes are (0,0,1), (0,1,1), (1,0,0), (1,0,1), (1,1,0).
[0096] Step A22: Perform boundary matching through the boundary segmentation mask index to obtain a matching result.
[0097] It should be noted that the boundary matching can be performed through the boundary segmentation mask index, and specifically, it can be determined whether the boundary segmentation masks are adjacent, so as to determine whether the matching is consistent and obtain the adjacent matching result. The method of matching based on the boundary segmentation mask index simplifies the matching logic, improves the success rate and speed of boundary matching, and thus speeds up the entire particle fusion processing.
[0098] In a feasible implementation, boundary matching is performed through the boundary segmentation mask index, that is, a specific query is made as to whether there is a target segmentation mask, so step A22 includes: matching the target segmentation mask of each boundary segmentation mask through the boundary segmentation mask index; when matching the target segmentation mask, determining that the matching result is consistent with the boundary feature match; when not matching the target segmentation mask, determining that the matching result is inconsistent with the boundary feature match.
[0099] It should be noted that the boundary segmentation mask index can be used for matching to determine whether each boundary segmentation mask has a target segmentation mask. The target segmentation mask may include the boundary segmentation mask's right adjacent segmentation mask and the lower adjacent segmentation mask. The target segmentation mask is the boundary segmentation mask corresponding to the index of the common element in the index of the boundary segmentation mask currently being matched. For example, if the boundary segmentation mask index is (0, 0, 1), then it is matched to see whether it has a lower right adjacent segmentation mask, that is, whether it has a right adjacent segmentation mask or a lower adjacent segmentation mask. The target segmentation mask may include the right adjacent segmentation mask and the lower adjacent segmentation mask.
[0100] If the target segmentation mask is matched, the matching result is a consistent boundary feature match. For example, if the boundary segmentation mask index is (0,0,1), the matched target segmentation mask is (1,0,0), which is the right adjacent segmentation mask. For example, if the boundary segmentation mask index is (0,1,1), the matched target segmentation mask is (1,1,0), which is the right adjacent segmentation mask. For example, if the boundary segmentation mask index is (1,0,1), the matched target segmentation mask is (1,1,0), which is the bottom adjacent segmentation mask.
[0101] In the specific implementation, there are still inconsistently matched segmentation masks, for example, (1,0,0) has no adjacent segmentation mask to the right or below, so the boundary feature matching is inconsistent. By describing how to match the target segmentation mask through the boundary segmentation mask index, the operational details of the boundary matching are further clarified, ensuring the reliability and accuracy of the matching results.
[0102] Step S403: When the matching result is that the boundary features match consistently, particles are fused based on the boundary features to obtain a fused image.
[0103] It should be noted that when the matching result is consistent with the boundary feature match, it means that the particles in adjacent small blocks are adjacent, which may be caused by mis-segmentation during segmentation. In order to improve the accuracy of subsequent particle size measurement, the adjacent particles can be fused to obtain a fused image.
[0104] In a specific implementation, the fusion logic is to merge the indexes containing common elements.
[0105] In a feasible implementation, step S403 may include: Step A30: When the matching result is that the boundary features match consistently, a target segmentation mask is obtained based on the boundary features.
[0106] Step A31: Obtain the target segmentation mask index.
[0107] It should be noted that if the matching result is that the boundary feature matches consistently, it means that particle fusion is required, so the target segmentation mask can be first determined by screening each boundary segmentation mask in the boundary feature.
[0108] In a specific implementation, after obtaining the target segmentation mask, the target segmentation mask index may be obtained.
[0109] Step A32: Pair the target segmentation mask indexes to obtain target index pairs, and summarize the target index pairs to obtain a list of adjacent index pairs.
[0110] In a specific implementation, the target segmentation mask indexes can be paired to obtain target index pairs, i.e., adjacent index pairs. For example, for the (0,0) sub-image, it is possible to detect which segmentation masks in the (0,1) sub-image and the (1,0) sub-image are adjacent to the segmentation mask of the M1 (0,0) sub-image, and pair the indices of the adjacent segmentation masks to obtain several mask pairs, i.e., adjacent index pairs. The mask pairs are represented as [mask A, mask B].
[0111] When pairing, the vertical coordinate of the rightmost pixel of the boundary segmentation mask in the left sub-image and the vertical coordinate of the leftmost adjacent pixel of the boundary segmentation mask in the right sub-image can be calculated. If there is an intersection, it is determined to be adjacent, that is, the pairing is successful. When calculating the lower adjacent index pair, if the horizontal coordinate of the lowermost pixel of the boundary segmentation mask in the upper sub-image and the uppermost horizontal coordinate of the boundary segmentation mask in the lower sub-image have an intersection, it is determined to be adjacent, that is, the pairing is successful. The rightmost (lower) pixel refers to the list of pixels with a width of 1 pixel on the right (lower).
[0112] By pairing all target segmentation mask indexes, multiple target index pairs are obtained, and a list of adjacent index pairs is obtained by summarizing them, as shown in Table 1 below. Table 1 below is a list of lower right adjacent index pairs for each sub-image.
[0113] Table 1
[0114] By summarizing the lower-right adjacent index pair lists of all block material images, the target index pair list is obtained: {[(0,0,1), (1,0,0)], [(0,1,1), (1,1,0)], [(1,0,1), (1,1,0)]}.
[0115] Step A33: merge the target index pair list to obtain a merged index pair list.
[0116] It should be noted that by fusing the target index pair lists, the specific fusion logic is to merge the lists containing common elements to obtain a fused index pair list, which is expressed as follows: {[(0,0,1), (1,0,0)], [(0,1,1), (1,0,1), (1,1,0)]}.
[0117] Step A34: Obtain the segmentation mask index that does not match consistently.
[0118] In the specific implementation, continue as above Figure 3 As shown, for example, the sub-images including M1 (0,0), M2 (0,1), M3 (1,0) and M4 (1,1) have inconsistent segmentation mask indices [0,0,0], [1,0,2], [0,1,0], [1,1,1].
[0119] Step A35: Obtain a fused image based on the list of unmatched segmentation mask indices and fusion index pairs.
[0120] It should be noted that the unmatched segmentation mask index and fusion index pair lists can be fused to construct a fused image.
[0121] For each fused segmentation mask, the background is set to 0, and then each segmentation mask index is traversed, and the mask area corresponding to the segmentation mask index is marked as 1, so as to obtain 6 binary images, namely the fused image. Particle fusion is performed on the successfully matched boundary features, including generating a list of target index pairs and fusion index pairs, which ensures the transparency and controllability of the fusion process and improves the quality of the final fused image.
[0122] In this scheme, accurate particle fusion is achieved through boundary detection and matching, which ensures that key information is not lost in the fusion process of the block material image, and can accurately reflect the real structure of the original material, thereby improving the accuracy of particle size measurement.
[0123] In some embodiments, the current material image can be divided into blocks according to the characteristics of the material, referring to Figure 4 , step S20 may include: Step S201: Obtain material properties.
[0124] It should be noted that material properties may include material characteristics, such as average particle size, particle distribution density, mechanical properties, physical properties and the like.
[0125] Step S202: Segment the current material image according to the material properties to obtain a plurality of segmented material images.
[0126] In a specific implementation, the current material image may be segmented according to the material properties, and the material properties may be used as a condition or reference for segmentation to obtain a segmented material image, that is, a plurality of segmented material images.
[0127] In this scheme, image segmentation is performed according to material properties, making the segmentation process more targeted and scientific, and being able to more accurately reflect the actual structure of the material, providing a better basis for subsequent image recognition and particle size measurement.
[0128] In a feasible implementation, the current material image may be segmented according to the particle size and distribution density in the material properties to obtain a block material image. Then step S202 may include: Step B10: Obtaining particle size and particle distribution density according to material properties.
[0129] It is understood that the material properties include the particle size of different materials, and the particle size may be an average particle size, for example, an average particle size of 50 microns. The particle distribution density may be obtained by measuring and counting the physical size of the particles.
[0130] Step B20: Segment the current material image by particle size and particle distribution density to obtain a plurality of segmented material images.
[0131] In a specific implementation, an image segmentation algorithm, such as an improved watershed algorithm or a U-Net model based on deep learning, can be applied to segment the material image. During the segmentation process, the edge of the particle can be detected according to its local features to separate each particle or material region. Finally, multiple block material images are obtained through image segmentation, and each block represents a different material region or particle set. For example, for an image with a resolution of 1024×1024 pixels, it can be segmented into small blocks of 64×64 pixels.
[0132] In this scheme, the particle size and distribution density are taken into consideration for segmentation, which makes the segmentation strategy closer to the actual situation of the material, improves the effect of image segmentation, and thus improves the accuracy of particle size measurement.
[0133] In a feasible implementation, in order to improve the efficiency of image recognition, the trained model can be used to directly perform image recognition and output the recognition result. Figure 5 , step S30 comprises: Step S301: input a plurality of block material images into a target image recognition model, extract image features through a backbone network in the target image recognition model, and obtain a first feature map.
[0134] It should be noted that the target image recognition model is a model trained in advance for image recognition, which can be used to identify image feature information in each block material image. The target image recognition model can be a deep learning model, such as the Mask R-CNN model (mask region convolutional neural network model), or a BlendMask model (instance segmentation algorithm model), a YOLO (You Only Look Once) series model, etc., which is not limited in this embodiment.
[0135] For example, the target image recognition model is the Mask R-CNN model. Mask R-CNN is an image segmentation and object detection model based on deep learning. Its structure is mainly based on Faster R-CNN, and a branch for instance segmentation is added. The basic structure of Mask R-CNN includes: Backbone, Region Proposal Network (RPN), RoI Align, and Head Networks.
[0136] By inputting multiple block material images into the target image recognition model, the block material image regional features are directly output. The block material images are recognized using the trained target image recognition model, which not only improves the recognition speed but also enhances the recognition accuracy.
[0137] It should be understood that multiple block material images can be input into the Mask R-CNN model in sequence, and image features can be extracted through the first part of the Mask R-CNN model, Backbone (backbone network). Backbone (backbone network) is usually a pre-trained convolutional neural network, such as ResNet, VGG or Xception. The features of the block material images are extracted through the backbone network to generate a first feature map, which contains high-level features of the block material images.
[0138] Step 302: Process the first feature map through the region generation network in the target image recognition model to generate a candidate region.
[0139] In the specific implementation, the region generation network is the Region Proposal Network (RPN), which is part of Faster R-CNN and is used to generate candidate regions (Region Proposals). Therefore, the first feature map can be input into the region generation network to generate candidate regions. RPN is a fully convolutional network that runs on the feature map generated by Backbone and generates multiple candidate regions for each location, each of which has a prediction for object / background classification and bounding box regression.
[0140] Step 303: extract features from the candidate region through the interest extraction network in the target image recognition model to obtain candidate features.
[0141] After obtaining the candidate region, the feature extraction of the candidate region can be performed through the interest extraction network RoI Align, which is a key component of Mask R-CNN and is used to extract the features of each candidate region from the feature map. RoIAlign uses bilinear interpolation to accurately align the feature map and the candidate region, thereby avoiding the quantization error introduced by RoI Pooling.
[0142] The feature extraction of the candidate region is performed through the interest extraction network to obtain the features of the candidate region, namely the candidate features.
[0143] Step S304: Perform object detection and instance segmentation on the candidate features through the head network in the target image recognition model to obtain the category, bounding box and segmentation mask of each block material image.
[0144] It should be understood that the head network is the last part of the target image recognition model, which includes two branches, one for object detection (including classification and bounding box regression) and the other for instance segmentation (generating segmentation masks). Therefore, after obtaining the candidate features, the object detection branch and instance segmentation branch in the head network can be used to perform object detection and instance segmentation on the candidate features respectively. The object detection branch is a fully connected network that generates an object category prediction and bounding box regression prediction for each candidate feature, thereby obtaining the category and bounding box of each block material image.
[0145] The instance segmentation branch is a convolutional network that generates a segmentation mask prediction for each candidate feature, thereby obtaining a segmentation mask for each block material image.
[0146] Step S305: Obtaining the block material image region features through categories, bounding boxes, and segmentation masks.
[0147] It should be noted that after obtaining the category, bounding box and segmentation mask, the category, bounding box and segmentation mask can be used as the image region features of the segmented material.
[0148] In a specific implementation, the target image recognition model can be loaded first when performing image recognition. By converting the current material image to the model's expected size, such as 128×128 pixels, the image converted to the model's expected size is input into the target image recognition model, thereby outputting the category, bounding box, and segmentation mask of each detected object through the target image recognition model.
[0149] It should be noted that the results output by the model may have results with low confidence. Therefore, after obtaining the category, bounding box and segmentation mask of each detected object, the image can be further screened. Therefore, step S305 may include: obtaining the object confidence based on the bounding box; filtering the block material image based on the object confidence to obtain a filtered block material image; obtaining the block material image regional features based on the type, bounding box and segmentation mask of the filtered block material image.
[0150] It should be noted that when the target image recognition model outputs a bounding box, it will also be accompanied by the confidence of each object. Therefore, the object confidence can be obtained based on the bounding box, and the confidence threshold can be set in advance, such as 0.85, 0.9, etc. When the object confidence is less than the confidence threshold, the corresponding block material image is eliminated, thereby filtering each block material image, filtering the low-confidence detection results, and obtaining the retained filtered block material image, and using the type, bounding box and segmentation mask of the filtered block material image as the final block material image area features.
[0151] In the specific implementation, the segmentation mask is a binary image, the white area of the binary image represents the particles, and the black area represents the background. By evaluating the object confidence, the block material image is filtered, low-quality or irrelevant information is removed, the most representative image part is retained, and the effectiveness and practicality of the block material image area features are improved.
[0152] In this solution, the role of each network layer within the target image recognition model is deeply analyzed, from image feature extraction to object detection and instance segmentation. This process ensures the high quality of the recognition results and provides a reliable basis for subsequent granularity measurement.
[0153] In a feasible implementation, the training process of the target image recognition model includes: Acquire a first training sample and a first verification sample, wherein the first training sample and the first verification sample include an original material image with a segmentation mask marked with particles; Initialize the deep learning model and determine the training parameters; The initialized deep learning model is trained using the first training sample and the training parameters to obtain a training result; Calculate the loss value based on the training results and the first validation sample; The training parameters of the initialized deep learning model are adjusted through the loss value to obtain the target image recognition model.
[0154] It should be noted that the first training sample and the first verification sample are labeled material images, and the first training sample and the first verification sample contain a segmentation mask of each particle, and the segmentation mask corresponds to the category and bounding box of the object.
[0155] In order to improve the generalization ability of the model, the first training sample and the first validation sample need to be enhanced, such as rotation, flipping, scaling, etc. After data enhancement, the deep learning model can be initialized. The deep learning model is the Mask R-CNN model, which uses a pre-trained model trained on large datasets such as ImageNet as a basis and then fine-tuned, which can provide good initialization weights.
[0156] The deep learning model can be initialized using a set initialization method, such as a zero initialization method, a random initialization method, a normal distribution initialization method, etc., or other initialization methods. For example, when the zero initialization method is used, all weights in the deep learning model are set to 0, thereby initializing the deep learning model.
[0157] After the model is initialized, appropriate training parameters can be set, including learning rate, batch size, number of iterations, etc.
[0158] In a specific implementation, the initialized deep learning model can be trained using the first training sample and training parameters. In each iteration, the model predicts the category, bounding box, and segmentation mask of the object based on the input image, thereby obtaining a training result.
[0159] The true label is determined through the first verification sample, and the loss is calculated based on the true label and the training result to obtain the loss value. The loss threshold can be set in advance. When the loss value is greater than the loss threshold, the optimizer is used to update the model weights and training parameters, so as to continue training until the loss value is less than or equal to the loss threshold. The training is stopped to obtain the target image recognition model.
[0160] After the model training is completed, the model weights and structure can be saved for subsequent use.
[0161] In this solution, the model is trained by using training samples and verification samples to obtain a target image recognition model. The target image recognition model can more quickly and accurately identify the segmentation mask in the image, thereby improving the accuracy and efficiency of recognition.
[0162] In a feasible implementation manner, in order to improve the image resolution and enhance the detail information of small particles, the image of the divided material can be magnified after the image is divided into blocks. Figure 6 , after step S20, further comprising: Step S21: amplifying the multiple block material images to obtain multiple amplified block material images.
[0163] It should be noted that the image magnification of each block material image can be achieved using an interpolation method or an image magnification model. The interpolation method can be nearest neighbor interpolation, bilinear interpolation, adaptive interpolation algorithm, etc. The image magnification model can be trained in advance.
[0164] A plurality of enlarged block material images are obtained by enlarging the plurality of block material images.
[0165] It can be understood that after the image is enlarged, the process of identifying and processing the image is to perform image recognition on the enlarged block material image. Therefore, performing image recognition on multiple block material images to obtain the regional features of the block material images includes: performing image recognition on multiple enlarged block material images to obtain the regional features of the block material images.
[0166] In a specific implementation, a target image recognition model may be used to perform image recognition on a plurality of enlarged block material images, thereby obtaining the block material image region features.
[0167] In this solution, by enlarging the block material image, the recognition difficulty problem caused by insufficient image resolution is solved, and the accuracy of image recognition is improved.
[0168] In a feasible implementation, in order to improve the efficiency of image magnification, a pre-trained image magnification model can be used to magnify the image of the block material. Figure 7 , step S21 comprises: Step C10: Input the multiple block material images into the target generator in the image magnification model, and use the target generator to magnify the multiple block material images to obtain target resolution block images.
[0169] It should be noted that the image magnification model may be a SRGAN model (Super-Resolution Generative Adversarial Network, a deep learning model for image super-resolution), or a DRRN (Deep Recursive Residual Network), a LapSRN (Laplacian Pyramid Super-Resolution Network) or other models that can perform image magnification, and this embodiment does not impose any restrictions on this.
[0170] For example, by inputting multiple block material images into the SRGAN model in sequence, SRGAN (Super-Resolution Generative Adversarial Network) is a deep learning model for image super-resolution. By adopting a super-resolution reconstruction algorithm based on deep learning, the block material image is enlarged by 2 times, for example, the image resolution is increased to 128×128 pixels.
[0171] The structure of the image magnification model includes: target generator (Generator) and target discriminator (Discriminator).
[0172] It should be noted that the target generator is used to convert a low-resolution image into a high-resolution image. Therefore, after each block material image is input into the target generator, the block material image can be enlarged by the target generator to obtain a high-resolution block image, and the target resolution can be 128×128 pixels.
[0173] In a feasible implementation, the target generator is usually based on a ResNet (residual network) structure, which may specifically include a pre-sampling layer, a residual block and a post-processing layer. Step C10 includes: inputting multiple block material images into the target generator, enlarging the size through the pre-sampling layer in the target generator to obtain an initial block material image; performing feature extraction and residual connection on the initial block material image through the residual block in the target generator to obtain a reference block material image; performing convolution and size enlargement on the reference block material image through the post-processing layer in the target generator to obtain a target resolution block image.
[0174] The pre-upsampling layer includes a preprocessing convolution layer and an upsampling layer, so the block material image can be input into the pre-upsampling layer in the target generator, and the input low-resolution block material image is first preprocessed through one or more convolution layers, and the preprocessed block material image is enlarged by an upsampling layer (such as a nearest neighbor interpolation or deconvolution layer) to a certain resolution, for example, a small block of 64×64 pixels is enlarged to a block image of 96×96 pixels, that is, enlarged by 1.5 times.
[0175] After obtaining the initial block material image, the initial block material image can be processed by the residual block. The residual block is the core part of the target generator. The number of residual blocks can be multiple. Each residual block contains two 3x3 convolutional layers, each of which is followed by a batch normalization layer and an activation function (such as PReLU). The design of the residual block allows the network to learn more complex feature mappings while avoiding the gradient vanishing problem. Therefore, the initial block material image can be feature extracted and residually connected through the residual block. The initial block material image is first feature extracted through the convolutional layer, and then added to the original input to form a residual connection, thereby obtaining the reference block material image.
[0176] The post-processing layer is the process of post-processing the reference block material image. The post-processing layer is located at the end of the target generator. Its purpose is to perform the final optimization on the generated high-resolution image to improve the visual quality and realism of the image. Therefore, the reference block material image can be convolved through one or more convolutional layers in the post-processing layer, and the convolved image can be enlarged again through the upsampling layer in the post-processing layer, so as to convert the feature map into a high-resolution image, that is, the target resolution block image. The target resolution can be a block image of 128×128 pixels. The functions of each layer inside the target generator are explained in detail, such as the role of the pre-upsampling layer, the residual block and the post-processing layer, which ensures the efficiency and stability of image enlargement and improves the visual effect and analysis value of the enlarged image.
[0177] Step C11: input the target resolution block image into the target discriminator in the image magnification model, and discriminate the target resolution block image through the target discriminator to obtain a probability value.
[0178] It should be noted that the target discriminator is used to distinguish between the generated high-resolution images and the real high-resolution images.
[0179] Therefore, after the target resolution block image is input into the target discriminator, the block material image can be verified by the target discriminator, thereby converting the feature map into a probability value, which represents the probability that the input target resolution block image is a real image.
[0180] In a feasible implementation, the target discriminator is usually a convolutional neural network, including the following main components: convolution layer, pooling layer and fully connected layer. Therefore, step C11 specifically includes: inputting the target resolution block image into the target discriminator, convolving, normalizing and activating the target resolution block image through multiple convolution layers, normalization layers and activation functions in the target discriminator to obtain a nonlinear activation map; pooling the nonlinear activation map through the pooling layer in the target discriminator to obtain a second feature map; converting the second feature map through the fully connected layer in the target discriminator to obtain a probability value.
[0181] It should be noted that the target discriminator processes the input target resolution block image through multiple convolutional layers. Each convolutional layer is followed by a batch normalization layer and an activation function. The activation function can be LeakyReLU, ReLU activation function, Sigmoid activation function or Softmax activation function, etc. The target resolution block image is convolved, normalized and activated in turn through the convolutional layer, batch normalization layer and activation function to obtain a nonlinear activation map. After each convolutional layer, there is usually a batch normalization layer (BatchNormalization), which helps to speed up the training process, reduce internal covariate shift, and improve the generalization ability of the model. Activation functions (such as LeakyReLU) are applied to the output after batch normalization, introducing nonlinearity, so that the network can learn more complex feature representations. LeakyReLU allows small gradients when the input is negative, which helps to avoid the gradient vanishing problem.
[0182] After obtaining the nonlinear activation map, the target discriminator will reduce the spatial dimension of the feature map through the pooling layer while retaining the most important feature information. Specifically, pooling is performed through the pooling layer, such as maximum pooling or average pooling, to reduce the size of the nonlinear activation map while retaining the density of the features to obtain the second feature map.
[0183] Finally, the target discriminator converts the second feature map into a probability value through one or more fully connected layers, indicating the probability that the input target resolution block image is a real image, such as the output probability value of 0.8, 0.9, etc. The above content specifically explains how the target discriminator evaluates the enlarged image through convolutional layers, normalization layers, activation functions, and pooling layers, and finally outputs the probability value, ensuring the scientificity and objectivity of the quality evaluation process of the enlarged image.
[0184] Step C12: when the probability value is greater than or equal to the preset threshold, the target resolution block image is used as the enlarged block material image.
[0185] It should be noted that the preset threshold can be set to a higher value to evaluate whether the target resolution block image is retained. For example, if the preset threshold is set to 0.9, if the probability value output by the target discriminator is less than 0.9, the corresponding target resolution block image is eliminated. If the probability value output by the target discriminator is greater than or equal to 0.9, the target resolution block image is retained and used as the final enlarged block material image. By setting the preset threshold, the block image that meets the true resolution is screened out, thereby improving the effect and authenticity of image enlargement.
[0186] In this scheme, an image magnification model including a target generator and a target discriminator is used to achieve efficient image magnification while ensuring the quality and authenticity of the magnification, which helps to improve the accuracy of subsequent image recognition and particle size measurement.
[0187] In a feasible implementation, the training process of the image magnification model includes: Acquire a second training sample and a third training sample, wherein the second training sample and the third training sample are material images at an initial resolution; Inputting the second training sample into the initial generator to generate target sample data; Inputting the third training sample and the target sample data into the initial discriminator for determination, and obtaining a determination result; The parameters are adjusted according to the judgment results to train the initial generator and the initial discriminator to obtain the target generator and the target discriminator; The image enlargement model is obtained through the target generator and the target discriminator.
[0188] It should be noted that both the second training sample and the third training sample are low-resolution material images, and the initial resolution is low resolution.
[0189] In a specific implementation, the second training sample can be input into the initial generator through the adversarial generator to generate target sample data. The target sample data can be used as a training condition for whether the initial generator ends training. The target sample data is a high-resolution image output by the initial generator, which should be visually similar to the real high-resolution image.
[0190] The third training sample is used as the real sample data. The authenticity of the input sample is determined by using the target sample data and the third training sample input value representing the real sample as the initial discriminator, thereby obtaining a determination result. The determination result may be that the sample is a real sample or a fake sample.
[0191] In a specific implementation, the parameters of the initial generator and the initial discriminator can be adjusted according to the determination result, so as to train the initial generator and the initial discriminator until the target generator and the target discriminator are obtained.
[0192] The initial generator and the initial discriminator are trained alternately. First, the initial generator is fixed and the initial discriminator is trained; then the initial discriminator is fixed and the initial generator is trained. Iterative process: This process will iterate multiple times until the image quality generated by the initial generator is high enough and the discriminator cannot distinguish between real and fake images, or the predetermined number of iterations is reached. The target generator and target discriminator are obtained, and the image enlargement model is constructed. Model preservation: During the training process, the weights of the model can be saved periodically for subsequent use or further fine-tuning. This adversarial training method can drive the generator to generate higher quality images, while the discriminator is also constantly improving its discrimination ability, ultimately achieving the goal of generating high-resolution, realistic images.
[0193] In this proposal, an image enlargement model is described in which a generator and a discriminator are continuously optimized through training. This training method improves the robustness and adaptability of the model, enabling it to produce high-quality enlargement results when processing images of various materials.
[0194] It should be noted that after obtaining the fused image, the particle size of the material can be measured based on the fused image. Figure 8 , step S50 comprises: Step S501: Obtain the number of pixels according to the fused image.
[0195] It should be noted that, since the fused image is a binary image, the area of the particle, that is, the number of pixels, denoted as S, can be obtained based on the binary image of the fused image.
[0196] Step S502: Calculate the equivalent diameter of the pixel unit according to the number of pixels.
[0197] In a specific implementation, the equivalent diameter is defined as the diameter of a circle with the same area as the particle, according to the area formula of a circle: S = 1 / 4 × π × D 2 It can be seen that D = (4S / π) 0.5 , thus obtaining the equivalent diameter D.
[0198] Step S503: converting the equivalent diameter of the pixel unit to obtain the equivalent diameter of the material particles.
[0199] In a specific implementation, the equivalent diameter in pixel units can be converted according to the scale of the current material image, thereby converting it into the equivalent diameter of material particles in the real world in microns. Assuming that m pixels in the image represent n microns, the equivalent diameter of the material particles = D / m×n microns.
[0200] like Fig. 9 As shown, Fig. 9 This is a schematic diagram of the particle recognition effect of a certain material. The left side is the particle image of the certain material before recognition, and the right side is the recognition result after recognition.
[0201] In this scheme, the equivalent diameter of material particles is calculated based on the fused image, and the image information is converted into specific physical quantities, completing the complete closed loop from image analysis to particle size measurement, providing important technical support for materials science research and industrial applications.
[0202] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the material particle size measurement method of the present application. More simple transformations based on this technical concept are all within the protection scope of the present application.
[0203] This application also provides a material particle size measuring device, please refer to Fig.10 , the material particle size measuring device includes: The acquisition module 10 is used to acquire the current material image.
[0204] The segmentation module 20 is used to segment the current material image to obtain a plurality of segmented material images.
[0205] The recognition module 30 is used to perform image recognition on a plurality of block material images to obtain regional features of the block material images.
[0206] The fusion module 40 is used to perform particle fusion processing on multiple block material images based on the regional features of the block material images to obtain a fused image.
[0207] The measuring module 50 is used to measure the particle size of the material according to the fused image.
[0208] The material particle size measuring device provided by the present application adopts the material particle size measuring method in the above embodiment, which can solve the technical problems that the current material particle size measurement has high hardware requirements and poor recognition effect. Compared with the prior art, the beneficial effects of the material particle size measuring device provided by the present application are the same as the beneficial effects of the material particle size measuring method provided by the above embodiment, and other technical features in the material particle size measuring device are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0209] In one embodiment, the fusion module 40 is also used to perform boundary detection on multiple block material images based on the regional features of the block material images to obtain the boundary features of each block material image; perform boundary matching based on the boundary features to obtain a matching result; when the matching result is that the boundary features match consistently, perform particle fusion based on the boundary features to obtain a fused image.
[0210] In one embodiment, the fusion module 40 is also used to obtain a segmentation mask of each block material image based on the regional features of the block material image; perform boundary detection on each block material image according to the segmentation mask to obtain a boundary segmentation mask; and obtain boundary features of each block material image according to the boundary segmentation mask.
[0211] In one embodiment, the fusion module 40 is also used to obtain the sub-image index of each block material image; obtain the index number of the segmentation mask in the corresponding block material image; obtain the segmentation mask index in each block material image according to the sub-image index and the index number; and determine the boundary segmentation mask according to the segmentation mask index.
[0212] In one embodiment, the fusion module 40 is further used to determine a boundary segmentation mask based on the boundary feature; obtain a boundary segmentation mask index of the boundary segmentation mask; and perform boundary matching through the boundary segmentation mask index to obtain a matching result.
[0213] In one embodiment, the fusion module 40 is further used to match the target segmentation mask of each boundary segmentation mask through the boundary segmentation mask index; when the target segmentation mask is matched, the matching result is determined to be consistent with the boundary feature match; when the target segmentation mask is not matched, the matching result is determined to be inconsistent with the boundary feature match.
[0214] In one embodiment, the fusion module 40 is also used to obtain a target segmentation mask based on the boundary feature when the matching result is a consistent boundary feature match; obtain a target segmentation mask index; pair the target segmentation mask index to obtain a target index pair, and summarize the target index pairs to obtain a target index pair list; fuse the target index pair list to obtain a fused index pair list; obtain an inconsistently matched segmentation mask index; and obtain a fused image based on the inconsistently matched segmentation mask index and the fused index pair list.
[0215] In one embodiment, the segmentation module 20 is further used to obtain material properties; perform image segmentation on the current material image according to the material properties to obtain a plurality of segmented material images.
[0216] In one embodiment, the segmentation module 20 is further used to obtain the particle size and particle distribution density according to the material properties; and to perform image segmentation on the current material image according to the particle size and particle distribution density to obtain a plurality of segmented material images.
[0217] In one embodiment, the recognition module 30 is further used to input multiple block material images into the target image recognition model, extract image features through the backbone network in the target image recognition model, and obtain a first feature map; process the first feature map through the region generation network in the target image recognition model to generate a candidate region; extract features from the candidate region through the interest extraction network in the target image recognition model to obtain candidate features; perform object detection and instance segmentation on the candidate features through the head network in the target image recognition model to obtain the category, bounding box and segmentation mask of each block material image; obtain the block material image region feature through the category, bounding box and segmentation mask. In one embodiment, the recognition module 30 is further used to obtain object confidence based on the bounding box; filter the block material image based on the object confidence to obtain a filtered block material image; obtain the block material image region feature according to the type, bounding box and segmentation mask of the filtered block material image.
[0218] In one embodiment, the recognition module 30 is also used to obtain a first training sample and a first verification sample, wherein the first training sample and the first verification sample include an original material image with a segmentation mask marked with particles; initialize the deep learning model and determine the training parameters; train the initialized deep learning model with the first training sample and the training parameters to obtain a training result; calculate a loss value based on the training result and the first verification sample; adjust the training parameters of the initialized deep learning model with the loss value to obtain a target image recognition model.
[0219] In one embodiment, the material particle size measuring device also includes an amplification module, which is used to amplify multiple block material images to obtain multiple amplified block material images; the recognition module 30 is also used to perform image recognition on the multiple amplified block material images to obtain the regional features of the block material images.
[0220] In one embodiment, the magnification module is further used to input multiple block material images into a target generator in an image magnification model, and magnify the multiple block material images through the target generator to obtain a target resolution block image; input the target resolution block image into a target discriminator in the image magnification model, and discriminate the target resolution block image through the target discriminator to obtain a probability value; when the probability value is greater than or equal to a preset threshold, the target resolution block image is used as the enlarged block material image.
[0221] In one embodiment, the magnification module is also used to input multiple block material images into a target generator in an image magnification model, and enlarge the size through a pre-sampling layer in the target generator to obtain an initial block material image; perform feature extraction and residual connection on the initial block material image through a residual block in the target generator to obtain a reference block material image; and perform convolution and size enlargement on the reference block material image through a post-processing layer in the target generator to obtain a target resolution block image.
[0222] In one embodiment, the magnification module is further used to input the target resolution block image into the target discriminator in the image magnification model, convolve, normalize and activate the target resolution block image through multiple convolution layers, normalization layers and activation functions in the target discriminator to obtain a nonlinear activation map; pool the nonlinear activation map through the pooling layer in the target discriminator to obtain a second feature map; and transform the second feature map through the fully connected layer in the target discriminator to obtain a probability value.
[0223] In one embodiment, the magnification module is further used to obtain a second training sample and a third training sample, wherein the second training sample and the third training sample are material images of an initial resolution; the second training sample is input into an initial generator to generate target sample data; the third training sample and the target sample data are input into an initial discriminator for determination to obtain a determination result; parameters are adjusted according to the determination result to train the initial generator and the initial discriminator to obtain a target generator and a target discriminator; and an image magnification model is obtained through the target generator and the target discriminator.
[0224] In one embodiment, the measuring module 50 is further used to obtain the number of pixels according to the fused image; calculate the equivalent diameter of the pixel unit according to the number of pixels; and convert the equivalent diameter of the pixel unit to obtain the equivalent diameter of the material particles.
[0225] The present application provides a material particle size measuring device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the material particle size measuring method in the above-mentioned embodiment one.
[0226] Reference below Fig.11, which shows a schematic diagram of the structure of a material particle size measuring device suitable for implementing the embodiment of the present application. The material particle size measuring device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig.11 The material particle size measuring device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0227] like Fig.11 As shown, the material particle size measuring device may include a processing device 1001 (such as a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the material particle size measuring device are also stored. The processing device 1001, ROM1002 and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the material particle size measurement device to communicate with other devices wirelessly or by wire to exchange data. Although the material particle size measurement device with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or provided instead.
[0228] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0229] The material particle size measurement device provided by the present application adopts the material particle size measurement method in the above embodiment, which can solve the technical problems that the current material particle size measurement has high hardware requirements and poor recognition effect. Compared with the prior art, the beneficial effects of the material particle size measurement device provided by the present application are the same as the beneficial effects of the material particle size measurement method provided by the above embodiment, and the other technical features in the material particle size measurement device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0230] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0231] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0232] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the material particle size measurement method in the above-mentioned embodiment.
[0233] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.
[0234] The computer-readable storage medium may be included in the material particle size measuring device; or may exist independently without being assembled into the material particle size measuring device.
[0235] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the material particle size measuring device, the material particle size measuring device obtains a current material image; performs image segmentation on the current material image to obtain a plurality of block material images; performs image recognition on the plurality of block material images to obtain regional features of the block material images; performs particle fusion processing on the plurality of block material images based on the regional features of the block material images to obtain a fused image; and performs material particle size measurement according to the fused image.
[0236] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0237] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0238] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0239] The readable storage medium provided in this application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned material particle size measurement method, and can solve the technical problems that the current material particle size measurement has high hardware requirements and poor recognition effect. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the material particle size measurement method provided in the above-mentioned embodiment, and will not be repeated here.
[0240] The present application also provides a computer program product, including a computer program, which implements the steps of the material particle size measurement method as described above when the computer program is executed by a processor.
[0241] The computer program product provided by this application can solve the technical problems that the current material particle size measurement has high hardware requirements and poor recognition effect. Compared with the prior art, the beneficial effects of the computer program product provided by this application are the same as the beneficial effects of the material particle size measurement method provided by the above embodiment, which will not be repeated here.
[0242] The above are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect application in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A material particle size measurement method, characterized in that: The material particle size measurement method comprises: Get the current material image; Performing image segmentation on the current material image to obtain a plurality of segmented material images; Performing image recognition on the plurality of images of the block materials to obtain regional features of the images of the block materials; Performing particle fusion processing on a plurality of the block material images based on the regional features of the block material images to obtain a fused image; The particle size of the material is measured based on the fused image.
2. The method according to claim 1, characterized in that The performing particle fusion processing on the plurality of the block material images based on the regional features of the block material images to obtain a fused image comprises: Performing boundary detection on a plurality of the block material images based on the regional features of the block material images to obtain boundary features of each block material image; Perform boundary matching based on the boundary features to obtain a matching result; When the matching result is that the boundary features match consistently, particles are fused based on the boundary features to obtain a fused image.
3. The method according to claim 2, characterized in that The performing boundary detection on the plurality of the block material images based on the regional features of the block material images to obtain the boundary features of each block material image comprises: Obtaining a segmentation mask for each block material image based on the block material image region features; Perform boundary detection on each block material image according to the segmentation mask to obtain a boundary segmentation mask; The boundary features of each block material image are obtained according to the boundary segmentation mask.
4. The method according to claim 3, characterized in that The step of performing boundary detection on each block material image according to the segmentation mask to obtain a boundary segmentation mask comprises: Get the sub-image index of each block material image; Obtaining the index number of the segmentation mask in the corresponding block material image; Obtaining a segmentation mask index in each block material image according to the sub-image index and the index number; A boundary segmentation mask is determined according to the segmentation mask index.
5. The method according to claim 2, characterized in that The performing boundary matching based on the boundary feature to obtain a matching result includes: determining a boundary segmentation mask based on the boundary features; Obtaining a boundary segmentation mask index of the boundary segmentation mask; Boundary matching is performed using the boundary segmentation mask index to obtain a matching result.
6. The method according to claim 5, characterized in that The boundary matching is performed by using the boundary segmentation mask index to obtain a matching result including: Matching the target segmentation mask of each boundary segmentation mask by the boundary segmentation mask index; When matching the target segmentation mask, determining the matching result as a boundary feature match consistency; When the target segmentation mask is not matched, it is determined that the matching result is inconsistent with the boundary feature matching.
7. The method according to claim 2, characterized in that When the matching result is that the boundary features match consistently, performing particle fusion based on the boundary features to obtain a fused image includes: When the matching result is that the boundary features match consistently, obtaining a target segmentation mask based on the boundary features; Get the target segmentation mask index; Pairing the target segmentation mask indexes to obtain target index pairs, and summarizing the target index pairs to obtain a target index pair list; Merging the target index pair lists to obtain a fused index pair list; Get the segmentation mask index that does not match the consistency; A fused image is obtained according to the unmatched segmentation mask index and the fusion index pair list.
8. The method according to claim 1, characterized in that The performing image segmentation on the current material image to obtain a plurality of segmented material images comprises: Get material properties; The current material image is segmented according to the material properties to obtain a plurality of segmented material images.
9. The method according to claim 8, characterized in that The performing image segmentation on the current material image according to the material attribute to obtain a plurality of segmented material images comprises: Obtaining particle size and particle distribution density according to the material properties; The current material image is segmented according to the particle size and the particle distribution density to obtain a plurality of segmented material images.
10. The method according to claim 1, characterized in that The performing image recognition on the plurality of block material images to obtain the block material image region features comprises: Inputting a plurality of the block material images into a target image recognition model, extracting image features through a backbone network in the target image recognition model, and obtaining a first feature map; Processing the first feature map through a region generation network in the target image recognition model to generate a candidate region; Extracting features from the candidate region through an interest extraction network in the target image recognition model to obtain candidate features; Performing object detection and instance segmentation on the candidate features through the head network in the target image recognition model to obtain the category, bounding box and segmentation mask of each block material image; The block material image region features are obtained through the category, the bounding box and the segmentation mask.
11. The method according to claim 10, characterized in that The obtaining of the block material image region feature by the category, the bounding box and the segmentation mask comprises: Obtaining object confidence according to the bounding box; filtering the block material image based on the object confidence to obtain a filtered block material image; The block material image region features are obtained according to the type, the boundary box and the segmentation mask of the filtered block material image.
12. The method according to claim 10, characterized in that The target image recognition model is trained in the following manner, including: Acquire a first training sample and a first verification sample, wherein the first training sample and the first verification sample include original material images with segmentation masks marked with particles; Initialize the deep learning model and determine the training parameters; Training the initialized deep learning model using the first training sample and the training parameters to obtain a training result; Calculate a loss value according to the training result and the first verification sample; The training parameters of the initialized deep learning model are adjusted using the loss value to obtain the target image recognition model.
13. The method according to claim 1, characterized in that The method further comprises: Amplifying the plurality of the block material images to obtain a plurality of amplified block material images; Correspondingly, performing image recognition on the plurality of block material images to obtain the block material image region features includes: Image recognition is performed on the plurality of enlarged block material images to obtain the block material image region features.
14. The method according to claim 13, characterized in that The performing image recognition on the plurality of enlarged block material images to obtain the block material image area features comprises: Inputting the plurality of block material images into a target generator in an image magnification model, and performing image magnification on the plurality of block material images through the target generator to obtain a block image of a target resolution; Inputting the target resolution block image into a target discriminator in an image magnification model, and discriminating the target resolution block image through the target discriminator to obtain a probability value; When the probability value is greater than or equal to a preset threshold, the target resolution block image is used as the enlarged block material image.
15. The method according to claim 14, characterized in that Inputting the plurality of block material images into a target generator in an image magnification model, and performing image magnification on the plurality of block images by the target generator to obtain block images of target resolution comprises: Inputting a plurality of the block material images into a target generator in an image magnification model, and magnifying the size of the images through a pre-upsampling layer in the target generator to obtain an initial block material image; Perform feature extraction and residual connection on the initial block material image through the residual block in the target generator to obtain a reference block material image; The reference block material image is convolved and scaled up through a post-processing layer in the target generator to obtain a target resolution block image.
16. The method according to claim 14, characterized in that The step of inputting the target resolution block image into a target discriminator in the image magnification model and discriminating the target resolution block image by the target discriminator to obtain a probability value includes: Inputting the target resolution block image into a target discriminator in an image magnification model, convolving, normalizing and activating the target resolution block image through multiple convolution layers, normalization layers and activation functions in the target discriminator to obtain a nonlinear activation map; Pooling the nonlinear activation map through a pooling layer in the target discriminator to obtain a second feature map; The second feature map is transformed through a fully connected layer in the target discriminator to obtain a probability value.
17. The method according to claim 14, characterized in that The image magnification model is trained in the following manner, including: Acquire a second training sample and a third training sample, wherein the second training sample and the third training sample are material images with an initial resolution; Inputting the second training sample into the initial generator to generate target sample data; Inputting the third training sample and the target sample data into an initial discriminator for determination to obtain a determination result; Adjusting parameters according to the determination result to train the initial generator and the initial discriminator to obtain a target generator and a target discriminator; An image magnification model is obtained through the target generator and the target discriminator.
18. The method according to any one of claims 1 to 17, characterized in that The measuring the particle size of the material according to the fused image comprises: Acquire the number of pixels according to the fused image; Calculating an equivalent diameter of a pixel unit according to the number of pixels; The equivalent diameter of the pixel unit is converted to obtain the equivalent diameter of the material particles.
19. A material particle size measuring device, characterized in that: The device comprises: An acquisition module is used to acquire the current material image; A segmentation module, used for performing image segmentation on the current material image to obtain a plurality of segmented material images; A recognition module, used for performing image recognition on the plurality of block material images to obtain regional features of the block material images; A fusion module, used for performing particle fusion processing on a plurality of the block material images based on the regional features of the block material images to obtain a fused image; The measuring module is used to measure the particle size of the material according to the fused image.
20. A material particle size measuring device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the material particle size measurement method according to any one of claims 1 to 18.
21. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the material particle size measurement method according to any one of claims 1 to 18 are implemented.
Citation Information
Patent Citations
Pantograph detection method based on Mask Scoring R-CNN
CN113763326A
Image recognition method and device, equipment and storage medium
CN115115872A
Image semantic segmentation method and device and storage medium
CN116091769A
Improved YOLOv5x buckwheat grain adhesion segmentation method
CN117911437A
Image segmentation method and device based on self-training and prior guidance
CN118587443A
Cited By
Judgment method for particle uniformity of steam foaming foam plastic
CN120182613A