Image recognition and analysis method and system for regulating cardiac macrophage inflammation

By constructing and training cell recognition deep learning models to identify and classify the functional status of macrophages and inflammatory cells in the heart, the problem of insufficient recognition accuracy in the prior art is solved, and the accuracy of examination results is improved.

CN119741704BActive Publication Date: 2025-06-13TIANJIN CHEST HOSPITAL
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510246001.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-04
Publication Date
2025-06-13
Estimated Expiration
2045-03-04

AI Technical Summary

Technical Problem

The existing macrophage inflammation regulation and recognition technology is difficult to accurately identify macrophages and inflammatory cells, resulting in errors in the indicators in the examination results, affecting the doctor's judgment.

Method used

Cell images were obtained by fluorescence microscopy, and after pretreatment, a deep learning model for cell recognition was constructed, the model was trained to identify macrophages and inflammatory cells, and functional status was divided, and the regulatory examination results were finally output.

Benefits of technology

It improves the identification accuracy of macrophages and inflammatory cells, reduces errors in the examination results, and helps doctors more accurately judge the severity and direction of cardiac inflammation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119741704B_ABST
    Figure CN119741704B_ABST
Patent Text Reader

Abstract

The present invention discloses an image recognition and analysis method and system for cardiac macrophage inflammation regulation, which relates to the technical field of macrophage inflammation regulation recognition, and includes the following steps: observing and acquiring cell images through a fluorescence microscope, preprocessing the cell images to obtain preprocessed images; constructing a cell recognition deep learning model, and training the cell recognition deep learning model by extracting the fluorescence features of macrophages and the gray-scale features of inflammatory cells; counting macrophages and inflammatory cells in the inflammatory region, and outputting a regulation inspection result; The present invention is used to solve the problem that the existing macrophage inflammation regulation recognition technology still has insufficient recognition accuracy for macrophages and inflammatory cells, which easily affects the doctor's judgment of the cardiac inflammation condition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of macrophage inflammation regulation and recognition, and particularly to an image recognition and analysis method and system for cardiac macrophage inflammation regulation. Background Art

[0002] Macrophages are important components of the immune system, with the functions of clearing bacteria, viruses, and other pathogens, and also play a key role in regulating inflammatory responses and tissue repair. Macrophage inflammation regulation and recognition technology refers to the technology used to identify, monitor, and regulate the roles and responses of macrophages during the inflammatory process.

[0003] Since the heart is the most important organ in the human body, when inflammation appears in the heart, it is necessary to seek medical treatment in time. Doctors need to examine the inflammation in the heart and make a medical diagnosis based on the examination results. Inflammation in the heart usually can only be examined through image recognition. In image recognition, the accurate recognition of inflammatory cells is particularly important. At the same time, macrophages are important factors in the cure of inflammation. Therefore, the recognition of macrophages is also extremely important. In the existing macrophage inflammation regulation and recognition technology, it is still difficult to accurately recognize macrophages and inflammatory cells, and the recognition accuracy is insufficient, resulting in errors in the indicators of macrophages and inflammatory cells in the examination results, thereby affecting the doctor's judgment. The existing macrophage inflammation regulation and recognition technology also has the problem that the recognition accuracy of macrophages and inflammatory cells is insufficient, which easily affects the doctor's judgment of the condition of heart inflammation. Summary of the Invention

[0004] The present invention aims to solve at least one of the technical problems in the existing technology to some extent. By observing and obtaining cell images through a fluorescence microscope, preprocessing the cell images to obtain preprocessed images, and simultaneously constructing a deep learning model for cell recognition, training the deep learning model for cell recognition with macrophage sample images, training the deep learning model for cell recognition with inflammation sample images, then dividing macrophages and inflammatory regions in the preprocessed images through the deep learning model for cell recognition, and finally counting the inflammatory cells in macrophages and inflammatory regions to output a regulation inspection result, so as to solve the problem that the existing macrophage inflammation regulation and recognition technology still has insufficient recognition accuracy for macrophages and inflammatory cells, which easily affects the doctor's judgment of the condition of heart inflammation.

[0005] To achieve the above object, in the first aspect, the present application provides an image recognition and analysis method for cardiac macrophage inflammation regulation, including the following steps:

[0006] Observing and obtaining cell images through a fluorescence microscope, and preprocessing the cell images to obtain preprocessed images;

[0007] Construct a deep learning model for cell recognition, train the deep learning model for cell recognition by extracting the fluorescence features of macrophages and the grayscale features of inflammatory cells, divide the macrophages and inflammatory regions in the preprocessed image, and divide the functional states of macrophages;

[0008] Count the macrophages and inflammatory cells in the inflammatory regions, and output the regulation inspection results.

[0009] Further, observe and obtain cell images through a fluorescence microscope, and preprocess the cell images to obtain preprocessed images, including the following sub-steps:

[0010] Fluorescently stain macrophages with CD68 and CD206. CD68 and CD206 are markers for M1 macrophages and M2 macrophages respectively. The functional state of M1 macrophages is pro-inflammatory, and the functional state of M2 macrophages is anti-inflammatory;

[0011] Observe and obtain cell images through a fluorescence microscope;

[0012] Increase the contrast of the cell image by a first value and increase the brightness of the cell image by the first value to obtain a preprocessed image.

[0013] Further, constructing a deep learning model for cell recognition, training the deep learning model for cell recognition by extracting the fluorescence features of macrophages and the grayscale features of inflammatory cells, dividing the macrophages and inflammatory regions in the preprocessed image, and dividing the functional states of macrophages includes the following sub-steps:

[0014] Construct a deep learning model for cell recognition and train the deep learning model for cell recognition with macrophage sample images;

[0015] Train the deep learning model for cell recognition with inflammatory sample images;

[0016] Divide the macrophages and inflammatory regions in the preprocessed image with the deep learning model for cell recognition.

[0017] Further, constructing a deep learning model for cell recognition and training the deep learning model for cell recognition includes the following sub-steps:

[0018] Obtain macrophage sample images in which macrophages are fluorescently stained with CD68 and CD206. The macrophage sample images are used to train the deep learning model for cell recognition;

[0019] Stain the cells stained in the macrophage sample image as stained cells, perform contour extraction on the macrophage sample image, extract the independent stained cells in the macrophage sample image, and manually label the functional states of the stained cells. The functional states include pro-inflammatory macrophages and anti-inflammatory macrophages, namely M1 macrophages and M2 macrophages, which are respectively named M1 cells and M2 cells;

[0020] Extract a cluster composed of the first number of M1 cells, named the first cluster, extract a cluster composed of the second number of M2 cells, named the second cluster, name the single M1 cell in the first cluster as M1 single cell, and name the single M2 cell in the second cluster as M2 single cell. Label the M1 single cell with the symbol P n Indicate, label the M2 single cell with the symbol Q i Indicate, where n ∈ Z+ and i ∈ Z+, n is the serial number of P, i is the serial number of Q, and Z+ represents positive integers;

[0021] Perform image extraction on the M1 single cell P n , extract the RGB value of each pixel point in P n , and label it as the M1 color value. The M1 color value of the P n is expressed as C1(n,m), and C1(n,m) represents the RGB value of the m-th pixel point in P n , where m ∈ Z+; perform image extraction on the M2 single cell Q i , extract the RGB value of each pixel point in Q i , and label it as the M2 color value. The M2 color value of the Q i is expressed as C2(i,j), and C2(i,j) represents the RGB value of the j-th pixel point in Q i , where j ∈ Z+. Among them, C1(n,m) and C2(i,j) are only the numbers of RGB values, used to distinguish the RGB values of different pixel points in different cells. The representation format of the RGB value is (R,G,B), and R, G, and B respectively represent the values of the red, green, and blue color channels;

