Particle size detection method, device, equipment, medium and program product
By using an image recognition model trained by diversified object images, the particle image is processed, and the problem of poor particle size detection flexibility and versatility in the prior art is solved, and flexible and universal detection effects on various types of particulate materials are achieved.
Patent Information
- Application Number
- CN202411514894.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2044-10-29
AI Technical Summary
The existing particle size detection methods based on image analysis are less flexible and versatile, and require a large number of annotated material image training models. They need to be re-labeled and re-trained when adapting to new material types or complex scenarios.
The particle size parameters of the particle are determined by using an image recognition model trained using samples constructed from diverse object images. This model is adapted to scenarios of various types of particulate material, improving detection flexibility and versatility.
Flexible and universal particle size detection of various types of particulate materials is achieved, reducing the time to prepare training samples and label data for each type of material, and the detection results are accurate and not affected by human factors.
Smart Images

Figure CN119027928B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of material detection, and in particular to a particle size detection method, device, equipment, medium and program product. Background Art
[0002] Accurately measuring the particle size distribution of granular materials is crucial for evaluating material properties, optimizing production processes, and ensuring product quality. Traditional methods for measuring the particle size of granular materials, such as screening and sedimentation methods, have the disadvantages of cumbersome operation, limited measurement range, and measurement results being greatly affected by human factors.
[0003] With the development of computer vision technology, particle size detection methods based on image analysis have gradually attracted attention. The machine learning models currently used usually require pre-collection of images of the materials to be detected and labeling of the materials in the images, so as to obtain samples that can be used for training and train a model that can identify the material.
[0004] However, the existing machine learning models require a large number of labeled material images for training. For new material types or complex scenes, it is often necessary to re-label and retrain the model, which has poor flexibility and versatility.
[0005] The above statements are only used to provide background information related to the present application and do not necessarily constitute prior art. Summary of the invention
[0006] In view of the above problems, the present application proposes a particle size detection method, device, equipment, medium and program product to solve the problem of poor flexibility and versatility of existing image analysis-based methods.
[0007] The first aspect of the present application proposes a particle size detection method, the method comprising:
[0008] The particle image is processed by a trained image recognition model to obtain a mask image of the particle image and the confidence of each mask area in the mask image; the image recognition model is obtained by sample training based on object images of various object types, and the samples are images containing objects of various forms, and there are differences in shape and / or size between the various forms of objects; the particle size parameters of the particles in the particle image are determined based on the mask image and the confidence of each mask area; one mask area represents one particle.
[0009] In the technical solution of the embodiment of the present application, a model is obtained by training a sample constructed from a variety of object images to identify particle images. Since the sample is an image containing objects of various forms, it has similarities with the particle image, so the trained model can adapt to the scenes of various types of particle materials, improving the flexibility and versatility of particle size detection. And according to the mask image and confidence output by the model, the particle size parameters are detected, and the detection results are not affected by human factors, and are accurate and objective.
[0010] In some embodiments, the processing of the particle image by using the trained image recognition model includes:
[0011] A multi-scale feature map of the particle image is extracted through the image recognition model, and a mask image of the particle image and confidence levels of each mask area in the mask image are predicted using the multi-scale feature map.
[0012] In this embodiment, a multi-scale feature map of a particle image is extracted to capture information of small target particles at different scales, thereby facilitating prediction of a high-resolution mask image using features of different scales, and outputting the confidence of each predicted mask area to reflect the model's estimate of the accuracy of the mask area.
[0013] In some embodiments, the training process of the image recognition model includes:
[0014] Obtain object images of various object types; generate training samples and labels of the training samples based on the acquired various object images and mask images corresponding to the various object images, wherein the training samples are images containing objects of various forms, and the labels are mask images of the training samples; train the constructed model according to the training samples and the labels to obtain a model of mask images for identifying particle images.
[0015] In this embodiment, by acquiring existing diverse object images, a large number of training samples and labels of training samples are constructed using these object images and corresponding mask images. Since the training samples contain objects of various forms, which have similar characteristics to the images of particulate materials, the trained model can adapt to the application scenarios of various types of particulate materials, thereby improving the flexibility and versatility of particle size detection. This saves the process of preparing training samples and label data for each type of particulate material, and thus can save time in preparing training data to a certain extent.
[0016] In some embodiments, generating training samples and labels of the training samples based on the acquired multiple object images and the mask images corresponding to the multiple object images includes:
[0017] Performing geometric transformation processing on each object image in the multiple object images to obtain object images of different forms corresponding to each object image; performing the same geometric transformation processing as that of the corresponding object image on the mask image corresponding to each object image in the multiple object images to obtain a mask image corresponding to each form of the object images of different forms; generating the training samples and the labels based on the object images of different forms and the mask images corresponding to the object images of different forms.
[0018] In this embodiment, each object image is geometrically transformed to modify the layout and size of the object, thereby generating a large number of object images of different morphologies. These object images of different morphologies are similar to particles of different morphologies of the granular material. At the same time, the mask image of the object image is also subjected to the same geometric transformation to obtain a mask image of the corresponding morphology. Therefore, training samples and labels having similar features to the particle image can be generated through these object images of different morphologies and the corresponding mask images.
[0019] In some embodiments, the generating the training sample and the label based on the object images of different forms and the mask images corresponding to the object images of different forms includes:
[0020] Arrange at least two forms of object images in a preset background image to obtain multiple new images; wherein the new images are images generated after the preset background image is arranged with at least two forms of object images, and the arrangement positions of the object images in the new images do not overlap; based on the multiple new images, generate multiple training samples; for each of the training samples, arrange and combine the mask images of the corresponding forms according to the arrangement order of the object images of different forms in the training samples to obtain the label corresponding to the training sample.
[0021] In this embodiment, a large number of new images are generated by arranging at least two forms of object images on a background image without overlapping, so that a training sample is obtained from each new image, thereby obtaining a large number of training samples, which all contain at least two forms of objects that have similarities with the particle image, and the labels corresponding to the training samples are obtained in the same arrangement order.
[0022] In some embodiments, performing geometric transformation processing on each of the plurality of object images includes:
[0023] Perform a flipping operation and / or a rotating operation on each of the plurality of object images; and perform a zooming operation on the operated object image.
[0024] In this embodiment, each object image is flipped and / or rotated, and then the object image is reduced, so that the generated object shape is as close to the particle shape as possible.
[0025] In some embodiments, the zooming out operation on the operated object image includes:
[0026] According to the size of the preset background image and the size of the object image, an applicable reduction ratio range is determined; and according to the reduction ratio range, a reduction operation of the same ratio is performed on the operated object image.
[0027] In this embodiment, the reduction ratio used in the reduction operation is constrained according to the size of the background image and the size of the object image, which can avoid the problem that the object image is still too large after reduction and cannot be combined with the background image.
[0028] In some embodiments, determining the particle size parameters of the particles in the particle image according to the mask image and the confidence of each mask area includes:
[0029] A target mask region whose confidence exceeds a threshold is selected in the mask image; and the granularity parameter is determined according to image features of the target mask region.
[0030] In this embodiment, mask regions with low accuracy are filtered out by using a threshold, and the particle size parameters of the particles are calculated using image features of target mask regions with high accuracy.
[0031] In some embodiments, the particle size parameter includes an equivalent diameter of the particle, and determining the particle size parameter according to the image features of the target mask area includes:
[0032] The equivalent diameter of the particle is determined using the number of pixels contained in the target mask area.
[0033] In this embodiment, the equivalent diameter of the particle is calculated by using the number of pixels included in the target mask area as the area of the particle. Since the number of pixels is relatively easy to obtain, the difficulty of obtaining the equivalent diameter can be reduced.
[0034] In some embodiments, the particle size parameter includes the sphericity of the particles, and determining the particle size parameter according to the image features of the target mask area includes:
[0035] The sphericity of the particles is determined using the edge length of the target mask area.
[0036] In this embodiment, the sphericity of the particles is calculated by using the edge length of the target mask area. Since the edge length is relatively easy to obtain, the difficulty of obtaining the sphericity can be reduced.
[0037] The second aspect of the present application provides a particle size detection device, the device comprising:
[0038] An image processing unit, used to process the particle image through a trained image recognition model to obtain a mask image of the particle image and the confidence of each mask area in the mask image; the image recognition model is obtained by training samples constructed based on object images of various object types, and the samples are images containing objects of various forms, and there are differences in shape and / or size between the various forms of objects;
[0039] A parameter determination unit is used to determine the particle size parameters of the particles in the particle image according to the mask image and the confidence of each mask area; one mask area represents one particle.
[0040] The third aspect of the present application proposes an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described in the first aspect when executing the program.
[0041] The fourth aspect of the present application proposes a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in the first aspect above.
[0042] 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
[0043] 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 reference numerals are used throughout the drawings to represent the same components. In the drawings:
[0044] Figure 1 is a flow chart of an embodiment of a particle size detection method according to an exemplary embodiment;
[0045] Figure 2 is a schematic diagram of a particle size detection process according to an exemplary embodiment;
[0046] Figure 3 is a structural schematic diagram of an image recognition model according to an exemplary embodiment;
[0047] Figure 4 is a model training flow chart shown according to an exemplary embodiment;
[0048] Figure 5 is a schematic diagram of a sample construction process according to an exemplary embodiment;
[0049] Figure 6 is a schematic structural diagram of a particle size detection device according to an exemplary embodiment;
[0050] Figure 7 is a schematic diagram of a hardware structure of an electronic device according to an exemplary embodiment;
[0051] Figure 8 The figure is a schematic diagram of the structure of a storage medium according to an exemplary embodiment. DETAILED DESCRIPTION
[0052] The following embodiments of the technical solution of the present application are 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.
[0053] 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.
[0054] 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.
[0055] 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.
[0056] 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.
[0057] 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).
[0058] At present, for particle size detection technology, traditional image processing methods are used to segment particle images. Although there is no need to label the image, it usually relies on manually set parameter thresholds for binarization. These parameters may need to be adjusted under different lighting conditions, background complexity or changes in object characteristics, and the binarization process usually results in the loss of boundary or internal details. For targets with complex structures or morphologies, such as irregular particles, traditional image processing methods may find it difficult to accurately capture their details and shapes.
[0059] With the development of computer vision technology, machine learning methods can better understand and represent targets with complex structures or morphologies by learning features from a large number of samples, retain more detailed information, and generate accurate segmentation results.
[0060] However, existing machine learning methods usually require pre-collection of images of the materials to be identified and manual labeling of the particles therein in order to obtain samples that can be used for training. For new material types or complex scenarios, re-labeling and retraining of the model are often required.
[0061] It can be seen that both traditional image processing methods and existing machine learning methods have low adaptability, flexibility and versatility.
[0062] In order to solve the above technical problems, the present application proposes a particle size detection method, which does not require pre-collection of samples of the material to be identified for model training. Instead, it uses a sample training model constructed from existing diverse object images to identify particle images, and detects particle size parameters based on the mask image and confidence output by the model. Since the samples of the training model are constructed from diverse object images, the samples contain objects of various shapes and have similarities with the particle images, so that the model can adapt to scenarios of various types of particulate materials, thereby improving the flexibility and versatility of particle size detection.
[0063] The particulate material mentioned above can be any material that requires particle size detection, such as lithium iron phosphate materials, nickel cobalt manganese oxide or nickel cobalt aluminum oxide used in the battery production process. By collecting images of evenly dispersed materials, the representativeness of the test samples is ensured.
[0064] The particle size detection method disclosed in the embodiments of the present application can be used in, but is not limited to, the production process of batteries, and can certainly also be used in the production process of other products to detect the particle size distribution of particulate materials used in the production process, so as to optimize the production process and improve product quality.
[0065] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0066] Figure 1 This is a flow chart of an embodiment of a particle size detection method according to an exemplary embodiment of the present application. The particle size detection method includes the following steps:
[0067] Step 101: Processing the particle image through a trained image recognition model to obtain a mask image of the particle image and the confidence of each mask area in the mask image, wherein the image recognition model is obtained through sample training based on object images of various object types, and the sample is an image containing objects of various shapes, and the shapes and / or sizes of the objects of various shapes are different;
[0068] Step 102: Determine the particle size parameters of the particles in the particle image according to the mask image and the confidence of each mask region, wherein one mask region represents one particle.
[0069] The image recognition model can be understood as a machine learning model for identifying particle images, which is used to perform mask segmentation on particles in the particle image and output the corresponding mask image. The image recognition model does not require pre-collection of sample training of the particle material to be identified, but is obtained by training using samples constructed from existing diverse object images.
[0070] The particle image can be understood as an image of the granular material to be detected, and the particle image can include uniformly dispersed particles of various shapes, which are the target objects for particle size detection in this application. For example, the particle image can be an image of lithium iron phosphate material, an image of nickel cobalt manganese oxide, etc.
[0071] The mask image can be understood as a binary image corresponding to the particle image, which represents the model's prediction that different regions in the particle image belong to the target object to be detected, and its size can be the same as that of the particle image. The mask image can include two types of pixels, "1" and "0", where the area marked with "1" (displayed in white) can represent the area that needs to be processed or retained, that is, the particle area, and the area marked with "0" (displayed in black) represents the area that needs to be ignored, that is, the background area.
[0072] The mask region can be understood as the region in the mask image used to represent particles, that is, the region marked with "1", which belongs to the target object to be detected. Since the particles to be detected are usually solid objects, and a particle image usually contains multiple particles, the mask image contains multiple mask regions, one mask region represents one particle, and each mask region is a solid connected region.
[0073] The confidence level can be understood as a numerical value output by the model that indicates the prediction accuracy of the masked area. The higher the confidence level, the higher the prediction accuracy of the masked area.
[0074] Object images can be understood as images of any existing object type. The object images of various object types collected in this application as raw data for constructing model training samples can be a large number of image data sets collected from the Internet or data providers, etc. These data cover a variety of scenes, objects, lighting conditions and shooting angles, etc. It can be an image data set containing any content, such as animals, people, various non-biological objects, etc. It is worth noting here that these collected object images all correspond to object mask annotations, that is, each object image corresponds to a mask image annotation. These mask annotations can be annotations that already exist when the image data set is collected, or they can be annotated later. This application does not limit this.
[0075] The sample can be understood as an image used to train an image recognition model. The sample is an image generated from object images of various object types, and the sample contains objects of various shapes, which has similar characteristics to an image containing multiple particles that needs to be recognized.
[0076] Particle size parameters can be understood as parameters that describe the morphological characteristics of particles, such as particle size parameters, particle shape parameters, etc.
[0077] For example, see Figure 2 In the particle size detection process shown, the particle image to be detected is input into the image recognition model, and the image recognition model processes the particle image, outputs the corresponding mask image and the confidence of each mask area in the mask image, and then uses the mask image and the confidence of each mask area to calculate the particle size parameters of each particle.
[0078] At this point, the above Figure 1 The particle size detection process shown in the figure uses a model trained with samples constructed from diverse object images to identify particle images. Since the samples are images containing objects of various forms, they have similarities with particle images, so the trained model can adapt to scenes of various types of particle materials, improving the flexibility and versatility of particle size detection. And based on the mask image and confidence output by the model, the particle size parameters are detected, and the detection results are not affected by human factors and are accurate and objective.
[0079] In some optional embodiments of the present application, before executing the above step 101, the following steps may also be included:
[0080] The collected original image of the particle is preprocessed to obtain a particle image, wherein the preprocessing includes at least one of brightness adjustment, contrast adjustment and sharpening processing.
[0081] The original image of the particles can be understood as the image directly collected by the image collector. Since the particles are very small, in order to improve the recognition rate, the image collector collects the image of the particles by adjusting the magnification so that the particles are evenly presented in the image to ensure image clarity and detail capture. It is worth noting here that the image collector can be any device such as an electron microscope, a camera, etc.
[0082] Preprocessing can be understood as image quality enhancement processing before the image is recognized, which is used to enhance the visibility of particle features. Among them, brightness adjustment and contrast adjustment can adjust the brightness and contrast of the image to make the boundaries and shapes of the particles clearer and more obvious. Sharpening can enhance the visibility of particle features, improve the edges and details in the image, and make subsequent recognition more accurate. For example, sharpening can be implemented using the Laplace operator, and the sharpening formula is as follows:
[0083]
[0084] In the above formula, represents the original image, represents the image after sharpening, Represents the effect of the Laplace operator on the original image, Represents the sharpening strength factor.
[0085] In this embodiment, the collected original image of the particles is preprocessed to improve the image clarity and highlight the features of the particles in the image, thereby improving the recognition effect of the image recognition model.
[0086] In some optional embodiments of the present application, the above step 101 may include:
[0087] The multi-scale feature map of the particle image is extracted through the image recognition model, and the mask image of the particle image and the confidence of each mask area in the mask image are predicted using the multi-scale feature map.
[0088] The multi-scale feature map can be understood as the feature capture result of the particle image at different scales. Since the small particle targets have different shapes, some large and some small, both high-resolution feature maps and low-resolution feature maps are needed to capture the details, so it is necessary to capture the target information at different scales.
[0089] A multi-scale feature map usually includes high-level feature maps and low-level feature maps. The high-level feature map refers to the features of the image output after being processed by a deep convolutional layer, and the low-level feature map refers to the features of the image output after being processed by a shallow convolutional layer. The resolution of the high-level feature map is lower than that of the low-level feature map, but the number of channels of the high-level feature map is higher than that of the low-level feature map.
[0090] In this embodiment, a multi-scale feature map of a particle image is extracted to capture information of small target particles at different scales, thereby facilitating prediction of a high-resolution mask image using features of different scales, and outputting the confidence of each predicted mask area to reflect the model's estimate of the accuracy of the mask area.
[0091] See also Figure 3 The structure of the image recognition model shown may include a feature extraction module and a mask generation module. The feature extraction module is used to extract features from the particle image and generate a multi-scale feature map, which can be understood as an image encoder that extracts features from the input image; the mask generation module is used to predict the mask image of the particle image and the confidence of each mask area in the mask image using the multi-scale feature map, which can be understood as an image decoder that performs a series of upsampling operations and predictions on the multi-scale feature map.
[0092] That is to say, the feature extraction module is responsible for gradually reducing the spatial resolution of the input image to extract feature maps of different resolutions, thereby capturing the information of the target at different scales and outputting multi-scale feature maps; the mask generation module is responsible for gradually restoring the spatial resolution of these feature maps, while fusing the feature maps of the same scale from the image encoder to generate the final high-resolution mask image and the confidence of each mask area.
[0093] Exemplarily, the feature extraction module may include multiple residual blocks to reduce the resolution of the input image, and the mask generation module may include multiple upsampling layers to upsample and fuse the scale feature map.
[0094] For details, see Figure 3As shown in the figure, the feature extraction module includes a convolution layer, a maximum pooling layer and four series-connected residual blocks. The feature map output by the convolution layer and the feature maps output by the four residual blocks constitute a multi-scale feature map. The mask generation module includes a bounding box prediction layer, five series-connected upsampling layers and an output layer. The bounding box prediction layer is responsible for predicting the bounding box coordinates and confidence of the mask area using the minimum-scale feature map in the multi-scale feature map. The minimum-scale feature map is upsampled sequentially through five series-connected upsampling layers, and in each upsampling layer, the feature map obtained by upsampling is fused with the feature map of the same scale in the multi-scale feature map and then output.
[0095] For example, assuming that the size of the particle image input to the image recognition model is 1024x768x3 (length x width x number of channels), the output feature size after convolution processing is 512x384x64, and the output feature size after pooling processing of the 512x384x64 size feature by the maximum pooling layer is 256x192x64, and after downsampling processing of 4 residual blocks, the output feature size of each residual block is 256x192x256, 128x96x512, 64x48x1024, and 32x24x2048, respectively. Among them, the multi-scale feature map includes features of six scales: 32x24x2048, 64x48x1024, 128x96x512, 256x192x256, 512x384x64, and 1024x768x3.
[0096] In the mask generation module, the bounding box prediction layer uses the 32x24x2048 features to predict the bounding box coordinates and confidence of the mask area. Assuming that a bounding box is predicted for each position, the output is 32x24x4 (where "4" represents the 4 coordinate values of the bounding box, i.e., the upper left vertex (x, y) of the bounding box and the width and height of the bounding box). The first upsampling layer upsamples the 32x24x2048 features to 64x48x1024 and fuses them with the 64x48x1024 features output by the feature extraction module. The second The upsampling layer upsamples the 64x48x1024 features output by the first upsampling layer to 128x96x512 and fuses them with the 64x48x1024 features output by the feature extraction module, and so on, until the fifth upsampling layer outputs 1024x768x64 features. The output layer combines the prediction results output by the bounding box prediction layer and the 1024x768x64 features output by the fifth upsampling layer to generate mask features. Assuming that the preset result has N particles, the mask feature size is 1024x768xN.
[0097] In some optional embodiments of the present application, see Figure 4 As shown, the model training process may also include the following steps:
[0098] Step 401: Acquire object images of multiple object types;
[0099] Step 402: Generate training samples and labels of the training samples based on the multiple object images and the mask images corresponding to the multiple object images, where the training samples are images containing objects of multiple forms, and the labels are the mask images of the training samples;
[0100] Step 403: Train the constructed model according to the training samples and labels to obtain a model of a mask image for identifying a particle image.
[0101] Object images of various object types can be understood as object images including diverse objects, such as image data of animals, people, and various non-biological objects, and these image data can be used as original data sets. These object images can be annotated with corresponding mask images, so that the mask images can be processed synchronously when the object images are subsequently processed, so as to keep the mask corresponding to the object.
[0102] It should be noted here that since the acquired multiple object images cover a large number of object types, objects with particle features with relatively low probability can be filtered out, such as hollow objects. The probability of particles having this feature is extremely low. Therefore, it can be determined by judging whether the pixel value of the mask center in the mask image corresponding to the object image is 0. If so, the object image is removed.
[0103] Training samples can be understood as images constructed from multiple object images, which are images containing objects of different shapes. Usually, particle images also contain particles of different shapes. Therefore, there are certain similarities between training samples and particle images. By using multiple object images, a large number of training samples can be generated, so these training samples can be regarded as synthetic data sets for training models.
[0104] The label of the training sample can be understood as a binary image constructed from the mask image of the object image, which serves as the mask image of the training sample.
[0105] In this embodiment, by acquiring existing diverse object images, a large number of training samples and labels of training samples are constructed using these object images and corresponding mask images. Since the training samples contain objects of various forms, which have similar characteristics to the images of particulate materials, the trained model can adapt to the application scenarios of various types of particulate materials, such as the particle size detection of lithium iron phosphate materials used in the battery production process, thereby improving the flexibility and versatility of particle size detection. This saves the process of preparing training samples and label data for each type of particulate material, and thus can save time in preparing training data to a certain extent.
[0106] In some optional embodiments of the present application, the above-mentioned generation of training samples and labels of training samples based on multiple object images and mask images corresponding to the multiple object images may include:
[0107] Perform geometric transformation processing on each object image in the multiple object images to obtain object images of different forms corresponding to each object image, perform the same geometric transformation processing as that of the corresponding object image on the mask image corresponding to each object image in the multiple object images to obtain mask images corresponding to each form of object images in different forms, and generate training samples and labels based on the object images of different forms and the mask images corresponding to the object images of different forms.
[0108] The images of objects of different forms can be understood as the different appearance shapes or sizes of the objects. For example, two objects of different types can be regarded as objects of different forms. For another example, two objects of the same type can be regarded as objects of different forms when they are transformed into different sizes, and two objects of the same type can be regarded as objects of different forms when they are transformed into different appearance shapes.
[0109] Geometric transformation processing can be understood as an operation to modify the spatial position layout of an object, which may include operations such as translation, rotation, scaling, and flipping, through which operations are performed to ensure that the shape of the object has a certain similarity with the shape of the particles.
[0110] It is worth noting here that by performing geometric transformation processing on each object image, objects of different shapes can be obtained, and by performing multiple different geometric transformation processing on each object image, more objects of different shapes can be obtained.
[0111] In this embodiment, each object image is geometrically transformed to modify the layout and size of the object, thereby generating a large number of object images of different morphologies. These object images of different morphologies are similar to particles of different morphologies of the granular material. At the same time, the mask image of the object image is also subjected to the same geometric transformation to obtain a mask image of the corresponding morphology. Therefore, training samples and labels having similar features to the particle image can be generated through these object images of different morphologies and the corresponding mask images.
[0112] In some optional embodiments of the present application, the generation of training samples and labels based on the object images of different forms and the mask images corresponding to the object images of different forms may include:
[0113] Arrange at least two forms of object images in a preset background image to obtain multiple new images; wherein the new image is an image generated after the preset background image is arranged with at least two forms of object images, and the arrangement positions of the object images in the new image do not overlap, and generate multiple training samples based on the multiple new images. For each training sample, arrange and combine the mask images of the corresponding form according to the arrangement order of the object images of different forms in the training sample to obtain a label corresponding to the training sample.
[0114] The preset background image can be understood as a pre-generated pure background canvas, which is used to place images of objects of different shapes to generate training samples.
[0115] It should be noted here that the arrangement positions of the object images in the background image do not overlap. When combining the object images into the background image, for each object image, a placement position is randomly selected in the background image. If it is determined that the placement position does not overlap with the position of the object image already placed in the background image, the object image is placed at the selected placement position. Otherwise, a placement position is randomly selected in the background image again.
[0116] Exemplarily, when judging whether there is overlap, the mask image of the object image and the mask image of the placed object image can be combined according to the corresponding positions. When the total mask area after the combination is the same as the sum of the mask areas of the two mask images, it indicates that there is no overlap.
[0117] It can be understood that the above-mentioned method of judging whether there is overlap is only an exemplary description, and the present application does not specifically limit the method of judging whether there is overlap. For example, the judgment can also be made by obtaining whether there is an intersection between the area after the image of the object to be placed is placed according to the selected placement position and the placement area of the placed object image.
[0118] For the specific acquisition process of each new image, the number range applicable to the selected object image can be determined according to the magnification of the image collector, and the image collector is used to collect the particle image to be identified, and the object image is selected according to the number range and combined and arranged into the background image. In other words, a number is selected in the number range each time, and the number of object images is selected from the object images of various forms and combined and arranged into the background image.
[0119] Among them, the magnification of the image collector can be understood as the proportional relationship between the actual size of the object in the image and the size presented in the image. When collecting images of granular materials, it is crucial to observe or analyze small target objects by shooting granular materials using a certain magnification. It can be understood that when shooting images of scattered granular materials, if the magnification selected is too large, the number of particles in the captured image will be relatively small, and if the magnification selected is too small, the number of particles in the captured image will be relatively large. Therefore, by constraining the number of selected object images according to the magnification used to collect the granular image, the difference between the object number density contained in the training sample and the particle density in the actual granular image can be reduced, so that the training samples constructed by multiple object images are as similar as possible to the actual granular image.
[0120] For example, by performing statistical analysis on the number of particles and magnifications in the particle image, a mapping table of different magnifications and number ranges can be pre-established, so that by searching the mapping table, the number range applicable to the selected object image can be obtained.
[0121] The number range can be understood as the number interval of object images combined and arranged in the background image. Each time a new image is generated by the combination, a number can be randomly selected from the number range and the number of object images can be selected from the object images of various forms.
[0122] For example, assuming that the applicable number range is 5-10 objects, then each time a number is randomly selected between 5-10 to select object images, so the number of objects selected each time fluctuates between 5-10.
[0123] In this embodiment, a large number of new images are generated by arranging at least two forms of object images on a background image without overlapping, so that a training sample is obtained from each new image, thereby obtaining a large number of training samples, which all contain at least two forms of objects that have similarities with the particle image, and the labels corresponding to the training samples are obtained in the same arrangement order.
[0124] It should be noted here that in addition to the training sample generation scheme given above, at least two object images can be reduced and combined into a preset background image to obtain multiple new images, and then each new image is subjected to overall or regional geometric transformation processing to obtain multiple training samples.
[0125] In some optional embodiments of the present application, geometric transformation processing is performed on each of the multiple object images, including:
[0126] A flipping operation and / or a rotation operation is performed on each of the plurality of object images, and then a reduction operation is performed on the operated object image.
[0127] The flip operation refers to mirror-reversing an image along a certain axis, usually including horizontal flipping and vertical flipping.
[0128] The rotation operation refers to rotating the image around the center point at a certain angle, such as 90 degrees, 180 degrees, or 270 degrees.
[0129] The reduction operation refers to reducing the size of the image. Since the size of the object is usually much larger than the size of the particles, the reduction operation can make the size of the object similar to the size of the particles.
[0130] By performing a flipping operation and / or a rotating operation, as well as a reduction operation on the object image, it can be ensured that the shape of the object and the shape of the particles remain as similar as possible.
[0131] It is worth noting here that the flipping operation and / or the rotation operation and the reduction operation performed on each object image may be the same or different.
[0132] In this embodiment, each object image is flipped and / or rotated, and then the object image is reduced, so that the generated object shape is as close to the particle shape as possible.
[0133] In some optional implementations of the present application, performing a reduction operation on the operated object image includes:
[0134] According to the size of the preset background image and the size of the object image, an applicable reduction ratio range is determined, and then the object image after the operation is reduced by the same ratio according to the reduction ratio range.
[0135] The background image is a pre-generated pure background canvas of a fixed size, which is used to place the object image after geometric transformation. The size of the object image will affect whether it can be completely placed in the background image.
[0136] The reduction ratio range can be understood as the reduction ratio interval that can be selected when performing a reduction operation on the object image. The reduction ratio range can ensure that the reduced object image can be completely combined into the background image. It should be noted that the present application does not limit the method of determining the reduction ratio range according to the size of the background image and the size of the object image. Since there are multiple object images selected each time, the reduction ratio range can be determined based on the relationship between the maximum and minimum sizes of the object image and the size of the background image. The reduction ratio range can also be predicted based on all sizes of the selected object images and the size of the background image using a machine learning method.
[0137] In this embodiment, the reduction ratio used in the reduction operation is constrained according to the size of the background image and the size of the object image, which can avoid the problem that the object image is still too large after reduction and cannot be combined with the background image.
[0138] In some embodiments, based on the multiple new images, generating multiple training samples includes:
[0139] Grayscale processing is performed on each new image to generate multiple training samples, so that the image color of the sample is consistent with the color of the particle image in actual application, further improving the similarity with the particle image.
[0140] Grayscale processing can be understood as converting an image into a grayscale image. Electron microscopes are usually used to collect particle images, and grayscale processing can simulate electron microscope photos.
[0141] Optionally, a preset weighted formula can be used for grayscale processing. The weighted formula is as follows:
[0142] Gray = a * R + b * G + c * B
[0143] Among them, R, G, B represent the values of the red, green, and blue color channels of each pixel respectively, Gray is the calculated grayscale value, a, b, and c represent the weighting coefficients of the red, green, and blue color channels respectively, and the sum of the three values of a, b, and c is equal to 1. Since the human eye is more sensitive to green, the weighting coefficient b of G is larger than the other two weighting coefficients.
[0144] Figure 5 The following is a schematic diagram of a sample construction process according to an exemplary embodiment, including the following steps:
[0145] a) Data source: Collect a large number of labeled object images (labeled means the mask images corresponding to the objects are labeled) from public databases and / or data providers as the original dataset.
[0146] b) Object selection: Randomly select a certain number of object images from the original data set, for example, 5-10, and determine whether the object is hollow. If so, exclude the object.
[0147] c) Flip / Rotate: The object image is randomly flipped (horizontally or vertically) or randomly rotated (at a random rotation angle), and the mask image is also processed in the same way to ensure that the mask image corresponds to the object image.
[0148] d) Reduction & combination: The above object image and its mask image are reduced according to a certain reduction ratio range, and the reduced object image is combined into the background image. In order to avoid overlapping of objects, each object image is placed one by one in the process of combining the object images. Each time a new object image is placed, it is detected whether the new object image overlaps with the placed object image. If overlap is detected, the placement position is reselected until a placement position without overlap is found. If a placement position is not found after more than a certain number of attempts, the object image is discarded. At the same time, the mask image is also combined in the same way to ensure that the mask image corresponds to the object image.
[0149] e) Grayscale: Grayscale the combined new image.
[0150] g) Repeat step be to obtain a large number of new annotated images, which are recorded as synthetic data sets. These new annotated images contain a large number of objects of different shapes and have similar features to the material images containing a large number of small particles that need to be identified.
[0151] In some optional embodiments of the present application, determining the particle size parameters of the particles in the particle image according to the mask image and the confidence of each mask area in the above step 102 includes:
[0152] A target mask region whose confidence exceeds a threshold is selected in the mask image, and the granularity parameter is determined according to image features of the target mask region.
[0153] The threshold may be a preset minimum confidence requirement for the mask region used for measurement, and low-quality mask predictions may be filtered out by the threshold.
[0154] The image features may be features such as pixels, edges, shapes, etc. of the target mask area, which are used to provide the calculation requirements of the granularity parameters.
[0155] In this embodiment, mask regions with low accuracy are filtered out by using a threshold, and the particle size parameters of the particles are calculated using image features of target mask regions with high accuracy.
[0156] In some optional embodiments of the present application, the particle size parameter includes an equivalent diameter of the particle, and the particle size parameter is determined according to the image features of the target mask area, including:
[0157] The equivalent diameter of the particle is determined using the number of pixels contained in the target mask area.
[0158] The equivalent diameter can be understood as the diameter of a circle with the same area as the particle, that is, the particle area equivalent diameter. According to the circle area formula , we can get:
[0159] Formula 1
[0160] In the above formula 1, S represents the particle area, the number of pixels contained in the target mask area can be regarded as the particle area, and D represents the equivalent diameter.
[0161] The equivalent diameter obtained above is in pixels, so the equivalent diameter in pixels can be converted into micrometers / nanometers by the pixel size of the particle image.
[0162] According to the pixel size, assuming that m pixels in the image represent n microns, the conversion formula for the equivalent diameter is:
[0163] Formula 2
[0164] In the above formula 2, represents the equivalent diameter in micrometers and D represents the equivalent diameter in pixels.
[0165] In this embodiment, the equivalent diameter of the particle is calculated by using the number of pixels included in the target mask area as the area of the particle. Since the number of pixels is relatively easy to obtain, the difficulty of obtaining the equivalent diameter can be reduced.
[0166] In some optional embodiments of the present application, the particle size parameter includes the sphericity of the particles. The particle size parameter is determined according to the image features of the target mask area, including:
[0167] The sphericity of the particles is determined using the edge length of the target mask area.
[0168] Sphericity can be understood as the ratio of the equivalent diameter of the particle circumference to the equivalent diameter of the particle area, that is, the formula for sphericity is , represents the equivalent diameter of the particle perimeter, represents the particle area equivalent diameter. It can be obtained using the above formula 1, Using the circumference formula of a circle get, Represents the particle perimeter, and the edge length of the target mask area can be regarded as the particle perimeter.
[0169] In this embodiment, the sphericity of the particles is calculated by using the edge length of the target mask area. Since the edge length is relatively easy to obtain, the difficulty of obtaining the sphericity can be reduced.
[0170] The above description of various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other, and for the sake of brevity, they will not be repeated herein.
[0171] Those skilled in the art will appreciate that, in the above method of a specific embodiment, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.
[0172] Corresponding to the above-mentioned embodiments of the particle size detection method, the present application also provides embodiments of a particle size detection device.
[0173] Figure 6 FIG. 1 is a schematic diagram of a particle size detection device according to an exemplary embodiment of the present application. The device is used to perform the particle size detection method provided in any of the above embodiments, such as Figure 6 As shown, the particle size detection device comprises:
[0174] The image processing unit 610 is used to process the particle image through a trained image recognition model to obtain a mask image of the particle image and the confidence of each mask area in the mask image; the image recognition model is obtained by training samples constructed based on object images of various object types, and the samples are images containing objects of various forms, and the shapes and / or sizes of the various objects are different;
[0175] The parameter determination unit 620 is used to determine the particle size parameters of the particles in the particle image according to the mask image and the confidence of each mask area; one mask area represents one particle.
[0176] In an optional implementation, the image processing unit 610 is specifically used to extract multi-scale features of the particle image through the image recognition model, and use the multi-scale feature map to predict the mask image of the particle image and the confidence of each mask area in the mask image.
[0177] In an optional implementation, the device further includes ( Figure 6 not shown):
[0178] A model training unit is used to obtain object images of various object types; based on the various object images and the mask images corresponding to the various object images, generate training samples and labels of the training samples, wherein the training samples are images containing objects of various forms, and the labels are the mask images of the training samples; and train the constructed model according to the generated training samples and the labels of the training samples to obtain a model of the mask image for identifying particle images.
[0179] In an optional implementation, the model training unit is specifically used to generate training samples and labels for the training samples based on the multiple object images and the mask images corresponding to the multiple object images. The process includes performing geometric transformation processing on each object image in the multiple object images to obtain object images of different forms corresponding to the each object image; performing the same geometric transformation processing as the corresponding object image on the mask image corresponding to each object image in the multiple object images to obtain mask images corresponding to each form of the object images of different forms; and generating the training samples and the labels based on the object images of different forms and the mask images corresponding to the object images of different forms.
[0180] In an optional implementation, the model training unit is specifically used to arrange at least two forms of object images in a preset background image to obtain a plurality of new images during the process of generating the training samples and the labels based on the object images of different forms and the mask images corresponding to the object images of different forms; wherein the new image is an image generated after arranging at least two forms of object images in a preset background image, and the arrangement positions of the object images in the new image do not overlap; based on the multiple new images, generate a plurality of the training samples; for each of the training samples, arrange and combine the mask images of the corresponding forms according to the arrangement order of the object images of different forms in the training sample to obtain the label corresponding to the training sample.
[0181] In an optional implementation, the model training unit is specifically used to perform a flip operation and / or a rotation operation on each object image among the multiple object images during a geometric transformation process on each object image among the multiple object images; and to perform a shrinking operation on the object image after the operation.
[0182] In an optional implementation, the model training unit is specifically used to determine an applicable reduction ratio range according to the size of the preset background image and the size of the object image during the reduction operation on the operated object image; and perform a reduction operation of the same ratio on the operated object image according to the reduction ratio range.
[0183] In an optional implementation, the parameter determination unit 620 is specifically configured to select a target mask region whose confidence exceeds a threshold in the mask image; and determine the granularity parameter according to image features of the target mask region.
[0184] In an optional implementation, the particle size parameter includes an equivalent diameter of the particle, and the parameter determination unit 620 is specifically used to determine the equivalent diameter of the particle by using the number of pixels contained in the target mask area in the process of determining the particle size parameter according to the image features of the target mask area.
[0185] In an optional implementation, the particle size parameter includes the sphericity of the particles, and the parameter determination unit 620 is specifically used to determine the sphericity of the particles using the edge length of the target mask area in the process of determining the particle size parameter according to the image features of the target mask area.
[0186] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.
[0187] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present application scheme. A person of ordinary skill in the art can understand and implement it without paying any creative work.
[0188] The embodiment of the present application also provides an electronic device corresponding to the particle size detection method provided in the above embodiment, so as to execute the above particle size detection method.
[0189] Figure 7 This is a hardware structure diagram of an electronic device according to an exemplary embodiment of the present application, and the electronic device may include: a communication interface 601, a processor 602, a memory 603 and a bus 604; wherein the communication interface 601, the processor 602 and the memory 603 communicate with each other through the bus 604. The processor 602 can execute the particle size detection method described above by reading and executing the machine executable instructions corresponding to the control logic of the particle size detection method in the memory 603. The specific content of the method is referred to the above embodiment, and will not be repeated here.
[0190] The memory 603 mentioned in this application can be any electronic, magnetic, optical or other physical storage device, and can contain storage information, such as executable instructions, data, etc. Specifically, the memory 603 can be RAM (Random Access Memory), flash memory, storage drive (such as hard disk drive), any type of storage disk (such as optical disk, DVD, etc.), or similar storage medium, or a combination thereof. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 601 (which can be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. can be used.
[0191] The bus 604 may be an ISA bus, a PCI bus or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The memory 603 is used to store programs, and the processor 602 executes the programs after receiving execution instructions.
[0192] The processor 602 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 602. The above processor 602 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor to be executed, or the hardware and software modules in the decoding processor can be combined and executed.
[0193] The electronic device provided in the embodiment of the present application and the particle size detection method provided in the embodiment of the present application are based on the same inventive concept and have the same beneficial effects as the methods adopted, operated or implemented therein.
[0194] The present application also provides a computer-readable storage medium corresponding to the particle size detection method provided in the above embodiment. Figure 8 As shown, the computer-readable storage medium is a CD 30 on which a computer program (ie, a program product) is stored. When the computer program is executed by a processor, the particle size detection method provided by any of the aforementioned embodiments will be executed.
[0195] It should be noted that examples of the computer-readable storage medium may also include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other optical or magnetic storage media, which are not listed here one by one.
[0196] The computer-readable storage medium provided in the above-mentioned embodiments of the present application and the particle size detection method provided in the embodiments of the present application are based on the same inventive concept and have the same beneficial effects as the method adopted, run or implemented by the application program stored therein.
[0197] The embodiments of the present application also provide a computer program product corresponding to the particle size detection method provided in the aforementioned embodiments, including a computer program, which is executed by a processor to implement the particle size detection method provided in any of the aforementioned embodiments.
[0198] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0199] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0200] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A particle size detection method, characterized in that: The method comprises: Processing the particle image by using the trained image recognition model to obtain a mask image of the particle image and confidence levels of each mask area in the mask image; Determining the particle size parameters of the particles in the particle image according to the confidence of the mask image and each mask area; one mask area represents one particle; The training process of the image recognition model includes: Obtaining object images of multiple object types, wherein the object images of the multiple object types are existing images of any object type; generating training samples and labels of the training samples based on the acquired multiple object images and mask images corresponding to the multiple object images, wherein the training samples are images containing objects of multiple forms, and there are differences in shape and / or size between the objects of multiple forms, and the labels are mask images of the training samples; training the constructed model according to the training samples and the labels to obtain the image recognition model; The generating of training samples and labels of the training samples based on the acquired multiple object images and the mask images corresponding to the multiple object images includes: Performing geometric transformation processing on each object image in the multiple object images to obtain object images of different forms corresponding to each object image; performing the same geometric transformation processing as that of the corresponding object image on the mask image corresponding to each object image in the multiple object images to obtain a mask image corresponding to each form of the object images of different forms; generating the training samples and the labels based on the object images of different forms and the mask images corresponding to the object images of different forms.
2. The method according to claim 1, characterized in that The processing of the particle image by using the trained image recognition model includes: A multi-scale feature map of the particle image is extracted through the image recognition model, and a mask image of the particle image and confidence levels of each mask area in the mask image are predicted using the multi-scale feature map.
3. The method according to claim 1, characterized in that The generating the training sample and the label based on the object images of different forms and the mask images corresponding to the object images of different forms includes: Arranging at least two forms of object images in a preset background image to obtain a plurality of new images; wherein the new images are images generated after arranging at least two forms of object images in the preset background image, and the arrangement positions of the object images in the new images do not overlap; Based on the multiple new images, generate a plurality of the training samples; For each of the training samples, according to the arrangement order of the object images of different forms in the training sample, the mask images of the corresponding forms are arranged and combined to obtain the label corresponding to the training sample.
4. The method according to claim 1, characterized in that: The performing geometric transformation processing on each object image among the plurality of object images comprises: performing a flipping operation and / or a rotating operation on each of the plurality of object images; The object image after the operation is reduced.
5. The method according to claim 4, characterized in that The step of performing a reduction operation on the operated object image includes: Determining an applicable reduction ratio range according to a preset background image size and a size of the object image; According to the reduction ratio range, the object image after the operation is reduced by the same ratio.
6. The method according to claim 1, characterized in that Determining the particle size parameters of the particles in the particle image according to the mask image and the confidence of each mask area includes: Selecting a target mask area whose confidence exceeds a threshold in the mask image; The granularity parameter is determined according to the image features of the target mask area.
7. The method according to claim 6, characterized in that The particle size parameter includes an equivalent diameter of the particle, and the determining of the particle size parameter according to the image features of the target mask area includes: The equivalent diameter of the particle is determined using the number of pixels contained in the target mask area.
8. The method according to claim 6 or 7, characterized in that: The particle size parameter includes the sphericity of the particles, and determining the particle size parameter according to the image features of the target mask area includes: The sphericity of the particles is determined using the edge length of the target mask area.
9. A particle size detection device, characterized in that: The device comprises: An image processing unit, used to process the particle image by using a trained image recognition model to obtain a mask image of the particle image and a confidence level of each mask area in the mask image; A parameter determination unit, used to determine the particle size parameters of the particles in the particle image according to the mask image and the confidence of each mask area; one mask area represents one particle; Also includes: A model training module is used to obtain object images of multiple object types, where the object images of the multiple object types are existing images of any object type; based on the obtained multiple object images and mask images corresponding to the multiple object images, generate training samples and labels of the training samples, where the training samples are images containing objects of multiple forms, where the shapes and / or sizes of the objects of multiple forms are different, and the labels are mask images of the training samples; and train the constructed model according to the training samples and the labels to obtain the image recognition model; The model training module is specifically used to perform geometric transformation processing on each object image in the multiple object images to obtain object images of different forms corresponding to each object image in the process of generating training samples and labels of the training samples based on the acquired multiple object images and the mask images corresponding to the multiple object images; perform the same geometric transformation processing as the corresponding object image on the mask images corresponding to each object image in the multiple object images to obtain mask images corresponding to each form of the object images of different forms; generate the training samples and the labels based on the object images of different forms and the mask images corresponding to the object images of different forms.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the method according to any one of claims 1 to 8 are implemented.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
12. A computer program product, comprising a computer program, characterized in that The computer program is executed by a processor to implement the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Mask R-CNN mineral particle identification and particle size detection method based on improved mask
CN114897816A
Building fine-grained edge extraction and classification method, device, equipment and medium
CN116778184A