Few-shot Learning Granular Image Segmentation Method
Through the SAM model and the full convolutional network model with multi-hop connection combined with threshold method and edge detection method, the accuracy and real-time problems of image segmentation of sintered coke powder particles are solved, efficient and accurate particle segmentation is achieved, and manual labeling costs are reduced.
Patent Information
- Application Number
- CN202311066641.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-23
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2043-08-23
AI Technical Summary
The prior art is difficult to achieve high-precision and strong real-time image segmentation of sintered coke powder particles, and requires a large amount of manual labeling costs.
The SAM model is used to generate pseudo-labels, and the full convolutional network model training of multi-hop connections is removed, and the noise is removed by combining the threshold method and edge detection method. The connection domain is extracted using the four-neighborhood detection method, and the adhesion area is processed through an area-adaptive image corrosion algorithm to optimize particle segmentation.
It reduces the time of manual labeling and oversegmentation, improves segmentation accuracy and speed, meets real-time requirements, and reduces the impact of adhesions.
Smart Images

Figure CN117036385B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of image processing technology, and in particular, to a few-shot learning-based particle image segmentation method. Background Art
[0002] The sintering process is an important process in iron and steel production. In this process, iron ore powder to be processed is mixed with limestone, coke powder or other additives, and an appropriate amount of water is added and heated to a certain temperature, so that the powder forms an agglomerated sintered body due to high temperature. Then the sintered body is cooled to finally form sintered ore for subsequent use in blast furnaces.
[0003] During the sintering process, the particle size distribution of solid fuels such as coke powder affects the quality of sintered ore and the service life of sintering machines. For example, if the particle size of coke powder is too small, the relative contact surface area during combustion is larger, resulting in too fast combustion speed and a decrease in the quality of sintered ore. At present, many iron and steel plants at home and abroad are based on the dry screening method to offline detect the particle size distribution of solid fuels and adjust the operation parameters of crushers, so as to improve the quality of sintered ore and the stability of the sintering process. In response to the call for high-quality development of the country, intelligent technology promotes the transformation of traditional manufacturing to modern manufacturing. Efficiently and accurately segmenting and detecting the distribution of sintered coke powder particles online is of great significance for guiding the continuous and stable production of the sintering process and realizing the low-carbon and intelligent production of the sintering process.
[0004] With the continuous development of machine vision technology, scholars at home and abroad have carried out research on the problem of online particle segmentation. However, due to the irregular shape of sintered coke powder particles, wide particle size distribution, mutual stacking and adhesion between coke powder particles, and extremely low foreground-background division degree of coke powder particle images, traditional methods such as the watershed algorithm and edge detection segmentation method often have problems such as over-segmentation, and it is difficult to achieve high-precision, millimeter-level segmentation of sintered coke powder particle images; segmenting using the shallow information of sintered coke powder particle images is to divide the image into regions by extracting features such as the gray scale, color and shape of the image, but the morphology of sintered coke powder particles is complex, and only using shallow information for segmentation has poor effects; the segmentation method using depth information is to use various depth networks, but it is still affected by situations such as particle adhesion. Moreover, due to the various morphologies of various particles, this method requires a large number of sintered coke powder particle images and label data, which invisibly increases a large amount of labor costs.
[0005] Therefore, how to combine the actual technological process of sintering, fully consider the characteristics such as coke powder particle adhesion and various morphologies, reduce the time and labor costs of creating high-quality datasets, achieve real-time and highly accurate particle segmentation, obtain the particle size distribution and thus facilitate production adjustment, is an urgent problem to be solved in the current sintering field and even the particle segmentation field. Summary of the Invention
[0006] In view of this, embodiments of the present disclosure provide a few-shot learning based particle image segmentation method, which at least partially solves the problems of poor processing efficiency and accuracy in the prior art.
[0007] Embodiments of the present disclosure provide a few-shot learning based particle image segmentation method, including:
[0008] Step 1, obtaining particle image data;
[0009] Step 2, segmenting the particle image data based on the SAM model to obtain a particle image with pseudo-labels, and performing targeted optimization on the pseudo-labels;
[0010] Step 3, dividing the particle image with pseudo-labels into a training set, a validation set, and a test set;
[0011] Step 4, inputting the training set and the validation set into a fully convolutional network model that fuses multi-hop connections for training to obtain an optimal particle segmentation model;
[0012] Step 5, inputting the test set into the optimal particle segmentation model to obtain a particle segmentation mask, and then removing noise from the particle segmentation mask based on a threshold method and a first-order edge detection method, and outputting a denoised particle segmentation mask;
[0013] Step 6, extracting each independent connected component in the denoised particle segmentation mask based on a four-neighborhood detection method to obtain a preliminary particle segmentation map;
[0014] Step 7, performing post-processing on the preliminary particle segmentation map based on an area-adaptive image erosion algorithm to obtain an eroded segmentation map;
[0015] Step 8, calculating the number and area of each independent connected component in the eroded segmentation map, and calculating the particle size distribution based on the area value range.
[0016] According to a specific implementation manner of the embodiments of the present disclosure, the specific steps of Step 2 include:
[0017] Step 2.1, using the SAM model to generate a mask for the particle image data to obtain an instance segmentation mask;
[0018] Step 2.2, performing edge erosion on the independent connected components in the instance segmentation mask to obtain an eroded instance segmentation mask;
[0019] Step 2.3, performing a binarization operation on the eroded instance segmentation mask to weaken the instance segmentation mask into a semantic segmentation mask;
[0020] Step 2.4, calculating the area of each independent connected component in the semantic segmentation mask, and based on an area threshold T, setting each independent connected component with an area less than T as the background to obtain an optimized semantic segmentation mask.
[0021] According to a specific implementation manner of an embodiment of the present disclosure, before step 4, the method further includes:
[0022] Adopt a pre-trained VGG16 deep network as the backbone network of the fully convolutional network model, and the VGG16 deep network includes 7 convolutional layers and 5 pooling layers;
[0023] Use 4 deconvolutional layers as the upsampling part of the fully convolutional network model.
[0024] According to a specific implementation manner of an embodiment of the present disclosure, the process of the multi-hop connection includes:
[0025] After the output of the seventh convolutional layer is processed by the first deconvolutional layer, it is fused with the output of the fourth pooling layer to obtain the first-level feature;
[0026] After the first-level feature is processed by the second deconvolutional layer, it is fused with the output of the third pooling layer to obtain the second-level feature;
[0027] After the second-level feature is processed by the third deconvolutional layer, it is fused with the output of the second pooling layer to obtain the third-level feature;
[0028] After the third-level feature is processed by the final four-fold deconvolutional layer, a final segmentation mask with the same resolution as the input image is obtained.
[0029] According to a specific implementation manner of an embodiment of the present disclosure, step 7 specifically includes:
[0030] Step 7.1, design slender erosion kernels V1, V2, and the structures of the slender erosion kernels V1, V2 are:
[0031]
[0032] Step 7.2, based on the slender erosion kernels, perform erosion operations on connected regions with different areas in the preliminary particle segmentation map for different times, and split the adhered connected regions into multiple independent connected regions to obtain the eroded segmentation map.
[0033] The few-shot learning-based particle image segmentation solution in the embodiments of the present disclosure includes: Step 1, obtaining particle image data; Step 2, segmenting the particle image data based on the SAM model to obtain a particle image with pseudo-labels, and specifically optimizing the pseudo-labels; Step 3, dividing the particle image with pseudo-labels into a training set, a validation set, and a test set; Step 4, inputting the training set and the validation set into a fully convolutional network model that integrates multi-hop connections for training to obtain an optimal particle segmentation model; Step 5, inputting the test set into the optimal particle segmentation model to obtain a particle segmentation mask, and then removing noise from the particle segmentation mask based on the threshold method and the first-order edge detection method, and outputting the denoised particle segmentation mask; Step 6, extracting each independent connected component in the denoised particle segmentation mask based on the four-neighborhood detection method to obtain a preliminary particle segmentation map; Step 7, performing post-processing on the preliminary particle segmentation map based on an area-adaptive image erosion algorithm to obtain an eroded segmentation map; Step 8, calculating the number and area of each independent connected component in the eroded segmentation map, and calculating the particle size distribution based on the area value range.
[0034] The beneficial effects of the embodiments of the present disclosure are as follows: Through the solution of the present disclosure, the SAM model is used to perform instance segmentation on the original particle image data, and the result is degraded to a semantic segmentation result, which greatly reduces the manual annotation time when constructing an image deep learning dataset, and at the same time reduces the adverse effects brought by over-segmentation and adhesion; A fully convolutional network model that integrates multi-hop connections is constructed and trained to improve the segmentation accuracy and speed; For the characteristics of the adhesion area, based on area-adaptive image erosion, different degrees of erosion are performed on independent connected components with different areas, further reducing the adverse effects brought by adhesion and improving the processing efficiency and accuracy of image segmentation. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the following will briefly introduce the drawings required in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present disclosure. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0036] Figure 1 It is a schematic flowchart of a particle image segmentation method based on few-shot learning provided by the embodiments of the present disclosure;
[0037] Figure 2 It is a schematic structural diagram of a SAM model provided by the embodiments of the present disclosure;
[0038] Figure 3 It is a schematic structural diagram of the entire fully convolutional network model provided by the embodiments of the present disclosure;
[0039] Figure 4Schematic diagram of the network structure of FCN-4s provided by an embodiment of the present disclosure;
[0040] Figure 5 Schematic diagram of the visualization of the final statistical results of the post-processing of the area-adaptive image erosion algorithm provided by an embodiment of the present disclosure. Specific implementation manners
[0041] The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
[0042] The following uses specific specific examples to illustrate the implementation manners of the present disclosure. Those skilled in the art can easily understand other advantages and effects of the present disclosure from the content disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all the embodiments. The present disclosure can also be implemented or applied through other different specific implementation manners. Various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present disclosure. It should be noted that, without conflict, the following embodiments and the features in the embodiments can be combined with each other. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present disclosure without creative efforts belong to the scope of protection of the present disclosure.
[0043] It should be noted that the following describes various aspects of the embodiments within the scope of the appended claims. It should be obvious that the aspects described herein can be embodied in a wide variety of forms, and any specific structure and / or function described herein is illustrative only. Based on the present disclosure, those skilled in the art should understand that one aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. For example, any number of aspects described herein can be used to implement the device and / or practice the method. In addition, this device and / or this method can be implemented using other structures and / or functions in addition to one or more of the aspects described herein.
[0044] It should also be noted that the drawings provided in the following embodiments only illustrate the basic concept of the present disclosure schematically. Only the components related to the present disclosure are shown in the drawings, rather than being drawn according to the number, shape, and size of the components in actual implementation. The types, quantities, and proportions of the components in its actual implementation can be arbitrarily changed, and the component layout type may also be more complex.
[0045] In addition, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, those skilled in the art will understand that the described aspects can be practiced without these specific details.
[0046] An embodiment of the present disclosure provides a few-shot learning-based particle image segmentation method, which can be applied to the sintering monitoring process in a smelting scenario.
[0047] See Figure 1 , which is a schematic flowchart of a few-shot learning-based particle image segmentation method provided by an embodiment of the present disclosure. As Figure 1 shown, the method mainly includes the following steps:
[0048] Step 1, obtain particle image data;
[0049] In specific implementation, the camera is fixed at the same height, and camera parameters such as focal length are adjusted. At the same time, the particles pass horizontally under the camera through a conveyor belt or other transportation means, and the camera takes pictures at a certain time interval to ensure the stability of the quality of the obtained particle image data. This method is applicable to estimating the segmentation of particle images. In an embodiment of the present disclosure, sintered coke powder particle images can be collected as particle image data. Denote the input image as:
[0050] I c (x, y)
[0051] where, I c (x, y) is the obtained particle image data, I c (x, y) ∈ [0, 255], c ∈ {R, G, B}, {R, G, B} are the R, G, and B color channels of the input image, and (x, y) is the coordinate of the pixel of the input image.
[0052] Step 2, segment the particle image data based on the SAM model to obtain a particle image with pseudo-labels, and perform targeted optimization on the pseudo-labels;
[0053] Further, step 2 specifically includes:
[0054] Step 2.1, use the SAM model to generate a mask for the particle image data to obtain an instance segmentation mask;
[0055] Step 2.2, perform edge erosion on the independent connected regions in the instance segmentation mask to obtain an eroded instance segmentation mask;
[0056] Step 2.3, perform a binarization operation on the eroded instance segmentation mask to weaken the instance segmentation mask into a semantic segmentation mask;
[0057] Step 2.4, calculate the area of each independent connected region in the semantic segmentation mask, and based on the area threshold T, set each independent connected region with an area smaller than T as the background to obtain an optimized semantic segmentation mask.
[0058] In specific implementation, SAM is a zero-shot large model, and its structure is as Figure 2。The SAM is trained based on the currently largest segmentation dataset SA-1B, so that it can obtain excellent segmentation results without label guidance. However, the SAM large model does not have the ability of real-time segmentation. Therefore, this disclosure only uses SAM to construct a dataset for the lightweight network.
[0059] The construction of the dataset for the lightweight network using SAM includes:
[0060] Using SAM_VIT_L in SAM to generate masks for the entire image to obtain instance segmentation masks. Although instance segmentation is less affected by adhesion, the over-segmentation phenomenon in the instance segmentation results is serious. Therefore, this disclosure degrades the instance segmentation results into semantic segmentation results:
[0061] 1) Erode the edges of the independent connected regions in the instance segmentation mask to avoid adhesion between connected regions;
[0062] 2) Binarize the eroded mask to transform it into a single classification label, and denote the binarized mask as:
[0063] I1(x,y)
[0064] where I1(x,y) is the SAM binarized mask, I1(x,y) ∈ {0, 1}, 0 represents the background, 1 represents the foreground, and (x,y) is the coordinate of the input image pixel. The binary image will be more suitable for various image transformations. Therefore, the four-neighborhood connectivity detection can be used for the degraded segmentation mask to detect each independent connected region P in I1 1n and measure the area and denote it as A 1n .
[0065] 3) Set the area threshold T1 = 100, assign 0 to the independent connected regions with an area less than T1, and further improve the over-segmentation phenomenon to obtain the optimized semantic segmentation mask. The specific formula is as follows:
[0066]
[0067] The comparison of the above various segmentation situations is shown in Table 1.
[0068] Table 1
[0069]
[0070]
[0071] In Table 1, IOU is the intersection over union, Recall is the recall rate, F1 is the F1 score, Dice is the Dice coefficient, and RE is the relative error. Their calculation formulas are shown as follows:
[0072]
[0073]
[0074]
[0075]
[0076]
[0077] Among them, TP means that if a pixel is a positive class and is also predicted as a positive class, it is a true positive class TP; TN means that if a pixel is a negative class and is also predicted as a negative class, it is a true negative class TN; FP means that if a pixel is a negative class but is predicted as a positive class, it is a false positive class FP; FN means that if a pixel is a positive class but is predicted as a negative class, it is a false negative class FN; Q true is the true number of particles, Q pred is the predicted number of particles.
[0078] Meanwhile, it can be proved that F1 and Dice are equal when there are no errors, and this can be used to verify the reliability of the results.
[0079] From the results in Table 1, it can be seen that directly using SAM for instance segmentation of toner particles gives poor results. Degrading it to semantic segmentation can obtain better segmentation quality. However, its over-segmentation problem still exists, so removing its small connected components will result in a more accurate number of particles.
[0080] Step 3, divide the particle images with pseudo-labels into a training set, a validation set, and a test set;
[0081] Specifically, during implementation, data augmentation can be performed on the dataset by means of translation, rotation, and brightness variation, and the augmented dataset is divided into a training set, a validation set, and a test set in a ratio of 8:1:1.
[0082] Step 4, input the training set and the validation set into a fully convolutional network model with multi-hop connections for training to obtain an optimal particle segmentation model;
[0083] Based on the above embodiments, before the step 4, the method further includes:
[0084] Adopt a pre-trained VGG16 deep network as the backbone network of the fully convolutional network model, and the VGG16 deep network includes 7 convolutional layers and 5 pooling layers;
[0085] Use 4 deconvolutional layers as the upsampling part of the fully convolutional network model.
[0086] Furthermore, the process of the multi-hop connection includes:
[0087] After processing the output of the seventh convolutional layer through the first transposed convolutional layer, it is fused with the output of the fourth pooling layer to obtain the first-level features.
[0088] After processing the first-level features through the second transposed convolutional layer, it is fused with the output of the third pooling layer to obtain the second-level features.
[0089] After processing the second-level features through the third transposed convolutional layer, it is fused with the output of the second pooling layer to obtain the third-level features.
[0090] After processing the third-level features through the final four-fold transposed convolutional layer, the final segmentation mask with the same resolution as the input image is obtained.
[0091] In specific implementation, a pre-trained VGG16 deep network can be used to extract image features and perform transfer learning for the particle segmentation problem:
[0092] 1) As shown in the model structure, when training the particle image segmentation using the FCN model, the particle image is used as the input, the binary cross-entropy loss (BCELoss) is used as the loss function, and the root mean square propagation gradient descent method (RMSprop) is used as the optimizer to train the particle image segmentation model, and the output is the semantic segmentation mask. Figure 3
[0093] Figure 3 2) As shown in the figure, when the network downsamples to extract image features, a pre-trained VGG16 deep network is used as the backbone network for downsampling the particle image. The VGG16 contains 7 convolutional layers and 5 pooling layers. The convolutional kernels of convolutional layers 1-5 are all 3×3, the strides are all 1, and the paddings are all 1. The convolutional kernels of convolutional layers 6-7 are all 1×1, the strides are all 1, and the paddings are all 1. The pooling kernels of pooling layers 1-5 are all 2×2, the strides are all 2, and the ReLU activation function is used as the activation function;
[0094] Figure 3 3) As shown in the figure, when the network upsamples to increase the image resolution, it includes 4 transposed convolutional layers. The convolutional kernels of the 4 transposed convolutional layers are all 3×3, the strides are all 2, the paddings are all 1, and the output paddings are all 1:
[0095]
[0095]
[0095] The above transposed convolution process is divided into multiple transposed convolutional layers, so that the resolution change in its upsampling process is the same as the resolution change in its corresponding downsampling, creating necessary conditions for skip connections. Skip connections refer to combining the images in the downsampling stage with the images in the upsampling stage. For different combination methods, the overall combined transposed convolution multiple required is different, and different FCN structures are named according to the transposed convolution multiple.
[0096] Based on the original model, the present disclosure further proposes FCN-4s and FCN-2s models and conducts comparative experiments. The results are shown in Table 2.
[0097] Table 2
[0098]
[0099] Among them, Epoch represents the number of training rounds, and Test loss represents the loss of the test set. It can be concluded from this that the FCN-4s further proposed by the present disclosure can obtain a better test set loss with fewer training rounds. Therefore, the present disclosure adopts FCN-4s as the network structure of FCN, as Figure 4 shown.
[0100] Step 5: Input the test set into the optimal particle segmentation model to obtain a particle segmentation mask, and then remove noise from the particle segmentation mask based on the threshold method and the first-order edge detection method, and output the denoised particle segmentation mask;
[0101] In specific implementation, the threshold method can be used to remove foreground noise in the background, that is, by setting an area threshold T2 = 50, and independent connected regions with an area smaller than T2 are regarded as noise and assigned a value of 0; the first-order edge detection is used to remove background noise in the foreground, that is, by finding the outermost contour, the background in the foreground is removed.
[0102] Step 6: Extract each independent connected region in the denoised particle segmentation mask based on the four-neighborhood detection method to obtain a preliminary particle segmentation map;
[0103] In specific implementation, the preliminary particle segmentation map obtained by using the four-neighborhood connectivity detection can also be a binary map, denoted as I2(x, y). In the above detection, each independent connected region is denoted as P 2n , the total number of which is denoted as N2, and the measured area is denoted as A 2n .
[0104] Step 7: Post-process the preliminary particle segmentation map based on the area-adaptive image erosion algorithm to obtain an eroded segmentation map;
[0105] On the basis of the above embodiments, step 7 specifically includes:
[0106] Step 7.1: Design slender erosion kernels V1 and V2. The structures of the slender erosion kernels V1 and V2 are:
[0107]
[0108] Step 7.2, based on the slender corrosion kernel, perform corrosion operations on the connected regions with different areas in the preliminary particle segmentation map for different numbers of times to split the adhered connected regions into multiple independent connected regions, obtaining a segmented map after corrosion.
[0109] In specific implementation, considering that the adhered particles of sintered coke powder have irregular shapes and it is impossible to screen out the regions generated by adhesion through conventional means. Therefore, the present disclosure is based on an area-adaptive image corrosion algorithm to solve part of the adhesion problem:
[0110] 1) Set the area threshold T3 = 300. Since most of the adhesion regions are slender in shape, slender corrosion kernel structures V1, V2 are proposed as follows:
[0111]
[0112] For each independent connected region with different areas, the area of its adhesion region is also different. The two are positively correlated, that is, the larger the particle, the larger the proportion of its adhered part in the total area. If the same corrosion operation is applied to all connected regions, the adhesion phenomenon in a specific area range will be better solved, but for larger connected regions, most of the adhesion still exists, and for smaller connected regions, they may even be corroded and disappear. Therefore, the present disclosure takes the area of each independent connected region as a condition, proposes different corrosion strategies, and obtains a segmented map of coke powder particles after corrosion, denoted as I3(x, y).
[0113] Define the above corrosion as This formula represents the corrosion of G with the corrosion kernel H. Then the above corrosion strategy formula is as follows:
[0114]
[0115]
[0116] 2) Detect each independent connected region P in I3 3n , and count its quantity denoted as N3, and measure the area denoted as A 3n .
[0117] Step 8, calculate the quantity and area of each independent connected region in the segmented map after corrosion, and calculate the particle size distribution based on the area value range.
[0118] In specific implementation, considering that the corrosion operation will cause loss of the connected region area, which is not conducive to subsequent measurements such as particle size distribution. To solve the above problems, corresponding numbers of dilation operations are performed after corrosion:
[0119] 1) Define the above dilation as This formula represents the dilation of G with the corrosion kernel H. However, since after dilation, the originally segmented connected regions may adhere again, each independent connected region P in the above I33n Perform separate swelling to obtain P 4n And measure the area A 4n , finally, combine the above-mentioned particle number N3, summarize it, and obtain the final particle segmentation map I4(x,y), and the formula is as follows:
[0120]
[0121]
[0122] Compare the final particle segmentation map I4 with the preliminary particle segmentation map I2, as shown in Table 3.
[0123] Table 3
[0124]
[0125] Performing post-processing based on the area-adaptive image erosion algorithm can suppress over-segmentation and adhesion problems, and further make the segmentation index more stable and better than the segmentation index without post-processing.
[0126] 2) According to the above-mentioned A 4n , N3, the particle size distribution can be visualized, as Figure 5 shown.
[0127] Next, the prediction accuracy of a few-shot learning-based particle image segmentation method of the present disclosure will be exemplarily described in combination with specific experimental data.
[0128] The segmentation results of the FCN-4s and SAM with the above-mentioned post-processing are compared in Table 4.
[0129] Table 4
[0130]
[0131] It can be obtained therefrom that in terms of the index of segmentation accuracy, the segmentation quality of SAM is extremely high, but the over-segmentation phenomenon of the FCN-4s with the above-mentioned post-processing is relatively light. At the same time, on the premise of meeting a certain accuracy, the speed of the FCN-4s with the above-mentioned post-processing is significantly better than that of SAM and can meet the real-time requirement.
[0132] The few-shot learning particle image segmentation method provided in this embodiment performs instance segmentation on the original particle image data by using the SAM model and degrades the result into a semantic segmentation result, greatly reducing the manual annotation time when constructing an image deep learning dataset and simultaneously reducing the adverse effects brought about by over-segmentation and adhesion; constructs and trains a fully convolutional network model integrating multi-hop connections, improving the segmentation accuracy and speed while reducing the training duration; for the characteristics of the adhesion area, based on area-adaptive image erosion, different degrees of erosion are performed on independent connected domains of different areas, further reducing the adverse effects brought about by adhesion and improving the processing efficiency and accuracy of image segmentation.
[0133] The units involved in the embodiments described in this disclosure can be implemented in software or in hardware.
[0134] It should be understood that the various parts of this disclosure can be implemented using hardware, software, firmware, or a combination thereof.
[0135] As mentioned above, the above are only specific embodiments of this disclosure, but the protection scope of this disclosure is not limited thereto. Any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed in this disclosure should be covered by the protection scope of this disclosure. Therefore, the protection scope of this disclosure should be subject to the protection scope of the claims.
Claims
1. A few-shot learning-based particle image segmentation method, characterized in that Including: Step 1: Obtain particle image data; Step 2: Segment the particle image data based on the SAM model to obtain a particle image with pseudo-labels, and perform targeted optimization on the pseudo-labels; Step 3: Divide the particle image with pseudo-labels into a training set, a validation set, and a test set; Step 4: Input the training set and the validation set into a fully convolutional network model that fuses multi-hop connections for training to obtain an optimal particle segmentation model; Before the said Step 4, the method further includes: Using a pre-trained VGG16 deep network as the backbone network of the fully convolutional network model, and the VGG16 deep network includes 7 convolutional layers and 5 pooling layers; Taking 4 deconvolutional layers as the upsampling part of the fully convolutional network model; The process of the said multi-hop connection includes: After the output of the seventh convolutional layer is processed by the first deconvolutional layer, it is fused with the output of the fourth pooling layer to obtain first-level features; After the first-level features are processed by the second deconvolutional layer, they are fused with the output of the third pooling layer to obtain second-level features; After the second-level features are processed by the third deconvolutional layer, they are fused with the output of the second pooling layer to obtain third-level features; After the said third-level features are processed by the final four-fold deconvolutional layer, a final segmentation mask with the same resolution as the input image is obtained; Step 5: Input the said test set into the optimal particle segmentation model to obtain a particle segmentation mask, and then remove noise from the particle segmentation mask based on the threshold method and the first-order edge detection method, and output the denoised particle segmentation mask; Step 6: Extract each independent connected region in the denoised particle segmentation mask based on the four-neighborhood detection method to obtain a preliminary particle segmentation map; Step 7: Perform post-processing on the preliminary particle segmentation map based on an area-adaptive image erosion algorithm to obtain an eroded segmentation map; Step 8: Calculate the number and area of each independent connected region in the eroded segmentation map, and calculate the particle size distribution based on the area value range.
2. The method according to claim 1, wherein , The said Step 2 specifically includes: Step 2.1: Use the SAM model to generate a mask for the particle image data to obtain an instance segmentation mask; Step 2.2: Perform edge erosion on the independent connected regions in the instance segmentation mask to obtain an eroded instance segmentation mask; Step 2.3: Perform a binarization operation on the eroded instance segmentation mask to weaken the instance segmentation mask into a semantic segmentation mask; Step 2.4: Calculate the area of each independent connected region in the semantic segmentation mask, and based on the area threshold T, set each independent connected region with an area less than T as the background to obtain an optimized semantic segmentation mask.
3. The method according to claim 1, wherein , The said Step 7 specifically includes: Step 7.1, design a slender corrosion core , , the slender corrosion core , has the following structure: , ; Step 7.2: Based on the said slender erosion kernel, perform erosion operations on the connected regions with different areas in the preliminary particle segmentation map for different times to split the adhered connected regions into multiple independent connected regions to obtain an eroded segmentation map.
Citation Information
Patent Citations
Method and system for on-line detection of particle size of green pellets
CN114494305A
Mask R-CNN mineral particle identification and particle size detection method based on improved mask
CN114897816A