[0022] Extract the R value, G value, and B value in C1(n,m), and label them as R1(n,m), G1(n,m), and B1(n,m) in sequence; extract the R value, G value, and B value in C2(i,j), and label them as R2(i,j), G2(i,j), and B2(i,j) in sequence;

[0023] Collectively call R1(n,m), G1(n,m), B1(n,m), R2(i,j), G2(i,j), and B2(i,j) single-channel color values, and perform further analysis on the single-channel color values to obtain the standard interval of the color values.

[0024] Further, the further analysis of the single-channel color value includes the following sub-steps:

[0025] Collectively refer to R1(n,m), G1(n,m), B1(n,m), R2(i,j), G2(i,j), and B2(i,j) as single-channel color values. For any single-channel color value, obtain the maximum and minimum color values to form a range interval, marked as the color value interval. Denote the maximum and minimum color values as CLmax and CLmin respectively. Calculate (CLmax - CLmin) / 2 + CLmin, round the calculation result to an integer and mark it as the color value movement coverage number;

[0026] Set a new interval from the minimum color value to the color value movement coverage number, marked as the color value movement interval. Name the minimum and maximum values of the color value movement interval as the movement minimum value and the movement maximum value respectively. Mark the currently analyzed single-channel color value as the analyzed color value. Obtain the number of analyzed color values within the color value movement interval, marked as NF. Increase both the movement minimum value and the movement maximum value by one and then obtain the range quantity again. Repeat the execution until the movement maximum value is equal to the color value maximum value. Obtain the number of analyzed color values, marked as NG. Calculate NF / NG and mark the calculation result as the color value ratio. Determine whether there is a case where the color value ratio is greater than or equal to the first ratio threshold among all calculated color value ratios. If so, output a range sufficient signal; if not, output a range insufficient signal;

[0027] If a range sufficient signal is output, subtract one from the color value movement coverage number, re-analyze the color value ratio, and re-determine whether there is a case where the color value ratio is greater than or equal to the first ratio threshold until a range insufficient signal is output; if a range insufficient signal is output, add one to the color value movement coverage number, re-analyze the color value ratio, and re-determine whether there is a case where the color value ratio is greater than or equal to the first ratio threshold until a range sufficient signal is output;

[0028] After stopping the loop, use the movement interval that outputs the range sufficient signal as the color value standard interval for the analyzed color value. Analyze all single-channel color values to obtain the R1 standard interval, G1 standard interval, B1 standard interval, R2 standard interval, G2 standard interval, and B2 standard interval.

[0029] Further, training the cell recognition deep learning model with inflammatory sample images includes the following sub-steps:

[0030] Obtain inflammatory sample images and label the inflammatory cells in the inflammatory sample images through artificial standards;

[0031] Convert the inflammatory sample images into grayscale images, extract the grayscale values of the pixel points in the inflammatory cells, and mark them as inflammatory grayscale values;

[0032] Sort the inflammatory gray values in ascending order and number them. Represented by the symbol D h where h ∈ Z+ and h is the serial number of D. Establish a plane rectangular coordinate system with h as the X-axis and D h as the Y-axis, and name it the gray-scale trend graph;

[0033] For any inflammatory cell, input the inflammatory gray value into the gray-scale trend graph according to D h Name the coordinate points in the gray-scale trend graph as gray-scale trend coordinate points. Connect the gray-scale trend coordinate points in ascending order of h with a smooth curve, and name the obtained curve the gray-scale trend line. One inflammatory cell analysis yields one gray-scale trend line. Analyze the inflammatory cells in all inflammatory sample images to obtain the third quantity of gray-scale trend lines;

[0034] Mark the area between any two gray-scale trend lines as the trend area, and extract all the trend areas to form the gray-scale trend area.

[0035] Furthermore, the division of macrophages and inflammatory regions in the preprocessed image by the cell recognition deep learning model includes the following sub-steps:

[0036] Extract the contour of the preprocessed image by the contour extraction technique, and mark the extracted cells as cells to be analyzed;

[0037] For any cell to be analyzed, extract the R value, G value, and B value of the pixel points in the cell to be analyzed, and mark them as AR, AG, and AB respectively. A range interval composed of ARs of different pixel points is marked as the AR interval, a range interval composed of AGs of different pixel points is marked as the AG interval, and a range interval composed of ABs of different pixel points is marked as the AB interval;

[0038] Analyze the AR interval, AG interval, and AB interval by analyzing the color value standard interval, and change the first proportion threshold in the analyzed color value standard interval to the second proportion threshold. Name the analyzed intervals as the AR interval to be recognized, the AG interval to be recognized, and the AB interval to be recognized respectively;

[0039] Respectively judge whether the AR interval to be recognized is within the R1 standard interval, whether the AG interval to be recognized is within the G1 standard interval, and whether the AB interval to be recognized is within the B1 standard interval. If all the judgment results are yes, output the M1-type macrophage signal; otherwise, output the M2-type judgment signal;

[0040] If the M2 property judgment signal is output, it is respectively judged whether the AR recognition interval to be recognized is within the R2 standard interval, whether the AG recognition interval to be recognized is within the G2 standard interval, and whether the AB recognition interval to be recognized is within the B2 standard interval. If all the judgment results are yes, the M2 property macrophage signal is output; otherwise, the inflammatory judgment signal is output.

[0041] If the inflammatory judgment signal is output, it is analyzed whether the cell to be analyzed is an inflammatory cell.

[0042] Further, analyzing whether the cell to be analyzed is an inflammatory cell includes the following sub-steps:

[0043] If the inflammatory judgment signal is output, the cell to be analyzed is analyzed by analyzing the gray-scale trend line. The obtained gray-scale trend line is marked as the trend line to be analyzed, and the trend line to be analyzed is placed in the gray-scale trend chart. It is judged whether the trend line to be analyzed is entirely within the gray-scale trend region. If so, the inflammatory signal is output; otherwise, the normal signal is output.

[0044] If the M1 macrophage signal is output, the cell to be analyzed is marked as an M1 macrophage; if the M2 macrophage signal is output, the cell to be analyzed is marked as an M2 macrophage; if the inflammatory signal is output, the cell to be analyzed is marked as an inflammatory cell; if the normal signal is output, the cell to be analyzed is marked as a normal tissue cell.

[0045] The area surrounded by the outermost inflammatory cells is the inflammation area.

[0046] Further, the macrophages and the inflammatory cells in the inflammation area are counted, and the output of the regulation inspection result includes the following sub-steps:

[0047] Count the number of M1 macrophages and mark it as the M1 quantity.

[0048] Count the number of M2 macrophages and mark it as the M2 quantity.

[0049] Count the number of inflammatory cells and mark it as the inflammatory quantity.

[0050] The M1 quantity, M2 quantity, and inflammatory quantity are output as the regulation inspection result and uploaded to the patient's inspection report.

[0051] In a second aspect, the present application provides an image recognition and analysis system for cardiac macrophage inflammation regulation, including an image preprocessing module, an image recognition module, and an inspection output module; the image preprocessing module and the inspection output module are respectively connected to the image recognition module for data connection;

[0052] The image preprocessing module is used to observe and obtain cell images through a fluorescence microscope, and preprocess the cell images to obtain preprocessed images.

[0053] The image recognition module is used to construct a deep learning model for cell recognition, train the deep learning model for cell recognition by extracting the fluorescence features of macrophages and the gray-scale features of inflammatory cells, divide the macrophages and the inflammatory regions in the preprocessed image, and divide the functional states of macrophages;

[0054] The inspection output module is used to count the inflammatory cells in macrophages and inflammatory regions and output the regulation inspection results.

