Soot particle segmentation and particle size measurement method, system and equipment and storage medium
By using the YOLOv5 deep learning model network and the equivalent circle diameter method, the accuracy problem of carbon soot particle agglomeration segmentation and particle size measurement was solved, achieving efficient segmentation and particle size measurement of carbon soot particles.
Patent Information
- Application Number
- CN202511124492.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-12
- Publication Date
- 2025-11-18
AI Technical Summary
Existing technologies cannot accurately identify the basic particles in carbon soot particles, resulting in large particle size measurement errors and failing to provide accurate parameter information.
The YOLOv5 deep learning model network was used, combined with the Focus module and CSP module for carbon soot particle segmentation, and the particle size was measured using the equivalent circle diameter method. The measurement results were calibrated using a scale calibration system.
It enables effective segmentation of carbon soot particle agglomerates and accurate quantification of basic particles, improving the accuracy and efficiency of particle size measurement and reducing errors from manual identification.
Smart Images

Figure CN120976173A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of particulate matter measurement technology, and in particular to a method, system, device, and storage medium for carbon soot particle segmentation and particle size measurement. Background Technology
[0002] Segmentation and identification of soot particles in soot particle measurement technology can more easily quantify the fractal dimension of soot particles, which is crucial for understanding the particle size, average area of basic particles, and aggregate structure. As a major byproduct of combustion, soot particles, with their particle size, aggregate structure, and distribution characteristics, have significant impacts on environmental pollution, human health, climate change, and industrial applications. In the atmospheric environment, soot is a major contributor to PM2.5; its ultrafine particles can penetrate deep into the human respiratory system, and particle size and aggregation state determine its deposition pattern and the resulting health risks. At the climate level, soot exacerbates global warming by absorbing solar radiation, and its optical properties are closely related to particle size and aggregation degree. In engineering, the optimization of combustion efficiency and the design of exhaust aftertreatment systems rely on accurate measurement of soot particle size and aggregation state. Furthermore, as an industrial raw material for materials such as rubber and batteries, the particle morphology of soot directly affects product performance. Therefore, the development of carbon particulate identification and characterization technology not only provides a scientific basis for environmental management, regulation and health assessment, but also has great significance for combustion optimization, nanomaterial research and development and climate model improvement.
[0003] Currently, the main techniques for measuring carbon soot particles include electron microscopy (SEM / TEM), dynamic light scattering (DLS), laser-induced incandescence (LII), and scanning electromigration particle size spectrometry (SMPS). Electron microscopy can provide high-resolution particle morphology and size information, but it cannot accurately identify individual particles with the naked eye when samples contain agglomerates. Dynamic light scattering is suitable for particle size analysis of liquid-phase suspended particles, but it has a large measurement error for high-concentration or heavily agglomerated carbon soot systems. Laser-induced incandescence can achieve in-situ detection of carbon soot in combustion environments, but it is sensitive to the chemical composition of particles and is difficult to calibrate. Scanning electromigration particle size spectrometry is widely used in aerosol particle size distribution measurement, but its resolution capability for nanoscale carbon soot agglomerates is limited. Therefore, using a single method to detect and analyze carbon soot particles cannot provide accurate parameter information.
[0004] Currently, transmission electron microscopy (TEM) combined with Nano Measurer software is a commonly used method for measuring the particle size of soot particles. Although this method can achieve basic characterization of soot particles, it still has key shortcomings that need to be addressed. During the measurement process, this method relies on visual identification of basic particles within aggregates and manual measurement, resulting in low accuracy in particle identification. Misjudgments may occur when identifying particles in aggregated regions, affecting the particle size measurement data. Furthermore, it cannot provide markings for visually identified soot particles. Summary of the Invention
[0005] The purpose of this invention is to provide a method, system, device, and storage medium for carbon soot particle segmentation and particle size measurement, aiming to solve or improve at least one of the above-mentioned technical problems.
[0006] To achieve the above objectives, the present invention provides the following solution:
[0007] A method for carbon soot particle segmentation and particle size measurement includes:
[0008] Acquire an image of the carbon soot to be tested;
[0009] A particle segmentation model is constructed; the particle segmentation model adopts the YOLOv5 deep learning model network; the YOLOv5 deep learning model network uses the Focus module and CSP module as the backbone network, and embeds SE attention in the CSP module for channel weighting processing;
[0010] The image of the carbon soot to be tested is input into the particle segmentation model for identification, and the images of the basic particles and their corresponding annotations are obtained.
[0011] Based on the image and corresponding annotation of the basic particles, the basic particles are measured using the equivalent circle diameter method, and the measurement results are calibrated using a scale calibration system to obtain the particle size.
[0012] Optionally, the step of inputting the image of the carbon soot to be tested into the particle segmentation model for identification to obtain images of basic particles and their corresponding annotations includes:
[0013] The image of the carbon soot to be tested is input into the particle segmentation model. First, convolution operation is performed in the Focus module. The input image is scanned by sliding the convolution kernel to identify the irregular boundaries and fractal structure features of the carbon soot agglomerates. Then, the CSP module is used to perform attention weighting processing on each feature channel to focus on the carbon soot region, suppress background noise, and obtain the image of the basic particles and their corresponding annotations.
[0014] Optionally, the calculation formula for the convolution operation is:
[0015]
[0016] Where I is the input, K is the convolution kernel, k is the kernel radius, (x, y) are the coordinates of the output feature map calculation position, and K(i, j) represents the weight of offset (i, j) in the kernel.
[0017] Optionally, the calculation formula for attention weighting in the CSP module is as follows:
[0018]
[0019] Among them, z c Let H represent the global average pooling structure of the c-th channel, H represent the feature map height, W represent the weight matrix of the fully connected layer, and x represent the weight matrix of the fully connected layer. c (i, j) represents the pixel value of the c-th channel at position (i, j). Let represent the c-th channel feature after recalibration, and σ represent the Sigmoid activation function.
[0020] Optionally, the particle segmentation model is trained using a total network loss function and gradient decay during its construction; wherein the total network loss function includes a bounding box loss function, a target confidence loss function, and a classification loss function.
[0021] Optionally, the total network loss function is expressed as:
[0022] L total =λ box L box +λ obj L obj +λ cls L cls
[0023] Where λ represents the weighting coefficient, λ box For the bounding box loss weights, λ box =0.1, λ obj λ is the weight for the confidence loss. cls For classification loss weights, L box L represents the bounding box loss function. obj L represents the target confidence loss function. cls Represents the classification loss function;
[0024] The bounding box loss function is expressed as:
[0025]
[0026] Where IoU represents the intersection-union ratio, ρ represents the Euclidean distance between the center of the predicted box and the center of the ground truth box, c represents the diagonal length of the minimum bounding rectangle, α and v represent aspect ratio penalty terms, and b predb represents the Euclidean distance between the center of the predicted bounding box and the center of the ground truth bounding box. gt The center coordinates of the ground truth bounding box are represented as follows: IoU, α, and v are expressed as follows:
[0027]
[0028] Where A represents the predicted bounding box pixel region, B represents the ground truth bounding box pixel region, and ω gt h represents the actual bounding box width. gt ω represents the actual bounding box height. pred hpred represents the width of the predicted bounding box, and hpred represents the height of the predicted bounding box;
[0029] The target confidence loss function uses binary cross-entropy to determine whether a target exists within the grid, and is expressed as:
[0030]
[0031] Among them, S 2 Indicates the number of grid cells, y i This represents the true label, where 1 = target, 0 = no target. Indicates the confidence level of the prediction;
[0032] The classification loss function uses binary cross-entropy, supports multi-label classification, and is expressed as follows:
[0033]
[0034] Where C represents the number of categories, p i,j y represents the predicted class probability. i,j This indicates the actual label.
[0035] Optionally, the calculation formula for the equivalent circle diameter method is as follows:
[0036]
[0037] Where A represents the projected area of the soot particles in the TEM image, and D... ECD Indicates the equivalent diameter.
[0038] The present invention also provides a carbon soot particle segmentation and particle size measurement system, which applies the method described above, including:
[0039] The image acquisition unit is used to acquire images of the carbon soot to be tested;
[0040] The model building unit is used to build a particle segmentation model; the particle segmentation model adopts the YOLOv5 deep learning model network; the YOLOv5 deep learning model network uses the Focus module and CSP module as the backbone network, and embeds SE attention in the CSP module for channel weighting processing;
[0041] The segmentation and recognition unit is used to input the carbon soot image to be tested into the particle segmentation model for recognition, and obtain the images of basic particles and their corresponding annotations.
[0042] The particle size measurement unit is used to measure the basic particles based on the image and corresponding annotation of the basic particles using the equivalent circle diameter method, and to calibrate the measurement results through a scale calibration system to obtain the particle size.
[0043] The present invention also provides an electronic device, including a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to perform the carbon soot particle segmentation and particle size measurement method described above.
[0044] The present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the carbon soot particle segmentation and particle size measurement method as described above.
[0045] According to specific embodiments provided by the present invention, the present invention discloses the following technical effects:
[0046] This invention discloses a method, system, device, and storage medium for carbon soot particle segmentation and particle size measurement. The method includes constructing a particle segmentation model, inputting an image of carbon soot to be measured into the particle segmentation model for identification, obtaining images of basic particles and their corresponding labels, measuring the basic particles using the equivalent circle diameter method, and calibrating the measurement results using a scale calibration system to obtain the particle size. The particle segmentation model employs a YOLOv5 deep learning model network; the YOLOv5 deep learning model network uses a Focus module and a CSP module as its backbone network, and embeds SE attention in the CSP module for channel weighting processing. This invention can not only segment carbon soot particle aggregates but also effectively extract the contours of carbon soot particles, label the identified basic particles, and finally measure the particle size of the basic particles. Attached Figure Description
[0047] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0048] Figure 1 This is a flowchart of the carbon soot particle segmentation and particle size measurement method based on the YOLOv5 model in this embodiment;
[0049] Figure 2 Image of carbon soot particles in Example 1;
[0050] Figure 3 This is an image of the segmented carbon soot particles from Example 1.
[0051] Figure 4 This is a schematic diagram showing the particle size of the carbon soot particles identified and marked in Example 1 of this embodiment;
[0052] Figure 5 Image of carbon soot particles in Example 2;
[0053] Figure 6 This is an image of the segmented carbon soot particles in Example 2 of this embodiment;
[0054] Figure 7 This is a schematic diagram of the particle size of the carbon soot particles identified and marked in Example 2. Detailed Implementation
[0055] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0056] The purpose of this invention is to provide a method, system, device, and storage medium for carbon soot particle segmentation and particle size measurement, aiming to solve or improve at least one of the above-mentioned technical problems.
[0057] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0058] This invention provides a method for carbon soot particle segmentation and particle size measurement, comprising:
[0059] Acquire an image of the carbon soot to be tested;
[0060] A particle segmentation model is constructed; the particle segmentation model adopts the YOLOv5 deep learning model network; the YOLOv5 deep learning model network uses the Focus module and CSP module as the backbone network, and embeds SE attention in the CSP module for channel weighting processing;
[0061] The image of the carbon soot to be tested is input into the particle segmentation model for identification, and the images of the basic particles and their corresponding annotations are obtained.
[0062] Based on the image and corresponding annotation of the basic particles, the basic particles are measured using the equivalent circle diameter method, and the measurement results are calibrated using a scale calibration system to obtain the particle size.
[0063] As a specific implementation method, the specific calculation process of each of the above steps is provided:
[0064] First, a transmission electron microscope (TEM) image of the target soot particles at a certain magnification is captured to obtain relatively clear images of the particles with a certain degree of dispersion, and then the images are preprocessed.
[0065] Then, the images were labeled using the labelimg software to manually label the soot particles in the images. The generated JSON files were processed into label files corresponding to the "LVIS" dataset format, and used to perform transfer learning on the images using a YOLOv5 deep learning model with Focus+CSP as the backbone network, combined with the "LVIS" pre-trained weights. By using a prediction script to call the trained weights and inputting the target particle image to be detected, the basic particle images after the soot agglomeration segmentation can be clearly obtained, realizing the effective segmentation and identification of target soot particles.
[0066] Finally, in PyCharm software, the particle size of the identified elementary particles is measured using the equivalent circle diameter method.
[0067] As a more specific implementation process, the steps are as follows:
[0068] Step 1: Use a transmission electron microscope (TEM) to photograph the carbon soot particles to obtain images at a certain magnification, and then preprocess the images.
[0069] Step 2: Use the tools in the image annotation software labelimg to annotate the TEM image of carbon soot particles; then convert the generated JSON file to the file format corresponding to the "LVIS" dataset.
[0070] Step 3: Setting up the YOLOv5 deep learning model network structure, using Focus+CSP as the backbone network. Focus is an innovative downsampling design that converts spatial information into channel information through slicing and channel recombination, achieving more efficient downsampling while retaining key spatial information and reducing computational costs. CSP is an efficient feature extraction structure that balances computational efficiency and model accuracy through feature map splitting and partial computation, offering advantages in gradient diversity and parameter optimization. This helps improve the segmentation of complex soot agglomerates and better identify the edges of basic particles. In this embodiment, the YOLOv5 (Focus+CSP) network architecture is trained using the grayscale, texture, and correlation features of soot particle images, and this method is used to identify basic particles.
[0071] Step 4: YOLOv5 deep learning model parameter settings.
[0072] Step 5: Convolution operation. The convolution kernel slides and scans the input image to capture local patterns, which can identify the irregular boundaries and fractal structure features of soot agglomerates. The 2D convolution is shown in the following formula:
[0073]
[0074] Where I is the input, K is the convolution kernel, k is the kernel radius, (x, y) are the coordinates of the output feature map calculation position, and K(i, j) represents the weight of offset (i, j) in the kernel.
[0075] Step 6: Embed Squeeze-Excitation (SE) attention in the CSP module to increase the weight of important channels, thereby enhancing attention, helping to focus on the soot region, and suppressing background noise. SE is defined by the following formula:
[0076] As shown:
[0077]
[0078] Among them, z c Let H represent the global average pooling structure of the c-th channel, H represent the feature map height, W represent the weight matrix of the fully connected layer, and x represent the weight matrix of the fully connected layer. c (i, j) represents the pixel value of the c-th channel at position (i, j). Let represent the c-th channel feature after recalibration, and σ represent the Sigmoid activation function.
[0079] Step 7: Calculate the network loss function. The total loss function of YOLOv5 is derived from the bounding box loss function L. box Target confidence loss function L obj and classification loss function Lcls It consists of three parts; the total loss function is given by the following formula.
[0080] As shown:
[0081] L total =λ box L box +λ obj L obj +λ cls L cls
[0082] Where λ represents the weighting coefficient, λ box For the bounding box loss weights, λ obj λ is the weight for the confidence loss. cls For classification loss weights, L box L represents the bounding box loss function. obj L represents the target confidence loss function. cls This represents the classification loss function; generally, λ box The default value is 0.05, but because there are many small targets in soot agglomerates, therefore λ box Increase it to 0.1 to enhance positioning accuracy.
[0083] Step 8: Use PyCharm software to perform deep learning training on the carbon soot image training set, while setting the pre-training weights for the "LVIS" dataset and generating the corresponding training weights for the carbon soot particle dataset; then use the prediction script to call the training weights and target particle images. Run the script to segment images of basic particles in carbon soot particle aggregates and accurately identify and label the basic particles.
[0084] Based on the above technical solution, the following embodiments are provided.
[0085] Example 1
[0086] like Figure 1 As shown, a program was written using PyCharm Community Edition 2020.1.3 x64 software, with Python 3.6 as the environment, a Core i7 processor, and 16GB of memory, to process images of carbon soot particles (such as...). Figure 2 (As shown) Marking and identification and particle size measurement are performed, and the specific steps are as follows:
[0087] Step 1: Use a transmission electron microscope (TEM) to photograph the carbon soot particles to obtain images at a certain magnification, and use Python code to write a Gamma correction method to preprocess the images.
[0088] Step 2: Use the tools in the image annotation software labelimg to label the TEM images of carbon soot particles; then convert the generated JSON file to the file format corresponding to the "LVIS" dataset, where 70% of the images are randomly allocated as the training set, 20% as the validation set, and 10% as the test set.
[0089] Step 3: Setting up the YOLOv5 deep learning model network structure, using Focus+CSP as the backbone network. The aim is to use Focus's parameterless slicing to replace traditional downsampling, reducing computational costs and achieving efficient sampling while retaining more spatial information. This extracts rich image features while preserving high-frequency information of nanoscale aggregates during slicing. Utilizing feature maps at multiple scales in CSP, through feature map splitting and partial computation, a balance between computational efficiency and model accuracy is achieved, offering advantages in gradient diversity and parameter optimization. This helps improve the segmentation of complex carbon atom aggregates and better identify the edges of basic particles.
[0090] Step 4: YOLOv5 deep learning model parameter settings. Due to the large size of individual images and the large number of targets contained, bath_size is set to 1, learning momentum is 0.937, and weight decay is 0.0001. A learning rate of 0.004 is set for 50 epochs. To prevent overfitting during training, weights are decayed at the 25th and 40th epochs, with a decay factor of 0.1. Considering that a single mineral light image may contain a large number of detection targets, the box_detections_per_img parameter is adjusted to 300 to ensure the model detects more targets.
[0091] Step 5: 2D convolution operation. The convolution kernel slides and scans the input image to capture local patterns, which can identify the irregular boundaries and fractal structure features of carbon soot agglomerates.
[0092] Step 6: Embed Squeeze-Excitation (SE) attention in the CSP module to increase the weight of important channels, thereby enhancing attention, helping to focus on the soot area and suppressing background noise.
[0093] Step 7: Calculate the network loss function. The total loss function of YOLOv5 is derived from the bounding box loss function L. box Target confidence loss function L obj and classification loss function L cls It consists of three parts; the total loss function is shown in the following formula:
[0094] L total =λ box L box +λobj L obj +λ cls L cls
[0095] Where λ represents the weighting coefficient, λ box For the bounding box loss weights, λ obj λ is the weight for the confidence loss. cls For classification loss weights, L box L represents the bounding box loss function. obj L represents the target confidence loss function. cls This represents the classification loss function; generally, λ box The default value is 0.05, but because there are many small targets in soot agglomerates, therefore λ box Increased to 0.1 to enhance positioning accuracy; λ obj Set to 1, λ cls Set it to 0.5.
[0096] Each component is represented as follows:
[0097] Bounding box loss function L box It is necessary to comprehensively consider the overlapping area, the distance between the center points, and the aspect ratio, as shown in the following formula:
[0098]
[0099] Where IoU represents the intersection-union ratio, ρ represents the Euclidean distance between the center of the predicted box and the center of the ground truth box, c represents the diagonal length of the minimum bounding rectangle, α and v represent aspect ratio penalty terms, and b pred b represents the Euclidean distance between the center of the predicted bounding box and the center of the ground truth bounding box. gt The center coordinates of the ground truth bounding box, IoU, α, and v are represented as follows:
[0100]
[0101] Where A represents the predicted bounding box pixel region, B represents the ground truth bounding box pixel region, and ω gt h represents the actual bounding box width. gt ω represents the actual bounding box height. pred h represents the width of the prediction box. pred This indicates the height of the prediction box.
[0102] The target confidence loss function uses binary cross-entropy to determine whether a target exists within the grid, and is expressed as:
[0103]
[0104] Among them, S 2 Indicates the number of grid cells, y iThis represents the true label, where 1 = target, 0 = no target. Indicates the confidence level of the prediction;
[0105] The classification loss function also uses binary cross-entropy, supports multi-label classification, and is expressed as:
[0106]
[0107] Where C represents the number of categories (e.g., soot, background, etc.), p i,j This represents the predicted class probability (Sigmoid output, processed independently for each class), y i,j This indicates the actual label.
[0108] Step 8: Use PyCharm software to perform deep learning training on the carbon soot image training set, while setting pre-training weights for the "LVIS" dataset and generating training weights corresponding to the carbon soot particle dataset; then use the prediction script to call the training weights and target particle images. Running the script can segment and label the basic carbon soot particles (such as...) within 1 second. Figure 3 (As shown). When using YOLOv5 deep learning, a gradually decaying learning rate is used to prevent overfitting, and the "LVIS" pre-training dataset is called for joint training. Then, the training weights generated by the training are called through a script to segment and label the target carbon soot agglomerates.
[0109] Step 9: Continue using the equivalent circle diameter method in PyCharm software to measure the identified elementary particles (such as...). Figure 4 (As shown), and scale calibration is performed using the scale calibration coefficient pixel_to_nm to finally obtain the particle size of the identified soot particles, specifically as shown in the following formula:
[0110]
[0111] Where A represents the projected area of the soot particles in the TEM image, and D... ECD Indicates the equivalent diameter.
[0112] Example 2
[0113] like Figure 1 As shown, a program was written using PyCharm Community Edition 2020.1.3 x64 software, with Python 3.6 as the environment, a Core i7 processor, and 16GB of memory, to process images of carbon soot particles (such as...). Figure 5 (As shown) Marking and identification and particle size measurement are performed, and the specific steps are as follows:
[0114] Step 1: Use a transmission electron microscope (TEM) to photograph the carbon soot particles to obtain images at a certain magnification, and use Python code to write a Gamma correction method to preprocess the images.
[0115] Step 2: Use the tools in the image annotation software labelimg to label the TEM images of carbon soot particles; then convert the generated JSON file to the file format corresponding to the "LVIS" dataset, where 70% of the images are randomly allocated as the training set, 20% as the validation set, and 10% as the test set.
[0116] Step 3: Setting up the YOLOv5 deep learning model network structure, using Focus+CSP as the backbone network. The purpose is to: utilize Focus's parameterless slicing to replace traditional downsampling, reducing computational costs and achieving efficient sampling while retaining more spatial information. This extracts rich image features while preserving high-frequency information of nanoscale aggregates during slicing; and utilizes CSP, which includes feature maps at multiple scales, to achieve a balance between computational efficiency and model accuracy through feature map splitting and partial computation, offering advantages in gradient diversity and parameter optimization. This helps improve the segmentation of complex carbon atom aggregates and better identify the edges of basic particles.
[0117] Step 4: YOLOv5 deep learning model parameter settings. Due to the large size of individual images and the large number of targets contained, bath_size is set to 1, learning momentum is 0.937, and weight decay is 0.0001. A learning rate of 0.004 is set for 50 epochs. To prevent overfitting during training, weights are decayed at the 25th and 40th epochs, with a decay factor of 0.1. Considering that a single mineral light image may contain a large number of detection targets, the box_detections_per_img parameter is adjusted to 300 to ensure the model detects more targets.
[0118] Step 5: 2D convolution operation. The convolution kernel slides and scans the input image to capture local patterns, which can identify the irregular boundaries and fractal structure features of carbon soot agglomerates.
[0119] Step 6: Embed Squeeze-Excitation (SE) attention in the CSP module to increase the weight of important channels, thereby enhancing attention, helping to focus on the soot area and suppressing background noise.
[0120] Step 7: Calculate the network loss function. The total loss function of YOLOv5 is derived from the bounding box loss function L. box Target confidence loss function L obj and classification loss function Lcls It consists of three parts; the total loss function is given by the following formula.
[0121] As shown:
[0122] L total =λ box L box +λ obj L obj +λ cls L cls
[0123] Where λ represents the weighting coefficient, λ box For the bounding box loss weights, λ obj λ is the weight for the confidence loss. cls For classification loss weights, L box L represents the bounding box loss function. obj L represents the target confidence loss function. cls This represents the classification loss function; generally, λ box The default value is 0.05, but because there are many small targets in soot agglomerates, therefore λ box Increased to 0.1 to enhance positioning accuracy; λ obj Set to 1, λ cls Set it to 0.5.
[0124] Each component is represented as follows:
[0125] Bounding box loss function L box It is necessary to comprehensively consider the overlapping area, the distance between the center points, and the aspect ratio, as shown in the following formula:
[0126]
[0127] Where IoU represents the intersection-union ratio, ρ represents the Euclidean distance between the center of the predicted box and the center of the ground truth box, c represents the diagonal length of the minimum bounding rectangle, α and v represent aspect ratio penalty terms, and b pred b represents the Euclidean distance between the center of the predicted bounding box and the center of the ground truth bounding box. gt The center coordinates of the ground truth bounding box, IoU, α, and v are represented as follows:
[0128]
[0129] Where A represents the predicted bounding box pixel region, B represents the ground truth bounding box pixel region, and ω gt h represents the actual bounding box width. gt ω represents the actual bounding box height. pred h represents the width of the prediction box. pred This indicates the height of the prediction box.
[0130] The target confidence loss function uses binary cross-entropy to determine whether a target exists within the grid, and is expressed as:
[0131]
[0132] Among them, S 2 Indicates the number of grid cells, y i This represents the true label, where 1 = target, 0 = no target. Indicates the confidence level of the prediction;
[0133] The classification loss function also uses binary cross-entropy, supports multi-label classification, and is expressed as:
[0134]
[0135] Where C represents the number of categories (e.g., soot, background, etc.), p i,j This represents the predicted class probability (Sigmoid output, processed independently for each class), y i,j This indicates the actual label.
[0136] Step 8: Use PyCharm software to perform deep learning training on the carbon soot image training set, while setting pre-training weights for the "LVIS" dataset and generating training weights corresponding to the carbon soot particle dataset; then use the prediction script to call the training weights and target particle images. Running the script can segment and label the basic carbon soot particles (such as...) within 2 seconds. Figure 6 (As shown). When using YOLOv5 deep learning, a gradually decaying learning rate is used to prevent overfitting, and the "LVIS" pre-training dataset is called for joint training. Then, the training weights generated by the training are called through a script to segment and label the target carbon soot agglomerates.
[0137] Step 9: Continue using the equivalent circle diameter method in PyCharm software to measure the identified elementary particles (such as...). Figure 7 (As shown), and scale calibration is performed using the scale calibration coefficient pixel_to_nm to finally obtain the particle size of the identified soot particles, specifically as shown in the following formula:
[0138]
[0139] Where A represents the projected area of the soot particles in the TEM image, and D... ECD Indicates the equivalent diameter.
[0140] In summary, this application has the following beneficial effects:
[0141] The method of this invention enables better segmentation of soot agglomerates and identification of basic particles, as well as measurement of the particle size. This invention utilizes advanced deep learning technology to segment soot particle images and identify basic particles, achieving precise measurement of the particle size of soot particles and effectively replacing manual labor with computer-based identification of the basic particle size within soot agglomerates.
[0142] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0143] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the core ideas of the present invention. Furthermore, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for carbon soot particle segmentation and particle size measurement, characterized in that, include: Acquire an image of the carbon soot to be tested; A particle segmentation model is constructed; the particle segmentation model adopts the YOLOv5 deep learning model network; the YOLOv5 deep learning model network uses the Focus module and CSP module as the backbone network, and embeds SE attention in the CSP module for channel weighting processing; The image of the carbon soot to be tested is input into the particle segmentation model for identification, and the images of the basic particles and their corresponding annotations are obtained. Based on the image and corresponding annotation of the basic particles, the basic particles are measured using the equivalent circle diameter method, and the measurement results are calibrated using a scale calibration system to obtain the particle size.
2. The method for carbon soot particle segmentation and particle size measurement according to claim 1, characterized in that, The process of inputting the carbon soot image to be tested into the particle segmentation model for identification to obtain images of basic particles and their corresponding annotations includes: The image of the carbon soot to be tested is input into the particle segmentation model. First, convolution operation is performed in the Focus module. The input image is scanned by sliding the convolution kernel to identify the irregular boundaries and fractal structure features of the carbon soot agglomerates. Then, the CSP module is used to perform attention weighting processing on each feature channel to focus on the carbon soot region, suppress background noise, and obtain the image of the basic particles and their corresponding annotations.
3. The method for carbon soot particle segmentation and particle size measurement according to claim 2, characterized in that, The formula for calculating the convolution operation is: Where I is the input, K is the convolution kernel, k is the kernel radius, (x, y) are the coordinates of the output feature map calculation position, and K(i, j) represents the weight of offset (i, j) in the kernel.
4. The method for carbon soot particle segmentation and particle size measurement according to claim 2, characterized in that, The formula for calculating attention weighting in the CSP module is as follows: Among them, z c Let H represent the global average pooling structure of the c-th channel, H represent the feature map height, W represent the weight matrix of the fully connected layer, and x represent the weight matrix of the fully connected layer. c (i, j) represents the pixel value of the c-th channel at position (i, j). Let represent the c-th channel feature after recalibration, and σ represent the Sigmoid activation function.
5. The method for carbon soot particle segmentation and particle size measurement according to claim 1, characterized in that, The particle segmentation model is trained using a total network loss function and gradient decay. The total network loss function includes a bounding box loss function, a target confidence loss function, and a classification loss function.
6. The method for carbon soot particle segmentation and particle size measurement according to claim 5, characterized in that, The total network loss function is expressed as: L total =λ box L box +λ obj L obj +λ cls L cls Where λ represents the weighting coefficient, λ box For the bounding box loss weights, λ box =0.1, λ obj λ is the weight for the confidence loss. cls For classification loss weights, L box L represents the bounding box loss function. obj L represents the target confidence loss function. cls Represents the classification loss function; The bounding box loss function is expressed as: Where IoU represents the intersection-union ratio, ρ represents the Euclidean distance between the center of the predicted box and the center of the ground truth box, c represents the diagonal length of the minimum bounding rectangle, α and v represent aspect ratio penalty terms, and b pred b represents the Euclidean distance between the center of the predicted bounding box and the center of the ground truth bounding box. gt The center coordinates of the ground truth bounding box are represented as follows: IoU, α, and v are expressed as follows: Where A represents the predicted bounding box pixel region, B represents the ground truth bounding box pixel region, and ω gt h represents the actual bounding box width. gt ω represents the actual bounding box height. pred hpred represents the width of the predicted bounding box, and hpred represents the height of the predicted bounding box; The target confidence loss function uses binary cross-entropy to determine whether a target exists within the grid, and is expressed as: Among them, S 2 Indicates the number of grid cells, y i This represents the true label, where 1 = target, 0 = no target. Indicates the confidence level of the prediction; The classification loss function uses binary cross-entropy, supports multi-label classification, and is expressed as follows: Where C represents the number of categories, p i,j y represents the predicted class probability. i,j This indicates the actual label.
7. The method for carbon soot particle segmentation and particle size measurement according to claim 1, characterized in that, The formula for calculating the equivalent circle diameter is as follows: Where A represents the projected area of the soot particles in the TEM image, and D... ECD Indicates the equivalent diameter.
8. A carbon soot particle segmentation and particle size measurement system, using the method as described in any one of claims 1-7, characterized in that, include: The image acquisition unit is used to acquire images of the carbon soot to be tested; Model building unit, used to build particle segmentation models; The particle segmentation model uses the YOLOv5 deep learning model network; the YOLOv5 deep learning model network uses the Focus module and CSP module as the backbone network, and embeds SE attention in the CSP module for channel weighting processing; The segmentation and recognition unit is used to input the carbon soot image to be tested into the particle segmentation model for recognition, and obtain the images of basic particles and their corresponding annotations. The particle size measurement unit is used to measure the basic particles based on the image and corresponding annotation of the basic particles using the equivalent circle diameter method, and to calibrate the measurement results through a scale calibration system to obtain the particle size.
9. An electronic device, characterized in that, The device includes a memory and a processor, the memory being used to store a computer program, and the processor running the computer program to cause the electronic device to perform the carbon soot particle segmentation and particle size measurement method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, It stores a computer program, which, when executed by a processor, implements the carbon soot particle segmentation and particle size measurement method as described in any one of claims 1-7.