[0055] Advantages of the present invention: By constructing a deep learning model for cell recognition, then extracting the fluorescence features of macrophages and the gray-scale features of inflammatory cells to train the deep learning model for cell recognition, dividing the macrophages and the inflammatory regions in the preprocessed image, and dividing the functional states of macrophages. The advantage is that there are significant differences in the size and shape of macrophages among different individuals and they cannot be measured by a unified standard. Therefore, it is more accurate to judge by color value features. The image features of macrophages are enhanced by fluorescence labeling, and then they are recognized to analyze the color value features of macrophages in the state of fluorescence labeling to identify macrophages. At the same time, since the size and shape of inflammatory cells are similar, they can be directly analyzed by their gray-scale features, improving the accuracy and effectiveness of macrophage and inflammatory cell recognition;

[0056] The present invention observes and obtains cell images through a fluorescence microscope, preprocesses the cell images to obtain preprocessed images, then divides the macrophages and the inflammatory regions in the preprocessed images through a deep learning model for cell recognition, and finally counts the inflammatory cells in macrophages and inflammatory regions and outputs the regulation inspection results. The advantage is that the numbers of M1, M2, and inflammatory cells obtained by recognizing macrophages and inflammatory cells through the deep learning model for cell recognition are more accurate, and in the inspection report, it can help doctors more accurately judge the severity and trend of the patient's condition, further improving the accuracy and effectiveness of cardiac macrophage inflammation regulation recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] Figure 1 is the principle block diagram of the system of the present invention;

[0058] Figure 2 is the macrophage sample image of the present invention;

[0059] Figure 3 is the inflammation sample image of the present invention;

[0060] Figure 4 is the schematic diagram of the gray-scale trend line of the present invention;

[0061] Figure 5 Schematic diagram of multiple gray - scale trend lines of the present invention;

[0062] Figure 6 Schematic diagram of the trend region of the present invention;

[0063] Figure 7 Schematic diagram of the gray - scale trend region of the present invention;

[0064] Figure 8 Schematic diagram of putting the trend line to be analyzed into the gray - scale trend chart of the present invention;

[0065] Figure 9 Flow chart of the steps of the method of the present invention. Detailed implementation manners

[0066] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0067] Embodiment 1, please refer to Figure 1 As shown, the present application provides an image recognition and analysis system for cardiac macrophage inflammation regulation, including an image pre - processing module, an image recognition module, and an inspection output module; the image pre - processing module and the inspection output module are respectively connected to the image recognition module for data connection;

[0068] The image pre - processing module is used to observe and obtain cell images through a fluorescence microscope, and pre - process the cell images to obtain pre - processed images;

[0069] The image pre - processing module is configured with an image pre - processing strategy, and the image pre - processing strategy includes:

[0070] Fluorescently stain macrophages with CD68 and CD206. CD68 and CD206 are respectively markers of M1 macrophages and M2 macrophages. The functional state of M1 macrophages is pro - inflammatory, and the functional state of M2 macrophages is anti - inflammatory;

[0071] Observe and obtain cell images through a fluorescence microscope;

[0072] Increase the contrast of the cell image by a first value and at the same time increase the brightness of the cell image by the first value to obtain a pre - processed image;

[0073] In practical applications, fluorescence staining uses existing fluorescence staining techniques. After fluorescence staining, M1 macrophages and M2 macrophages visually appear blue and orange respectively. At this time, by analyzing their RGB values through a computer, M1 macrophages and M2 macrophages can be effectively identified. The first value is set to 20, and the first value is used to improve the contrast and brightness of cell images. In most cases, it is found that when the first value is set to 20, macrophages and the inflammatory area can be made more prominent.

[0074] The image recognition module is used to construct a deep learning model for cell recognition. By extracting the fluorescence features of macrophages and the gray-scale features of inflammatory cells, the deep learning model for cell recognition is trained, and the macrophages and the inflammatory area in the preprocessed image are regionally divided, and the functional states of macrophages are divided; the image recognition module includes a macrophage recognition training unit, an inflammatory cell recognition training unit, and a cell recognition unit;

[0075] The macrophage recognition training unit is used to construct a deep learning model for cell recognition and train the deep learning model for cell recognition through macrophage sample images;

[0076] The macrophage recognition training unit is configured with a macrophage recognition training strategy, and the macrophage recognition training strategy includes:

[0077] Please refer to Figure 2 As shown, obtain macrophage sample images in which macrophages are fluorescence-stained with CD68 and CD206. The macrophage sample images are used to train the deep learning model for cell recognition;

[0078] Mark the stained cells in the macrophage sample images as stained cells, perform contour extraction on the macrophage sample images, extract the independent stained cells in the macrophage sample images, and manually label the functional states of the stained cells. The functional states include pro-inflammatory macrophages and anti-inflammatory macrophages, that is, M1 macrophages and M2 macrophages, which are respectively named M1 cells and M2 cells;

[0079] Extract a cluster composed of the first number of M1 cells, named the first cluster, extract a cluster composed of the second number of M2 cells, named the second cluster, name the single M1 cell in the first cluster as M1 single cell, name the single M2 cell in the second cluster as M2 single cell, label the M1 single cell, and use the symbol P n to represent, label the M2 single cell, and use the symbol Q i to represent, where n ∈ Z+ and i ∈ Z+, n is the serial number of P, i is the serial number of Q, and Z+ represents positive integers;

[0080] In practical applications, Figure 2Shown is one of the many macrophage sample images, presented in grayscale in this embodiment, while in actual applications, it is presented as a color image. Figure 2 Some M1 cells and M2 cells are marked. The existing contour extraction technology is used to extract the stained cells. There are occluded stained cells in the extracted image, that is, the extracted stained cells are incomplete. However, even if they are incomplete, the range of RGB values is the same as that of the complete stained cells and can also be included in the reference range. By analyzing all macrophage sample images, 17,865 M1 cells are obtained, that is, the first quantity is 17,865. By analyzing all macrophage sample images, 14,472 M2 cells are obtained, that is, the second quantity is 14,472. That is, 1 ≤ n ≤ 17,865 and 1 ≤ i ≤ 14,472.

[0081] For M1 single cell P n Image extraction is performed to extract the RGB value of each pixel point in P n and mark it as the M1 color value. The M1 color value of P n is denoted as C1(n, m), and C1(n, m) represents the RGB value of the m-th pixel point in P n where m ∈ Z+. For M2 single cell Q i Image extraction is performed to extract the RGB value of each pixel point in Q i and mark it as the M2 color value. The M2 color value of Q i is denoted as C2(i, j), and C2(i, j) represents the RGB value of the j-th pixel point in Q i where j ∈ Z+. Here, C1(n, m) and C2(i, j) are only the numbers of RGB values, used to distinguish the RGB values of different pixel points in different cells. The representation format of the RGB value is (R, G, B), and R, G, and B respectively represent the values of the red, green, and blue color channels.

[0082] The R value, G value, and B value in C1(n, m) are extracted and marked as R1(n, m), G1(n, m), and B1(n, m) in sequence; the R value, G value, and B value in C2(i, j) are extracted and marked as R2(i, j), G2(i, j), and B2(i, j) in sequence.

[0083] In actual applications, for any M1 single cell P n , for example, when n = 1, that is, extraction is performed on P 1 , and there are 384 pixel points in P 1 , that is, for P 1, 1 ≤ m ≤ 384. For example, when m = 186, C1(1, 186) is extracted as (15, 143, 231), and when m = 242 is extracted, C1(1, 242) is obtained as (10, 56, 160). C1(1, 186) and C1(1, 242) are intended to show the data format of C1(n, m). The format of C2(i, j) is the same as it, so it will not be specifically shown in this embodiment; taking C1(1, 186) as an example, the R value, G value, and B value of C1(1, 186) are extracted, and R1(1, 186) = 15, G1(1, 186) = 143, B1(1, 186) = 231 are obtained respectively. The origin of R2(i, j), G2(i, j), and B2(i, j) is the same as that of R1(n, m), G1(n, m), and B1(n, m), so it will not be specifically shown in this embodiment;

[0084] Collectively refer to R1(n, m), G1(n, m), B1(n, m), R2(i, j), G2(i, j), and B2(i, j) as single-channel color values, and further analyze the single-channel color values to obtain the standard color value interval;

[0085] Collectively refer to R1(n, m), G1(n, m), B1(n, m), R2(i, j), G2(i, j), and B2(i, j) as single-channel color values. For any single-channel color value, obtain the maximum color value and the minimum color value of it to form a range interval, marked as the color value interval. Represent the maximum color value and the minimum color value as CLmax and CLmin respectively, calculate (CLmax - CLmin) / 2 + CLmin, and retain the calculation result as an integer and mark it as the color value moving coverage number;

[0086] In practical applications, taking R1(n, m) as an example, due to the different values of n and m in R1(n, m), there are several color values. The maximum color value and the minimum color value in R1(n, m) are 19 and 7 respectively, and the color value interval of R1(n, m) is [7, 19], which is marked as the R1 interval in this embodiment. The calculated R1 moving coverage number is (19 - 7) / 2 + 7 = 13;

[0087] Set a new interval from the minimum color value to the color value movement coverage number, marked as the color value movement interval. Name the minimum value and the maximum value of the color value movement interval as the movement minimum value and the movement maximum value respectively. Mark the single-channel color value being currently analyzed as the analysis color value. Obtain the number of analysis color values within the color value movement interval, marked as NF. Increase both the movement minimum value and the movement maximum value by one and obtain the range number again. Repeat the execution until the movement maximum value is equal to the color value maximum. Obtain the number of analysis color values, marked as NG. Calculate NF / NG, and mark the calculation result as the color value proportion. Determine whether there is a case where the color value proportion is greater than or equal to the first proportion threshold among all calculated color value proportions. If there is, output a range sufficient signal; if not, output a range insufficient signal;

[0088] In practical applications, name the color value movement interval of R1 as the R1 movement interval. Set the R1 movement interval to [7, 13], and obtain the movement minimum value and the movement maximum value as 7 and 13 respectively. Obtain the number NF of R1(n, m) within [7, 13] among all R1(n, m) as 2,634,095. For R1(n, m), NG is the number of R1(n, m). Obtain NG as 6,860,140. Calculate the color value proportion to be 0.38, that is, 38% of R1(n, m) is within [7, 13]. Increase both the movement minimum value and the movement maximum value by 1 simultaneously to obtain the R1 movement interval as [8, 14], and analyze the color value proportion again until the movement maximum value is equal to 19. At this time, a total of 7 color value proportions are obtained. The first proportion threshold is set to 0.8. The setting of the first proportion threshold is to find the range where the single-channel color value is concentrated. Because although the stained cells are stained, not all parts can show the most ideal color expression. At this time, it is necessary to find the range of most of the color value values of all colors to improve the accuracy of judgment; among the 7 color value proportions, there is a color value proportion greater than 0.8, so output a range sufficient signal;

[0089] If a range sufficient signal is output, subtract one from the color value movement coverage number, re-analyze the color value proportion and re-determine whether there is a case where the color value proportion is greater than or equal to the first proportion threshold until a range insufficient signal is output; if a range insufficient signal is output, add one to the color value movement coverage number, re-analyze the color value proportion and re-determine whether there is a case where the color value proportion is greater than or equal to the first proportion threshold until a range sufficient signal is output;

[0090] After stopping the loop, use the movement interval that outputs the range sufficient signal as the color value standard interval for analyzing the color value, and analyze all single-channel color values to obtain the R1 standard interval, G1 standard interval, B1 standard interval, R2 standard interval, G2 standard interval, and B2 standard interval;

[0091] In practical applications, if a range sufficient signal is output, the R1 moving coverage number is decreased by one, resulting in an R1 moving coverage number of 12 and a new R1 moving interval of [7, 12]. After analyzing the color value ratio again and outputting a range sufficient signal after the analysis, the R1 moving coverage number is decreased by one again and the color value ratio is re-analyzed. At this time, a range insufficient signal is output, and the analysis is stopped. If a range sufficient signal was output in the previous analysis, it means that the range setting of the R1 moving interval is reasonable and can make 80% of R1(n, m) fall within the R1 moving interval. However, at this time, it can only be proven that the R1 moving interval can encompass 80% of R1(n, m), and the density of R1(n, m) within the R1 moving interval is not the largest. Ideally, the R1 moving interval with the largest density is sought. Therefore, the R1 moving coverage number is decreased by one and re-analyzed. If a range sufficient signal is output next time, it means that there is still room to narrow the R1 moving interval, which can make the density of R1(n, m) greater. If a range insufficient signal is output next time, it means that the R1 moving interval cannot be narrowed again. Under the condition of being able to encompass 80% or more of R1(n, m), its density reaches the maximum. Therefore, the R1 moving interval that outputs a range sufficient signal last time is taken as the standard, that is, when the R1 moving coverage number is 11. And in the case where the R1 moving coverage number is equal to 11, a total of 9 color value ratios are analyzed. The R1 moving interval with the largest color value ratio among them is taken as the R1 standard interval. In this embodiment, among the 9 color value ratios, the color value ratio is the largest when the R1 moving interval is [11, 15]. Therefore, the R1 standard interval is [11, 15]; the analysis processes of the G1 standard interval, B1 standard interval, R2 standard interval, G2 standard interval, and B2 standard interval are all the same as that of the R1 standard interval. Therefore, they are not specifically shown in this embodiment;

[0092] The inflammatory cell recognition training unit is used to train a cell recognition deep learning model through inflammatory sample images;

[0093] The inflammatory cell recognition training unit is configured with an inflammatory cell recognition training strategy, and the inflammatory cell recognition training strategy includes:

[0094] Please refer to Figure 3 As shown, obtain inflammatory sample images and label the inflammatory cells in the inflammatory sample images through artificial standards;

[0095] Convert the inflammatory sample images into grayscale images, extract the grayscale values of the pixel points in the inflammatory cells, and label them as inflammatory grayscale values;

[0096] Please refer to Figures 4 to 5 As shown, sort the inflammatory grayscale values in ascending order and number them, using the symbol D hIt is represented that, where h ∈ Z+ and h is the serial number of D. Taking h as the X-axis and D h as the Y-axis, a plane rectangular coordinate system is established and named as the gray-scale trend chart;

[0097] For any inflammatory cell, the inflammatory gray-scale values are entered into the gray-scale trend chart according to D h The coordinate points in the gray-scale trend chart are named gray-scale trend coordinate points. The gray-scale trend coordinate points are connected by a smooth curve in ascending order of h, and the obtained curve is named the gray-scale trend line. One inflammatory cell analysis yields one gray-scale trend line. Analyzing the inflammatory cells in all inflammatory sample images gives the third quantity of gray-scale trend lines;

[0098] Please refer to Figures 6 to 7 As shown, the area between any two gray-scale trend lines is marked as the trend area, and all the trend areas are extracted to form the gray-scale trend area;

[0099] In practical applications, Figure 3 is one of many inflammatory sample images, and the irregular circle therein is the manually marked identifier. When extracting inflammatory cells, the image within the irregular circle is subjected to contour extraction. For any one inflammatory cell, 727 pixel points are extracted, that is, there are 727 inflammatory gray-scale values, and D 1 to D 727 are obtained through sorting and numbering, and the constructed gray-scale trend chart is as Figure 4 shown; Figure 4 shows the gray-scale trend line of one inflammatory cell, Figure 5 shows multiple gray-scale trend lines obtained after the analysis of multiple inflammatory cells; since the sizes, shapes, and colors of inflammatory cells are similar, the difference in the number of pixel points contained in different inflammatory cells is also small. By analyzing the trend of the gray-scale values, inflammatory cells can be quickly and accurately identified; for any two gray-scale trend lines, their curve beginnings are connected and their ends are connected. At this time, a closed area is obtained, which is the trend area, and the area composed of all the trend areas is the gray-scale trend area, Figure 6 shows the trend area between two gray-scale trend lines. Taking Figure 5 as an example, Figure 5 the gray-scale trend area in is as Figure 7 shown; the gray-scale trend area reveals the change law and trend of the inflammatory cell gray-scale values. If the obtained gray-scale trend line is within the gray-scale trend area, it means that the change law and trend of the gray-scale trend line conform to the characteristics of inflammatory cells, and it can be determined as an inflammatory cell;

[0100] The cell recognition unit is used to divide macrophages and inflammatory regions in the preprocessed image through a deep learning model for cell recognition;

[0101] The cell recognition unit is configured with a cell recognition strategy, and the cell recognition strategy includes:

[0102] Perform contour extraction on the preprocessed image through contour extraction technology, and mark the extracted cells as cells to be analyzed;

[0103] For any cell to be analyzed, extract the R value, G value, and B value in the RGB values of the pixel points in the cell to be analyzed, and mark them as AR, AG, and AB respectively. A range interval composed of ARs of different pixel points is marked as the AR interval, a range interval composed of AGs of different pixel points is marked as the AG interval, and a range interval composed of ABs of different pixel points is marked as the AB interval;

[0104] In practical applications, taking a certain cell to be analyzed as an example, it is obtained that the cell to be analyzed includes 426 pixel points. Each pixel point is extracted to obtain 426 ARs, 426 AGs, and 426 ABs. A range interval composed of the minimum value and the maximum value among the 426 ARs is the AR interval, and the definitions of the AG interval and the AB interval are the same as that of the AR interval;

[0105] Analyze the AR interval, AG interval, and AB interval by analyzing the color value standard interval, and change the first proportion threshold in the analyzed color value standard interval to the second proportion threshold. The analyzed intervals are respectively named the AR interval to be recognized, the AG interval to be recognized, and the AB interval to be recognized;

[0106] In practical applications, the second proportion threshold is set to 0.5. The setting of the second proportion threshold is to prevent errors in the analysis results caused by individual differences and staining deviations. The significance of setting it to 0.5 is to ensure that the color values of more than 50% of the area of the cell to be analyzed are within the standard interval, so as to judge whether the cell to be analyzed belongs to M1 macrophages or M2 macrophages; Analyze the AR interval, AG interval, and AB interval by analyzing the color value standard interval, calculate the color value proportion and compare it with the second proportion threshold and output the judgment result. At this time, the standard intervals obtained by analyzing the color value standard interval are respectively the AR interval to be recognized, the AG interval to be recognized, and the AB interval to be recognized;

[0107] Respectively judge whether the AR interval to be recognized is within the R1 standard interval, whether the AG interval to be recognized is within the G1 standard interval, and whether the AB interval to be recognized is within the B1 standard interval. If all the judgment results are yes, output the M1 macrophage signal, otherwise output the M2 judgment signal;

[0108] If the M2 property judgment signal is output, it is respectively judged whether the AR region to be recognized is within the R2 standard region, whether the AG region to be recognized is within the G2 standard region, and whether the AB region to be recognized is within the B2 standard region. If all the judgment results are yes, the M2 property macrophage signal is output; otherwise, the inflammatory judgment signal is output.

[0109] In practical applications, the R1 standard region, the G1 standard region, and the B1 standard region belong to M1 macrophages. It is respectively judged whether the AR region to be recognized is within the R1 standard region, whether the AG region to be recognized is within the G1 standard region, and whether the AB region to be recognized is within the B1 standard region. If all the judgment results are yes, it means that the color values of more than 50% of the pixel points in the cell to be analyzed conform to the fluorescence characteristics of M1 macrophages, indicating that the cell to be analyzed belongs to M1 macrophages. The analysis process in the M2 property judgment signal is the same as that for judging M1 macrophages. In the case of conforming to the fluorescence characteristics of M2 macrophages, the cell to be analyzed is M2 macrophages. If the cell to be analyzed is neither M1 macrophages nor M2 macrophages, it is necessary to judge whether the cell to be analyzed is an inflammatory cell.

[0110] If the inflammatory judgment signal is output, it is analyzed whether the cell to be analyzed is an inflammatory cell.

[0111] Please refer to Figure 8 As shown, if the inflammatory judgment signal is output, the cell to be analyzed is analyzed by analyzing the gray-scale trend line. The obtained gray-scale trend line is marked as the trend line to be analyzed, and the trend line to be analyzed is placed in the gray-scale trend chart. It is judged whether the trend line to be analyzed is entirely within the gray-scale trend region. If so, the inflammatory signal is output; otherwise, the normal signal is output.

[0112] If the M1 property macrophage signal is output, the cell to be analyzed is marked as M1 macrophages. If the M2 property macrophage signal is output, the cell to be analyzed is marked as M2 macrophages. If the inflammatory signal is output, the cell to be analyzed is marked as inflammatory cells. If the normal signal is output, the cell to be analyzed is marked as normal tissue cells.

[0113] The region surrounded by the outermost inflammatory cells is the inflammation region.

[0114] In practical applications, the gray-scale trend region reveals the change rule and trend of the gray-scale values of inflammatory cells. If the analyzed gray-scale trend line is within the gray-scale trend region, it means that the change rule and trend of the gray-scale trend line conform to the characteristics of inflammatory cells, and it can be judged as inflammatory cells. As Figure 8 shown, Figure 8It is a schematic diagram for placing the trend line to be analyzed into the grayscale trend graph, where the gray area is the grayscale trend area; after all the cells to be analyzed are judged, several inflammatory cells are obtained. Inflammatory cells usually show regionality, that is, they gather in a certain area within human tissues. By connecting the outermost inflammatory cells, a closed range can be obtained, which is the inflammation range and can be marked in the cell image to help doctors better judge the condition.

[0115] The inspection output module is used to count macrophages and inflammatory cells within the inflammation area and output the regulation inspection results;

[0116] The inspection output module is configured with an inspection output strategy, and the inspection output strategy includes:

[0117] Count the number of M1 macrophages and mark it as the M1 quantity;

[0118] Count the number of M2 macrophages and mark it as the M2 quantity;

[0119] Count the number of inflammatory cells and mark it as the inflammatory quantity;

[0120] Output the M1 quantity, M2 quantity, and inflammatory quantity as the regulation inspection results and upload them to the patient's inspection report;

[0121] In practical applications, the role of the cell recognition deep learning model is to identify the number of macrophages in different functional states and the number of inflammatory cells in the inflamed tissues of the heart through image recognition, providing a judgment basis for doctors to evaluate the patient's condition and treatment plan. Macrophages are the most important factors in the inflammatory response. In the existing detection technologies for heart inflammation, it is difficult to accurately identify the number of macrophages and inflammatory cells. Therefore, there are certain deviations in the selection of the condition and treatment means, which will lead to a longer treatment cycle.

[0122] Example 2, please refer to Figure 9 As shown, the present application provides an image recognition analysis method for regulating heart macrophage inflammation, including the following steps:

[0123] Step S1, observe and obtain cell images through a fluorescence microscope, and preprocess the cell images to obtain preprocessed images; Step S1 includes the following sub-steps:

[0124] Step S101, perform fluorescence staining on macrophages through CD68 and CD206. CD68 and CD206 are the markers of M1 macrophages and M2 macrophages respectively. The functional state of M1 macrophages is pro-inflammatory, and the functional state of M2 macrophages is anti-inflammatory;

[0125] Step S102, observe and obtain cell images through a fluorescence microscope;

[0126] Step S103, increase the contrast of the cell image by a first value and increase the brightness of the cell image by the first value to obtain a preprocessed image;

[0127] Step S2, construct a deep learning model for cell recognition, train the deep learning model for cell recognition by extracting the fluorescence features of macrophages and the gray-scale features of inflammatory cells, and divide the macrophages and inflammatory regions in the preprocessed image and divide the functional states of macrophages; Step S2 includes the following sub-steps:

[0128] Step S201, construct a deep learning model for cell recognition and train the deep learning model for cell recognition with macrophage sample images;

[0129] Step S201 includes the following sub-steps:

[0130] Step S201.1, obtain macrophage sample images in which macrophages are fluorescently stained with CD68 and CD206, and the macrophage sample images are used to train the deep learning model for cell recognition;

[0131] Step S201.2, label the stained cells in the macrophage sample images as stained cells, perform contour extraction on the macrophage sample images, extract the independent stained cells in the macrophage sample images, and manually label the functional states of the stained cells. The functional states include pro-inflammatory macrophages and anti-inflammatory macrophages, that is, M1 macrophages and M2 macrophages, which are named M1 cells and M2 cells respectively;

[0132] Step S201.3, extract a cluster composed of the first number of M1 cells, named the first cluster, extract a cluster composed of the second number of M2 cells, named the second cluster, name the single M1 cell in the first cluster as M1 single cell, name the single M2 cell in the second cluster as M2 single cell, label the M1 single cell, represented by the symbol P n represented by, label the M2 single cell, represented by the symbol Q i represented by, where n ∈ Z+ and i ∈ Z+, n is the serial number of P, i is the serial number of Q, and Z+ represents positive integers;

[0133] Step S201.4, perform image extraction on the M1 single cell P n and extract the RGB values of each pixel point in P n , which is marked as the M1 color value. The M1 color value of P n is expressed as C1(n,m), and C1(n,m) represents P nThe RGB value of the m-th pixel point, where m ∈ Z+; for the M2 single cell Q i Perform image extraction on i Extract the RGB value of each pixel point in i and mark it as the M2 color value. The M2 color value of i is denoted as C2(i,j). C2(i,j) represents the RGB value of the j-th pixel point in where j ∈ Z+. Here, C1(n,m) and C2(i,j) are only the numbers of RGB values, used to distinguish the RGB values of different pixel points in different cells. The representation format of the RGB value is (R, G, B), where R, G, and B represent the values of the red, green, and blue color channels respectively;

[0134] Step S201.5: Extract the R value, G value, and B value in C1(n,m), and mark them as R1(n,m), G1(n,m), and B1(n,m) in sequence; extract the R value, G value, and B value in C2(i,j), and mark them as R2(i,j), G2(i,j), and B2(i,j) in sequence;

[0135] Step S201.6: Collectively refer to R1(n,m), G1(n,m), B1(n,m), R2(i,j), G2(i,j), and B2(i,j) as single-channel color values, and perform further analysis on the single-channel color values to obtain the standard range of color values;

[0136] Step S201.6 includes the following sub-steps:

[0137] Step S201.6.a: Collectively refer to R1(n,m), G1(n,m), B1(n,m), R2(i,j), G2(i,j), and B2(i,j) as single-channel color values. For any single-channel color value, obtain its maximum color value and minimum color value to form a range interval, marked as the color value interval. Denote the maximum color value and minimum color value as CLmax and CLmin respectively, calculate (CLmax - CLmin) / 2 + CLmin, and retain the integer of the calculation result and mark it as the color value moving coverage number;

[0138] Step S201.6.b: Set a new interval from the minimum color value to the color value movement coverage number, marked as the color value movement interval. Name the minimum value and the maximum value of the color value movement interval as the moving minimum value and the moving maximum value respectively. Mark the single-channel color value being currently analyzed as the analyzed color value. Obtain the number of analyzed color values within the color value movement interval, marked as NF. Increase both the moving minimum value and the moving maximum value by one and obtain the range quantity again. Repeat the execution until the moving maximum value is equal to the color value maximum. Obtain the number of analyzed color values, marked as NG. Calculate NF / NG, and mark the calculation result as the color value proportion. Determine whether there is a case where the color value proportion is greater than or equal to the first proportion threshold among all the calculated color value proportions. If so, output a range sufficient signal; if not, output a range insufficient signal.

[0139] Step S201.6.c: If the range sufficient signal is output, subtract one from the color value movement coverage number, re-analyze the color value proportion, and re-determine whether there is a case where the color value proportion is greater than or equal to the first proportion threshold until the range insufficient signal is output. If the range insufficient signal is output, add one to the color value movement coverage number, re-analyze the color value proportion, and re-determine whether there is a case where the color value proportion is greater than or equal to the first proportion threshold until the range sufficient signal is output.

[0140] Step S201.6.d: After stopping the loop, use the movement interval that outputs the range sufficient signal as the color value standard interval for analyzing the color value, and analyze all the single-channel color values to obtain the R1 standard interval, the G1 standard interval, the B1 standard interval, the R2 standard interval, the G2 standard interval, and the B2 standard interval.

[0141] Step S202: Train the cell recognition deep learning model with the inflammatory sample images.

[0142] Step S202 includes the following sub-steps:

[0143] Step S202.1: Obtain the inflammatory sample images and label the inflammatory cells in the inflammatory sample images through artificial standards.

[0144] Step S202.2: Convert the inflammatory sample images into grayscale images, extract the grayscale values of the pixel points in the inflammatory cells, and mark them as the inflammatory grayscale values.

[0145] Step S202.3: Sort and number the inflammatory grayscale values in ascending order, and represent them with the symbol D h where h ∈ Z+ and h is the serial number of D. Establish a plane rectangular coordinate system with h as the X-axis and D h as the Y-axis, and name it the grayscale trend graph.

[0146] Step S202.4, for any inflammatory cell, arrange the inflammatory gray value according to D h Enter it into the gray value trend graph. Name the coordinate points in the gray value trend graph as gray value trend coordinate points. Connect the gray value trend coordinate points with a smooth curve in ascending order of h, and name the obtained curve as the gray value trend line. One inflammatory cell analysis yields one gray value trend line. Analyze the inflammatory cells in all inflammatory sample images to obtain a third quantity of gray value trend lines;

[0147] Step S202.5, mark the area between any two gray value trend lines as the trend area, and extract all the trend areas to form the gray value trend area;

[0148] Step S203, use the cell recognition deep learning model to divide macrophages and inflammatory areas in the preprocessed image;

[0149] Step S203 includes the following sub-steps:

[0150] Step S203.1, perform contour extraction on the preprocessed image through the contour extraction technique, and mark the extracted cells as cells to be analyzed;

[0151] Step S203.2, for any cell to be analyzed, extract the R value, G value, and B value of the RGB values of the pixel points in the cell to be analyzed, and mark them as AR, AG, and AB respectively. A range interval composed of ARs of different pixel points is marked as the AR interval, a range interval composed of AGs of different pixel points is marked as the AG interval, and a range interval composed of ABs of different pixel points is marked as the AB interval;

[0152] Step S203.3, analyze the AR interval, AG interval, and AB interval by analyzing the color value standard interval, and change the first proportion threshold in the analyzed color value standard interval to the second proportion threshold. Name the analyzed intervals as the AR to-be-recognized interval, AG to-be-recognized interval, and AB to-be-recognized interval respectively;

[0153] Step S203.4, respectively determine whether the AR to-be-recognized interval is within the R1 standard interval, whether the AG to-be-recognized interval is within the G1 standard interval, and whether the AB to-be-recognized interval is within the B1 standard interval. If all the judgment results are yes, output the M1-type macrophage signal, otherwise output the M2-type judgment signal;

[0154] Step S203.5, if the M2 property judgment signal is output, respectively judge whether the AR recognition interval is within the R2 standard interval, whether the AG recognition interval is within the G2 standard interval, and whether the AB recognition interval is within the B2 standard interval. If all the judgment results are yes, output the M2 property macrophage signal; otherwise, output the inflammatory judgment signal.

[0155] Step S203.6, if the inflammatory judgment signal is output, analyze whether the cell to be analyzed is an inflammatory cell.

[0156] Step S203.6 includes the following sub-steps:

[0157] Step S203.6.a, if the inflammatory judgment signal is output, analyze the cell to be analyzed by analyzing the gray-scale trend line. Mark the obtained gray-scale trend line as the trend line to be analyzed, put the trend line to be analyzed into the gray-scale trend chart, and judge whether the trend line to be analyzed is entirely within the gray-scale trend area. If so, output the inflammatory signal; otherwise, output the normal signal.

[0158] Step S203.6.b, if the M1 property macrophage signal is output, mark the cell to be analyzed as an M1 macrophage; if the M2 property macrophage signal is output, mark the cell to be analyzed as an M2 macrophage; if the inflammatory signal is output, mark the cell to be analyzed as an inflammatory cell; if the normal signal is output, mark the cell to be analyzed as a normal tissue cell.

[0159] Step S203.6.c, the area surrounded by the outermost inflammatory cells is the inflammation area.

[0160] Step S3, count the macrophages and inflammatory cells within the inflammation area, and output the regulation inspection result. Step S3 includes the following sub-steps:

[0161] Step S301, count the number of M1 macrophages and mark it as the M1 quantity.

[0162] Step S302, count the number of M2 macrophages and mark it as the M2 quantity.

[0163] Step S303, count the number of inflammatory cells and mark it as the inflammatory quantity.

[0164] Step S304, output the M1 quantity, M2 quantity, and inflammatory quantity as the regulation inspection result and upload it to the patient's inspection report.

[0165] Embodiment 3. The present application provides an electronic device, which may include: a processor, a communication interface, a memory, and a communication bus. Among them, the processor, the communication interface, and the memory complete communication with each other through the communication bus. The memory stores computer-readable instructions, and the processor can call the instructions in the memory. When the computer-readable instructions are executed by the processor, the steps in the image recognition and analysis method for cardiac macrophage inflammation regulation are run to achieve the following functions: observing and acquiring cell images through a fluorescence microscope, preprocessing the cell images to obtain preprocessed images; constructing a cell recognition deep learning model, and training the cell recognition deep learning model by extracting the fluorescence features of macrophages and the gray-scale features of inflammatory cells; counting macrophages and inflammatory cells in the inflammation area, and outputting a regulation inspection result.

[0166] In addition, when the logical instructions in the above-mentioned memory are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present application. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.

[0167] Embodiment 4. The present application also provides a computer-readable storage medium. The present application provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned image recognition and analysis method for cardiac macrophage inflammation regulation are run to achieve the following functions: observing and acquiring cell images through a fluorescence microscope, preprocessing the cell images to obtain preprocessed images; constructing a cell recognition deep learning model, and training the cell recognition deep learning model by extracting the fluorescence features of macrophages and the gray-scale features of inflammatory cells; counting macrophages and inflammatory cells in the inflammation area, and outputting a regulation inspection result.

[0168] Through the description of the above embodiments, the embodiments of the present invention can be provided as a method, a system or a computer program product. Based on such an understanding, the above technical solution, in essence, or the part that contributes to the prior art can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0169] In the embodiments provided in the present application, it should be understood that the disclosed system or method can be implemented in other ways. The above-described embodiments are merely illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods. For another example, multiple modules or units can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection between each other can be through some communication interfaces. The indirect coupling or communication connection of systems, modules, and units can be electrical, mechanical, or other forms.

[0170] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of each embodiment of the present application.

Claims

1. An image recognition and analysis method for regulating cardiac macrophage inflammation, characterized in that: The steps include: Observe and acquire cell images through a fluorescence microscope, pre-process the cell images, and obtain pre-processed images; Construct a deep learning model for cell recognition, train it by extracting the fluorescence features of macrophages and the grayscale features of inflammatory cells, divide the macrophages and inflammatory areas in the preprocessed images, and divide the functional states of macrophages; The deep learning model for cell recognition was trained using inflammation sample images; Training the deep learning model for cell recognition using inflammation sample images includes the following sub-steps: Acquire inflammation sample images, and annotate inflammatory cells in the inflammation sample images using manual standards; The inflammatory sample image is converted into a grayscale image, and the grayscale value of the pixel in the inflammatory cell is extracted and marked as the inflammatory grayscale value; The inflammatory gray values ​​are sorted and numbered in ascending order, and the symbol D h Indicates, where h∈Z+ and h is the serial number of D, with h as the X-axis, D h Establish a plane rectangular coordinate system for the Y axis and name it as the grayscale trend chart; For any inflammatory cell, the inflammatory gray value is calculated according to D h Enter the grayscale trend graph, name the coordinate points in the grayscale trend graph as grayscale trend coordinate points, connect the grayscale trend coordinate points through a smooth curve in the order of h from small to large, name the obtained curve as a grayscale trend line, analyze one inflammatory cell to obtain one grayscale trend line, analyze the inflammatory cells in all inflammatory sample images, and obtain the third number of grayscale trend lines; Mark the area between any two grayscale trend lines as a trend area, and extract all trend areas to form a grayscale trend area; The macrophages and inflammatory cells in the inflammatory area are counted and the control test results are output.

2. The image recognition and analysis method for regulating cardiac macrophage inflammation according to claim 1, characterized in that: Observe and obtain cell images through a fluorescence microscope, preprocess the cell images, and obtain preprocessed images, including the following sub-steps: Fluorescently staining macrophages with CD68 and CD206, wherein CD68 and CD206 are markers of M1 macrophages and M2 macrophages, respectively, wherein the functional state of the M1 macrophages is pro-inflammatory, and the functional state of the M2 macrophages is anti-inflammatory; Observe and obtain cell images through fluorescence microscopy; The contrast of the cell image is increased by a first value, and the brightness of the cell image is increased by a first value, to obtain a preprocessed image.

3. The image recognition and analysis method for regulating cardiac macrophage inflammation according to claim 2, characterized in that: Constructing a deep learning model for cell recognition, training the deep learning model by extracting the fluorescence features of macrophages and the grayscale features of inflammatory cells, and dividing the macrophages and inflammatory areas in the preprocessed image and dividing the functional states of macrophages includes the following sub-steps: Build a deep learning model for cell recognition and train it using macrophage sample images; Macrophages and inflammatory areas in the preprocessed images are segmented using a cell recognition deep learning model.

4. The image recognition and analysis method for regulating cardiac macrophage inflammation according to claim 3, characterized in that: Constructing a deep learning model for cell recognition. Training the deep learning model for cell recognition includes the following sub-steps: Acquire a macrophage sample image in which macrophages are fluorescently stained with CD68 and CD206, wherein the macrophage sample image is used to train a cell recognition deep learning model; Marking the stained cells in the macrophage sample image as stained cells, performing contour extraction on the macrophage sample image, extracting independent stained cells in the macrophage sample image, and manually marking the functional states of the stained cells, wherein the functional states include pro-inflammatory macrophages and anti-inflammatory macrophages, namely, M1 macrophages and M2 macrophages, which are named M1 cells and M2 cells, respectively; The first number of M1 cells is extracted and named as the first cluster. The second number of M2 cells is extracted and named as the second cluster. The single M1 cell in the first cluster is named as M1 single cell. The single M2 cell in the second cluster is named as M2 single cell. The M1 single cells are labeled and marked by the symbol P. n Indicates that the M2 single cells are labeled by the symbol Q i Indicates, where n∈Z+ and i∈Z+, n is the serial number of P, i is the serial number of Q, and Z+ represents a positive integer; M1 single cell P n Perform image extraction and extract P n The RGB value of each pixel in is marked as M1 color value, and the P n The M1 color value is expressed as C1(n,m), C1(n,m) represents P n The RGB value of the mth pixel in, m∈Z+; for M2 single cell Q i Perform image extraction and extract Q i The RGB value of each pixel is marked as M2 color value, and the Q i The M2 color value is represented by C2(i,j), and C2(i,j) represents Q i The RGB value of the jth pixel in , j∈Z+, where C1(n,m) and C2(i,j) are just the numbers of the RGB values, which are used to distinguish the RGB values ​​of different pixels in different cells. The format of the RGB value is (R,G,B), where R, G and B represent the values ​​of the red, green and blue color channels respectively; Extract the R value, G value and B value in C1(n,m), and mark them as R1(n,m), G1(n,m) and B1(n,m) respectively; extract the R value, G value and B value in C2(i,j), and mark them as R2(i,j), G2(i,j) and B2(i,j) respectively; R1(n,m), G1(n,m), B1(n,m), R2(i,j), G2(i,j) and B2(i,j) are collectively referred to as single-channel color values. The single-channel color values ​​are further analyzed to obtain the standard color value range.

5. The image recognition and analysis method for regulating cardiac macrophage inflammation according to claim 4, characterized in that: Further analysis of single channel color values ​​includes the following sub-steps: R1(n,m), G1(n,m), B1(n,m), R2(i,j), G2(i,j) and B2(i,j) are collectively referred to as single-channel color values. For any single-channel color value, obtain its maximum color value and minimum color value to form a range interval, marked as a color value interval, and denote the maximum color value and the minimum color value as CLmax and CLmin respectively. Calculate (CLmax-CLmin) / 2+CLmin, retain the calculation result as an integer and mark it as the color value moving coverage number; A new interval is set from the minimum color value to the color value movement coverage number, marked as the color value movement interval, the minimum value and the maximum value of the color value movement interval are named the movement minimum value and the movement maximum value respectively, the single-channel color value currently analyzed is marked as the analysis color value, the number of analysis color values ​​in the color value movement interval is obtained, marked as NF, the movement minimum value and the movement maximum value are increased by one and the range number is obtained again, and the execution is repeated until the movement maximum value is equal to the color value maximum value, the number of analysis color values ​​is obtained, marked as NG, NF / NG is calculated, and the calculation result is marked as the color value proportion, and it is determined whether there is a situation in all the calculated color value proportions that the color value proportion is greater than or equal to the first proportion threshold value, if so, a sufficient range signal is output, if not, an insufficient range signal is output; If a sufficient range signal is output, the color value movement coverage number is reduced by one, the color value proportion is re-analyzed, and whether the color value proportion is greater than or equal to the first proportion threshold is re-judged, until an insufficient range signal is output; if an insufficient range signal is output, the color value movement coverage number is increased by one, the color value proportion is re-analyzed, and whether the color value proportion is greater than or equal to the first proportion threshold is re-judged, until an sufficient range signal is output; After the loop is stopped, the moving interval of the output range sufficient signal is used as the standard interval of the color value for analyzing the color value, and all single-channel color values ​​are analyzed to obtain the R1 standard interval, G1 standard interval, B1 standard interval, R2 standard interval, G2 standard interval and B2 standard interval.

6. The image recognition and analysis method for regulating cardiac macrophage inflammation according to claim 5, characterized in that: The segmentation of macrophages and inflammatory areas in the preprocessed image using the cell recognition deep learning model includes the following sub-steps: The contour of the preprocessed image is extracted by using the contour extraction technology, and the extracted cells are marked as cells to be analyzed; For any cell to be analyzed, extract the R value, G value and B value of the RGB value of the pixel point in the cell to be analyzed, and mark them as AR, AG and AB respectively. The AR of different pixels forms a range interval, which is marked as AR interval. The AG of different pixels forms a range interval, which is marked as AG interval. The AB of different pixels forms a range interval, which is marked as AB interval. The AR interval, the AG interval, and the AB interval are analyzed by analyzing the color value standard interval, and the first proportion threshold in the analyzed color value standard interval is changed to the second proportion threshold, and the intervals obtained by the analysis are named AR interval to be identified, AG interval to be identified, and AB interval to be identified respectively; Respectively judge whether the AR to-be-identified interval is within the R1 standard interval, whether the AG to-be-identified interval is within the G1 standard interval, and whether the AB to-be-identified interval is within the B1 standard interval. If the judgment results are all yes, then output the M1 macrophage signal, otherwise output the M2 judgment signal; If the M2 judgment signal is output, it is judged whether the AR to-be-identified interval is within the R2 standard interval, whether the AG to-be-identified interval is within the G2 standard interval, and whether the AB to-be-identified interval is within the B2 standard interval. If the judgment results are all yes, the M2 macrophage signal is output, otherwise the inflammatory judgment signal is output; If an inflammatory determination signal is output, it is analyzed whether the cell to be analyzed is an inflammatory cell.

7. The image recognition and analysis method for regulating cardiac macrophage inflammation according to claim 5, characterized in that: Analyzing whether the cells to be analyzed are inflammatory cells includes the following sub-steps: If an inflammatory judgment signal is output, the cells to be analyzed are analyzed by analyzing the grayscale trend line, and the obtained grayscale trend line is marked as the trend line to be analyzed, and the trend line to be analyzed is placed in the grayscale trend chart to determine whether all the trend lines to be analyzed are in the grayscale trend area. If so, an inflammatory signal is output, otherwise a normal signal is output; If an M1 macrophage signal is output, the cells to be analyzed are marked as M1 macrophages; if an M2 macrophage is output, the cells to be analyzed are marked as M2 macrophages; if an inflammatory signal is output, the cells to be analyzed are marked as inflammatory cells; if a normal signal is output, the cells to be analyzed are marked as normal tissue cells; The area surrounded by the outermost inflammatory cells is the inflammatory area.

8. The image recognition and analysis method for regulating cardiac macrophage inflammation according to claim 7, characterized in that: Counting macrophages and inflammatory cells in the inflammatory area and outputting the control inspection results include the following sub-steps: The number of M1 macrophages was counted and labeled as M1 number; The number of M2 macrophages was counted and labeled as M2 number; The number of inflammatory cells was counted and labeled as inflammatory number; The M1 count, M2 count and inflammatory count are output as control examination results and uploaded to the patient's examination report.

9. An image recognition and analysis system for regulating cardiac macrophage inflammation, used to implement the image recognition and analysis method for regulating cardiac macrophage inflammation according to any one of claims 1 to 8, characterized in that: It includes an image preprocessing module, an image recognition module and an inspection output module; the image preprocessing module and the inspection output module are respectively connected to the image recognition module; The image preprocessing module is used to observe and acquire cell images through a fluorescence microscope, and preprocess the cell images to obtain preprocessed images; The image recognition module is used to build a deep learning model for cell recognition, and trains the deep learning model for cell recognition by extracting the fluorescence characteristics of macrophages and the grayscale characteristics of inflammatory cells, and divides the macrophages and inflammatory areas in the preprocessed image and divides the functional states of the macrophages; The inspection output module is used to count macrophages and inflammatory cells in the inflammatory area and output the control inspection results.

Citation Information

Patent Citations

  • Method and device for identifying inflammatory cells in image and storage medium

    CN111126162A