An image recognition-based urine sediment composition health monitoring method

CN122510164APending Publication Date: 2026-08-04NANTONG SHITONG MEDICAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NANTONG SHITONG MEDICAL TECHNOLOGY CO LTD
Filing Date
2026-04-17
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

[0005]因此,本发明提供了一种基于图像识别的尿液沉渣成分健康监测方法解决现有技术图像标准化处理不足及缺乏动态量化监测能力的问题

Benefits of technology

[0016] The beneficial effects of this invention are as follows: by obtaining standard sediment images, standardized compensation for complex sample backgrounds is achieved, improving the accuracy of detection and the repeatability of results; by obtaining sediment composition results, the precision and comprehensiveness of clinical component quantification indicators are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122510164A_ABST
    Figure CN122510164A_ABST
Patent Text Reader

Abstract

This invention discloses a health monitoring method for urine sediment composition based on image recognition, belonging to the field of medical image processing technology. The method includes: acquiring field-of-view images; filtering the field-of-view images; acquiring empty field-of-view images; preprocessing the filtered field-of-view images using the empty field-of-view images to obtain standard sediment images; training a convolutional network using historical standard sediment images to obtain historical basic feature maps and calculating the total regression loss, thereby completing the convolutional network training; obtaining basic feature maps from the trained convolutional network and summarizing them as the final detection result; calculating single-field-of-view counting results, single-field-of-view occupancy results, and single-field-of-view distribution results based on the final detection results of the standard sediment images, thereby obtaining the current counting result, current occupancy result, current distribution result, and current morphology result, and summarizing them to obtain the sediment composition result. This invention improves the accuracy and repeatability of the detection results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medical image processing technology, and in particular to a health monitoring method for urine sediment composition based on image recognition. Background Technology

[0002] Urine sediment analysis is a crucial step in clinical laboratory testing. It involves observing and counting formed elements (such as cells, casts, and crystals) in the sediment of centrifuged urine samples, providing key information for the diagnosis and monitoring of urinary system and other related diseases. Traditional testing methods primarily rely on manual microscopic examination by laboratory personnel under an optical microscope. This process requires professionals to rely on experience to identify, classify, and count the components in the field of view. With the development of digital technology, image recognition technology has been increasingly applied in this field, leading to semi-automated systems that acquire images of urine sediment through microscopic imaging systems and assist laboratory personnel in pre-classification and statistical analysis. These methods improve process efficiency and contribute to some standardization, forming the main research and application background in this technological field.

[0003] While existing image recognition-based methods for urine sediment analysis can provide assistance, they still face challenges in achieving high-precision automated monitoring. On the one hand, image standardization needs improvement. Urine samples have complex backgrounds, and image quality is easily affected by factors such as equipment status and sample preparation, directly impacting the accuracy and consistency of subsequent identification. On the other hand, existing methods often focus on generating single test results, offering insufficient support for dynamic health monitoring. The changing trends of urine sediment components over time are crucial dimensions for assessing disease progression and treatment effectiveness; however, conventional methods typically lack systematic integration in constructing time-series models of components and quantifying the intensity of changes, making it difficult to provide continuous, quantitative, dynamic monitoring data. Summary of the Invention

[0004] In view of the aforementioned existing problems, the present invention is proposed.

[0005] Therefore, this invention provides a health monitoring method for urine sediment composition based on image recognition, which solves the problems of insufficient image standardization processing and lack of dynamic quantitative monitoring capabilities in existing technologies.

[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution: This invention provides a health monitoring method for urine sediment composition based on image recognition. The method includes: acquiring field-of-view images; filtering the field-of-view images; acquiring empty field-of-view images; preprocessing the filtered field-of-view images using the empty field-of-view images to obtain standard sediment images; training a convolutional network using historical standard sediment images to obtain historical basic feature maps and calculating the total regression loss, thereby completing the convolutional network training; obtaining basic feature maps from the trained convolutional network and summarizing them as the final detection result; calculating single-field-of-view counting results, single-field-of-view occupancy results, and single-field-of-view distribution results based on the final detection results of the standard sediment images, thereby obtaining the current counting result, current occupancy result, current distribution result, and current morphology result, and summarizing them to obtain the sediment composition result; constructing a sediment composition matrix based on the sediment composition result and forming a time-series data set; comparing the sediment composition matrix element-by-element of adjacent time points to calculate the change in sediment composition and the overall change intensity of sediment, and summarizing the results to obtain the health monitoring result.

[0007] As a preferred embodiment of the image recognition-based urine sediment composition health monitoring method of the present invention, the field of view image includes a field of view microscope image and imaging parameters; the empty field of view image includes an empty field of view microscope image and the same imaging parameters as the field of view image.

[0008] As a preferred embodiment of the image recognition-based urine sediment composition health monitoring method of the present invention, the steps of acquiring and filtering the field of view image are as follows: acquiring the field of view image; performing grayscale processing on the field of view microscope image to obtain a field of view microscope grayscale image; establishing a coordinate system for the field of view microscope grayscale image and calculating the Laplacian operator for each pixel; counting the number of pixels in the field of view microscope grayscale image; calculating the average value of the Laplacian operator for all pixels in the field of view microscope grayscale image and calculating the grayscale clarity value of the field of view microscope grayscale image; setting a clarity threshold and filtering the field of view microscope grayscale images based on the clarity threshold.

[0009] As a preferred embodiment of the image recognition-based health monitoring method for urine sediment composition according to the present invention, the step of preprocessing the screened field-of-view images to obtain a standard sediment image by using open-field-of-view images includes the following steps: acquiring open-field-of-view images; performing grayscale processing on the open-field-of-view microscope images to obtain an open-field-of-view microscope grayscale image; calculating the median value of the grayscale value of each pixel in all open-field-of-view microscope grayscale images to obtain a reference background grayscale image; and calculating the grayscale value ratio between the open-field-of-view microscope grayscale image and the reference background grayscale image to obtain a flat-field corrected image; and normalizing the flat-field corrected image to obtain the standard sediment image.

[0010] As a preferred embodiment of the image recognition-based urine sediment composition health monitoring method of the present invention, the steps for obtaining the historical basic feature map are as follows: Load a standard sediment image, manually annotate the standard sediment image to obtain the visible sediment target category and the true bounding box, and record the standard sediment image as a single-channel input matrix; extract historical standard sediment images, record the historical standard sediment images as a single-channel input matrix, and define the structure of the first convolutional layer; perform boundary padding on the input matrix to obtain a padding matrix, perform convolution calculation on the padding matrix to obtain the first convolution output value, and perform nonlinear activation on the first convolution output to obtain the first basic feature map; continue to concatenate the second and third convolutional layers based on the first basic feature map to perform convolution calculations to obtain the historical basic feature map.

[0011] As a preferred embodiment of the image recognition-based urine sediment composition health monitoring method of the present invention, the steps for completing the convolutional network training are as follows: establishing the correspondence between the spatial locations of historical basic feature maps and the spatial locations of historical standard sediment images; establishing a bounding box prediction layer to obtain predicted bounding boxes; establishing a category prediction layer to determine the predicted category and prediction confidence value for each location; calculating the bounding box offset and the width and height of the true bounding box based on the corresponding positions of the true bounding box and the historical basic feature map, and calculating the bounding box regression loss with the predicted bounding box; calculating the category regression loss based on the predicted category and the category of the visible sediment target; summing the bounding box regression loss and the category regression loss to obtain the total regression loss, and iteratively updating it until the convergence condition is met; backpropagating the total regression loss and updating the convolution parameters layer by layer to obtain the trained convolutional network.

[0012] As a preferred embodiment of the image recognition-based urine sediment composition health monitoring method of the present invention, the summarization of the results into the final detection result is carried out in the following steps: inputting a standard sediment image into a trained convolutional network to generate a basic feature map; summarizing the predicted bounding box, predicted confidence value and predicted category of each position in the basic feature map to obtain the final detection result.

[0013] As a preferred embodiment of the image recognition-based urine sediment composition health monitoring method of the present invention, the steps for calculating the single-field counting result, single-field occupancy result, and single-field distribution result based on the final detection result of the standard sediment image are as follows: Extract the final detection result of each standard sediment image, count the number of each predicted category to obtain the single-field counting result; calculate the area of ​​the predicted bounding boxes for the same predicted category, sum the areas of each predicted bounding box to obtain the total area of ​​the category, calculate the total area of ​​the standard sediment image, and calculate the ratio of the total area of ​​the category to the total area of ​​the image to obtain the single-field occupancy result; extract the coordinates of the center point of the predicted bounding box, calculate the coverage area based on the maximum and minimum values ​​of the horizontal and vertical coordinates of the center point, and calculate the ratio of the coverage area to the total area of ​​the image to obtain the single-field distribution result.

[0014] As a preferred embodiment of the image recognition-based urine sediment composition health monitoring method of the present invention, the steps for summarizing the sediment composition results are as follows: The single-field counting results, single-field occupancy results, and single-field distribution results of all standard sediment images collected at the same time point are sorted in ascending order, and the median value is calculated to obtain the current counting result, current occupancy result, and current distribution result; the ratio of the current occupancy result to the current counting result is calculated to obtain the current morphology result; the results are summarized in the order of the current counting result, current occupancy result, current distribution result, and current morphology result to obtain category records, and the category records are arranged to obtain the sediment composition results.

[0015] As a preferred embodiment of the image recognition-based urine sediment composition health monitoring method of the present invention, the steps for summarizing the health monitoring results are as follows: Constructing a sediment composition matrix based on the sediment composition results and sorting it chronologically to generate a time-series data set; comparing the sediment composition matrices of adjacent time points element-by-element based on the time-series data set to calculate the changes in sediment composition for each category; performing root mean square calculation on the changes in sediment composition to obtain the overall change intensity of sediment; summarizing the sediment composition matrix, the changes in sediment composition, and the overall change intensity of sediment to obtain the health monitoring results.

[0016] The beneficial effects of this invention are as follows: by obtaining standard sediment images, standardized compensation for complex sample backgrounds is achieved, improving the accuracy of detection and the repeatability of results; by obtaining sediment composition results, the precision and comprehensiveness of clinical component quantification indicators are improved. Attached Figure Description

[0017] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. 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.

[0018] Figure 1 This is a flowchart of a health monitoring method for urine sediment composition based on image recognition.

[0019] Figure 2 This is a flowchart of the urine sediment image acquisition and preprocessing method.

[0020] Figure 3 This is a flowchart of the training process for a convolutional network.

[0021] Figure 4 A flowchart for obtaining the final test results.

[0022] Figure 5 The graph shows the changes in the composition of the sediment over time.

[0023] Figure 6 This is a graph showing the overall change intensity of sediment over time. Detailed Implementation

[0024] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0025] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.

[0026] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.

[0027] Reference Figures 1-6 This is one embodiment of the present invention, which provides a health monitoring method for urine sediment composition based on image recognition, including the following steps: S1. Acquire field-of-view images, filter the field-of-view images, acquire empty field-of-view images, and preprocess the filtered field-of-view images using the empty field-of-view images to obtain standard sediment images.

[0028] Acquire field-of-view images, and perform grayscale processing on the field-of-view microscope images to obtain field-of-view microscope grayscale images.

[0029] Furthermore, images of urine sediment samples were acquired using a microscope, with at least three fields of view images acquired at each time point.

[0030] It should be noted that a field of view image refers to a field of view containing visible urine sediment, including a field of view microscope image and imaging parameters; imaging parameters include magnification, exposure, white balance, and pixel size.

[0031] It should be noted that at least three field-of-view images were collected at each time point because three fields of view can cover the main area of ​​the urine sediment sample and reflect the heterogeneity of the urine sediment.

[0032] Each field-of-view microscope image is converted to grayscale to obtain a grayscale image. The pixel values ​​of the red, green, and blue channels for each pixel in the image are extracted. The pixel values ​​of the three color channels are then linearly weighted to obtain the grayscale value of the field-of-view microscope image, expressed as: ; in, This refers to the grayscale value of the field-of-view microscope image. The pixel value for the red channel. The pixel value is for the green channel. This represents the pixel value of the blue channel.

[0033] It should be noted that the weights corresponding to the three color channels are specified by the International Telecommunication Union (ITU-R BT.601) standard. The ITU-R BT.601 standard is a color conversion standard widely used in the fields of television broadcasting and digital video, and it is also applicable to the conversion of RGB images to grayscale images.

[0034] A coordinate system was established for the grayscale image of the field-of-view microscope, and the Laplacian operator was calculated pixel by pixel.

[0035] Furthermore, a two-dimensional coordinate system is established for the grayscale image of the field of view microscope, with the upper left corner of the grayscale image as the origin and a step size of 1 pixel. The horizontal axis represents the column index and increases to the right, while the vertical axis represents the row index and increases downward.

[0036] By calculating the second-order partial derivatives of the x and y coordinates of each pixel in the grayscale image of the field-of-view microscope, the Laplacian operator is obtained, and its expression is: ; in, The grayscale image of the field-of-view microscope is on the horizontal axis. y-axis The Laplace operator at the location, The grayscale image of the field-of-view microscope is on the horizontal axis. y-axis grayscale value at that location The x-coordinate of the pixel is The ordinate of the pixel is Let be the second partial derivative of the grayscale image from the field-of-view microscope on the horizontal axis. is the second partial derivative of the grayscale image of the field-of-view microscope on the vertical axis.

[0037] It should be noted that the expression for the second partial derivative of the grayscale image of a field-of-view microscope on the horizontal axis is: ; in, The grayscale image of the field-of-view microscope is on the horizontal axis. y-axis grayscale value at that location The grayscale image of the field-of-view microscope is on the horizontal axis. y-axis The grayscale value at that location.

[0038] The expression for the second partial derivative of the grayscale image in a field-of-view microscope along the vertical axis is: ; in, The grayscale image of the field-of-view microscope is on the horizontal axis. y-axis grayscale value at that location The grayscale image of the field-of-view microscope is on the horizontal axis. y-axis The grayscale value at that location.

[0039] The number of pixels in the grayscale image of the field-view microscope is counted. The average value of the Laplacian operator for all pixels in the grayscale image is calculated to obtain the Laplacian mean. The grayscale sharpness value of the grayscale image is then calculated using the following expression: ; in, This is the grayscale clarity value. The number of pixels. For pixel index, For the first Laplacian operator for pixels This is the Laplace mean.

[0040] Set a sharpness threshold and filter the grayscale images of the field-of-view microscope based on the sharpness threshold.

[0041] Furthermore, all grayscale clarity values ​​at the current time point are sorted in descending order and their medians are calculated to obtain the grayscale clarity median value. The absolute difference between each grayscale clarity value and the grayscale clarity median value is calculated to obtain the absolute deviation value. The absolute deviation values ​​are then sorted in ascending order and their medians are calculated to obtain the deviation median. Finally, the difference between the grayscale clarity median value and twice the deviation median value is calculated to obtain the clarity threshold.

[0042] It should be noted that the sharpness threshold is calculated by subtracting the median grayscale sharpness value from twice the median deviation value because it can retain sufficient field of view image while eliminating obviously out-of-focus images.

[0043] The grayscale clarity value is compared with the clarity threshold. When the grayscale clarity value is greater than the clarity threshold, the visual field image corresponding to the grayscale clarity value is marked as retained; when the grayscale clarity value is less than the clarity threshold, the visual field image corresponding to the grayscale clarity value is marked as discarded.

[0044] The number of visual field images marked as retained is counted. If the number of visual field images marked as retained is not less than 3, all visual field images marked as retained are retained, and all visual field images marked as rejected are rejected. If the number of visual field images marked as retained is less than 3, all marks are deleted. The median grayscale clarity of all visual field images is sorted in descending order. The 3 visual field images with the highest grayscale clarity values ​​are retained, and all other visual field images are rejected.

[0045] Acquire empty field-of-view images, and perform grayscale processing on the empty field-of-view microscope images to obtain empty field-of-view microscope grayscale images.

[0046] Furthermore, at least three empty field-of-view images are acquired while maintaining the same imaging parameters as the field-of-view images.

[0047] It should be noted that an empty field of view (OLP) refers to a field of view without visible urine sediment, meaning there are no obvious particles or cellular structures within the field of view. An OLP includes an OLP microscopic image and uses the same imaging parameters as an OLP image.

[0048] The empty field-view microscope image was processed in the same way as the grayscale processing of the field-view microscope image to obtain the grayscale image of the empty field-view microscope.

[0049] The median value of the grayscale value of each pixel in all empty field microscope grayscale images is calculated to obtain the reference background grayscale image. The grayscale value ratio between the field microscope grayscale image and the reference background grayscale image is calculated to obtain the flat field corrected image.

[0050] Furthermore, the grayscale values ​​of all empty-field microscope grayscale images are extracted one by one. For each pixel, the grayscale values ​​of all empty-field microscope grayscale images are arranged in ascending order, and the median value is extracted to obtain the reference background grayscale value. All reference background grayscale values ​​are summarized according to pixel position to obtain the reference background grayscale image. Pixel-by-pixel, the ratio of the grayscale value of each field-of-view microscope grayscale image to the grayscale value of the reference background grayscale image is calculated to obtain the flat-field corrected image of all field-of-view microscope grayscale images.

[0051] The maximum and minimum gray values ​​of the flat-field calibrated image are extracted, and the gray values ​​of all pixels in the flat-field calibrated image are normalized using the max-min normalization method to obtain a standard sediment image.

[0052] It should be noted that when the maximum and minimum gray values ​​of the flat-field calibrated image are equal, it means that all gray values ​​of the flat-field calibrated image are equal and cannot be normalized. The corresponding field-of-view microscope grayscale image is then marked as a bad image.

[0053] The number of grayscale images for all fields of view microscopes was counted, and each grayscale image was numbered sequentially starting from 1. The average value of each pixel of the flat-field corrected image of the unlabeled bad image was calculated to obtain the replacement image. The replacement image was then normalized together with other flat-field corrected images to obtain the standard sediment image.

[0054] S2. Train the convolutional network using historical standard sediment images to obtain historical basic feature maps, calculate the total regression loss, and then complete the training of the convolutional network. The basic feature maps are obtained through the trained convolutional network and summarized into the final detection results.

[0055] Load a standard sediment image, manually annotate the standard sediment image to obtain the visible sediment target category and the true bounding box, and record the standard sediment image as a single-channel input matrix.

[0056] Furthermore, a standard sediment image is loaded, and visible sediment targets in the standard sediment image are manually labeled using a labeling tool (any software that supports bounding box labeling is acceptable), thus obtaining the visible sediment target categories. The four sides of a rectangle are placed on the outermost layer of the visible sediment target's outline, ensuring the rectangle completely encloses the target and its four sides fit the target boundary, resulting in the true bounding box of the visible sediment target. The visible sediment target categories and true bounding boxes for each standard sediment image are then summarized to obtain the labeling result set.

[0057] It should be noted that the visible sediment targets include red blood cells (labeled 1), white blood cells (labeled 2), epithelial cells (labeled 3), casts (labeled 4), crystals (labeled 5), and bacteria (labeled 6).

[0058] It should be noted that the position coordinates of the top left corner and the bottom right corner of the actual bounding box are extracted to represent the size and position of the actual bounding box.

[0059] Extract historical standard sediment images, denote them as a single-channel input matrix, and define the structure of the first convolutional layer.

[0060] Furthermore, historical standard sediment images are extracted and denoted as a single-channel input matrix. The length of the input matrix is ​​the number of pixel columns in the historical standard sediment image, and the width of the input matrix is ​​the number of pixel rows in the historical standard sediment image.

[0061] Define the structure of the first convolutional layer, fixing the number of input channels to 1, the number of output channels to 32, the kernel size to 3×3, and the stride to 2.

[0062] It should be noted that the input to the first convolutional layer is a single-channel historical standard sediment image, so the number of input channels for the first convolutional layer is fixed at 1. The number of output channels is fixed at 32 to ensure that the number of control parameters and computational cost are not excessively increased while obtaining a sufficient number of basic local feature representations to cover the local edge, texture, and morphological features of various visible sediment targets in the historical standard sediment image. The kernel size is fixed at 3×3 to effectively extract local edge, texture, and morphological features from the historical standard sediment image. The stride is fixed at 2 to perform spatial downsampling while extracting local features in the first convolution, thereby reducing the size of subsequent feature maps and computational cost.

[0063] The input matrix is ​​filled with a fill width of 1 pixel to obtain the fill matrix.

[0064] It should be noted that boundary padding refers to adding a ring of pixels with a value of 0 around the input matrix to ensure that the 3×3 convolution can still be calculated at the boundary positions.

[0065] The filling matrix is ​​convolved to obtain the first convolution output value, and the first convolution output is non-linearly activated to obtain the first basic feature map.

[0066] Furthermore, a 3×3 convolution is performed on the padding matrix to obtain the first convolution output value, expressed as: ; in, For the first There are one output channel, with the horizontal axis being... The vertical axis is The first convolution output value; For output channel index; To fill the horizontal coordinate index of the matrix; For the y-coordinate index of the filling matrix; For the first Initial bias values ​​for each output channel; This refers to the local x-coordinate index of the convolution kernel; This is the local y-coordinate index of the convolution kernel; For the first One output channel, one unique input channel, and the x-coordinate within the core is... The ordinate of the core is Parameter values; As the only input channel, the x-axis is The vertical axis is The input value.

[0067] It should be noted that the bias term corresponding to each output channel is initialized to 0 to obtain the initial bias term; the first convolution kernel parameters have a total of 32 output channels and are a 3×3 matrix, therefore, the first convolution kernel parameters have a total of 288 parameters. Using the input channels and the spatial size of the first convolution kernel, the standard deviation of the initial distribution of the first convolution kernel parameters is calculated. The first convolution kernel parameters satisfy a normal distribution, and are truncated by three times the standard deviation, resulting in a value range of -1.4142 to 1.4142 for the first convolution kernel parameters. 288 first convolution kernel parameters are randomly generated within this range and assigned to the convolution kernels of the 32 output channels according to the generation order.

[0068] Specifically, the first convolutional layer has 1 input channel and a kernel size of 3×3, therefore the number of input connections for a single kernel is 9. The initial distribution standard deviation is calculated based on the number of input connections, expressed as: ; in, To initialize the standard deviation of the distribution.

[0069] The normal distribution is truncated by three standard deviations. The upper limit of the truncation is three times the positive standard deviation, which is 1.4142, and the lower limit is three times the negative standard deviation, which is -1.4142. The normal distribution truncation by three standard deviations is to retain the main initialization parameters and remove extreme parameters with excessively large absolute values, thereby controlling the initial convolution output amplitude.

[0070] The first convolution output value is non-linearly activated to obtain the first activation feature value. Each first convolution output value is compared with 0. If the first convolution output value is greater than 0, it is retained; if it is not greater than 0, it is set to 0. All first activation feature values ​​are arranged according to their original output channels and spatial order to obtain the first basic feature map.

[0071] Based on the first basic feature map, the second and third convolutional layers are concatenated to perform convolution calculations, resulting in the historical basic feature map.

[0072] Furthermore, using the first basic feature map as input, the second and third convolutional layers are concatenated to form a fixed three-layer convolutional feature extraction structure. The input channels of the second convolutional layer are fixed at 32, and the number of output channels is fixed at 64. The input channels of the third convolutional layer are fixed at 64, and the number of output channels is fixed at 128. The kernel size of both the second and third convolutional layers is fixed at 3×3, and the stride of both is fixed at 2. The second and third convolutional layers perform convolution calculations in the same order as the first convolutional layer. The second convolutional layer performs convolution operations on the first basic feature map and applies non-linear activation to obtain the second convolutional output value. All second convolutional output values ​​are arranged according to output channel and spatial position to obtain the second basic feature map. The third convolutional layer uses the second basic feature map as input to perform convolution operations and applies non-linear activation to obtain the third convolutional output value. All third convolutional output values ​​are arranged according to output channel and spatial position to obtain the historical basic feature map.

[0073] It should be noted that the first convolutional layer outputs 32 basic feature maps. When inputting into the second convolutional layer, each basic feature map passes through one input channel of the second convolutional layer, so the number of input channels of the second convolutional layer is fixed at 32. The number of output channels of the second convolutional layer is fixed at 64, which enhances the ability to express the morphological structure and texture patterns of sediment targets. The second convolutional layer outputs 64 second basic feature maps, so the number of input channels of the third convolutional layer is fixed at 64. The number of output channels of the third convolutional layer is fixed at 128, which can describe the complex morphological features, cellular structure features and micro-particle structure features of sediment targets in a higher-dimensional feature space.

[0074] A correspondence was established between the spatial locations of historical baseline feature maps and the spatial locations of historical standard sediment images. During the three-layer convolution process, the stride of each convolution was 2, and a total of three convolution calculations were performed. Therefore, after three convolution calculations, the spatial size of the historical standard sediment image was reduced by a factor of 8. Any position in the historical baseline feature map corresponds to the center coordinates of the historical standard sediment image at a ratio of 8 times the horizontal and vertical coordinates of the historical baseline feature map.

[0075] A bounding box prediction layer is built to obtain the predicted bounding boxes.

[0076] Furthermore, a bounding box prediction layer is established, with the number of input channels fixed at 128, the number of output channels fixed at 4, the kernel size fixed at 1×1, and the stride fixed at 1.

[0077] It should be noted that the number of input channels in the bounding box prediction layer is fixed at 128 because the number of output channels in the historical base feature map is 128; the number of output channels in the bounding box prediction layer is fixed at 4 because 4 prediction output parameters need to be calculated; the kernel size of the bounding box prediction layer is fixed at 1×1 to map the multi-channel features at each location to the required output dimension while keeping the spatial position unchanged, thus achieving position-by-position prediction; the stride of the bounding box prediction layer is fixed at 1 to ensure that the size of the bounding box prediction layer does not change.

[0078] The parameters of the bounding box prediction layer convolutional kernel are initialized using normal truncation, and the bias term of the bounding box prediction layer is initialized to 0. The four prediction parameters of the bounding box prediction layer are calculated, and the expressions are as follows: ; in, For the bounding box prediction layer One prediction parameter, For the bounding box prediction layer One bias term, Index of the number of input channels for the bounding box prediction layer. Index of the number of output channels of the bounding box prediction layer. For the bounding box prediction layer The prediction parameter, the first Convolution kernel parameters for each input channel, For the first The basic feature values ​​of each input channel.

[0079] It should be noted that the four prediction parameters are defined separately. Defined as the lateral offset of the predicted center. Defined as the longitudinal offset of the predicted center. Defined as the target width parameter. Defined as the target height parameter.

[0080] The coordinates of the center of the historical standard sediment image corresponding to the current position of the historical baseline feature map are summed with the horizontal and vertical offsets of the predicted center to obtain the center coordinates of the predicted bounding box. An exponential mapping is applied to the target width and target height parameters to obtain the predicted bounding box width and height. The horizontal and vertical offsets of the predicted center, the predicted bounding box width, and the predicted bounding box height are used as four prediction output parameters.

[0081] The x-coordinate and y-coordinate of the predicted bounding box center coordinates are calculated by subtracting from half the predicted bounding box width and half the predicted bounding box height, respectively, to obtain the coordinates of the top left corner of the predicted bounding box. The x-coordinate and y-coordinate of the predicted bounding box center coordinates are then summed with half the predicted bounding box width and half the predicted bounding box height, respectively, to obtain the coordinates of the bottom right corner of the predicted bounding box.

[0082] Establish a category prediction layer to determine the predicted category and prediction confidence value for each location.

[0083] Furthermore, a category prediction layer is established, with the number of input channels fixed at 128, the number of output channels fixed at 6, the kernel size fixed at 1×1, and the stride fixed at 1.

[0084] It should be noted that the number of output channels for the category prediction layer is fixed at 6 because there are a total of 6 categories of visible sediment targets.

[0085] The convolutional kernel parameters and bias terms of the category prediction layer are initialized using the same method as those of the bounding box prediction layer. The prediction scores for the six categories are calculated using the following expression: ; in, For the first The predicted score for the class, For the first Class prediction layer bias term, For the first The first category, the The parameters of the class prediction layer convolution kernel for each input channel of the class prediction layer. Category.

[0086] It should be noted that, For red blood cell prediction scores, White blood cell predictive score, Predicted score for epithelial cells, Predicted score for tubular cells, For crystallization prediction score, Predicted scores for bacteria.

[0087] Based on the predicted scores for the six categories, the predicted probability for each category is calculated as follows: ; in, For the first Predicted probability of class Indexed by the number of categories, For the first Predicted scores for each category.

[0088] For each position in the historical basic feature map, the highest prediction probability is selected as the prediction confidence value, and the category corresponding to the highest prediction probability is selected as the prediction category.

[0089] Based on the corresponding positions of the ground truth bounding box and the historical baseline feature map, calculate the bounding box offset, the width and height of the ground truth bounding box, and calculate the bounding box regression loss with the predicted bounding box.

[0090] Furthermore, the center coordinates of the true bounding box are calculated. The x-coordinate and y-coordinate of the true bounding box's center coordinates are each compared to 8 and rounded to the nearest integer to obtain the corresponding median coordinates of the true bounding box's center position in the historical feature map. The differences between the x-coordinate and y-coordinate of the true bounding box's center coordinates and the corresponding median coordinates of the historical feature map (8 times x and 8 times y) are calculated to obtain the true lateral offset and true vertical offset. The difference between the maximum and minimum x-coordinates of the true bounding box is calculated to obtain the true boundary width; the difference between the maximum and minimum y-coordinates of the true bounding box is calculated to obtain the true boundary height. The true lateral offset, true vertical offset, true boundary width, and true boundary height are used as the true output parameters.

[0091] The bounding box regression loss is calculated based on the true bounding box and the predicted bounding box, and the expression is as follows: ; ; in, To smooth the L1 loss function, For bounding box regression loss, For the first One actual output parameter, For the first Each prediction output parameter.

[0092] Based on the predicted category and the category of the visible sediment target, the category regression loss is calculated, expressed as follows: ; ; in, For the true first Category tags, For category regression loss, The category number represents the category of the visible sediment target. The total regression loss is calculated by summing the bounding box regression loss and the class regression loss, and then iteratively updated until the convergence condition is met.

[0093] Based on the total regression loss, partial derivatives are calculated for the bounding box prediction layer convolution kernel parameters, bounding box prediction layer bias terms, category prediction layer convolution kernel parameters, and category prediction layer bias terms to obtain the gradients of the bounding box prediction layer convolution kernel parameters, bounding box prediction layer bias terms, category prediction layer convolution kernel parameters, and category prediction layer bias terms.

[0094] Set the learning rate and update the convolutional kernel parameters of the bounding box prediction layer. The expression is: ; in, For learning rate, The gradient of the convolution kernel parameters is predicted for the bounding box.

[0095] It should be noted that the learning rate is set to 0.001 to ensure that the gradient updates are moderate.

[0096] Using the same method as obtaining the parameters of the updated bounding box prediction layer convolution kernel, calculate the updated bounding box prediction layer bias term, the updated class prediction layer convolution kernel parameter, and the updated class prediction layer bias term.

[0097] The next iteration is performed based on the updated bounding box prediction layer convolution kernel parameters, updated bounding box prediction layer bias terms, updated class prediction layer convolution kernel parameters, and updated class prediction layer bias terms. The predicted bounding boxes, predicted classes, and predicted confidence values ​​are recalculated, and the total regression loss is recalculated.

[0098] Set a convergence threshold, calculate the absolute difference between the total regression loss of the current iteration and the total regression loss of the previous iteration, and calculate the ratio of this ratio to the total regression loss of the previous iteration to obtain the loss reduction rate. Compare the loss reduction rate with the convergence threshold. If the loss reduction rate is not less than the convergence threshold, proceed to the next iteration. If the loss reduction rate is less than the convergence threshold, stop the iteration. Obtain the convolutional kernel parameters of the bounding box prediction layer, the bias term of the bounding box prediction layer, the convolutional kernel parameters of the class prediction layer, and the bias term of the class prediction layer after training, and obtain the corresponding predicted bounding boxes, predicted confidence values, and predicted classes.

[0099] It should be noted that the convergence threshold is set to 0.0001 to ensure that the training stops only after the loss decreases to a very small extent, thus avoiding insufficient training.

[0100] The total regression loss is backpropagated, and the convolution parameters are updated layer by layer to obtain the trained convolutional network.

[0101] Furthermore, the total regression loss is backpropagated, and the gradients of the convolution kernel parameters and bias terms of each layer are calculated layer by layer during the convolution calculation process. The same learning rate as the convolution kernel parameters of the bounding box prediction layer is used to update the convolution kernel parameters and bias terms of each layer. The training is completed by using a convergence threshold to obtain the trained convolution kernel parameters and bias terms of each layer.

[0102] The standard sediment image is input into the trained convolutional network to generate the basic feature map.

[0103] The predicted bounding box, predicted confidence value, and predicted category at each location in the basic feature map are summarized to obtain the final detection result.

[0104] S3. Calculate the single-field counting result, single-field occupancy result, and single-field distribution result based on the final detection result of the standard sediment image, and then obtain the current counting result, current occupancy result, current distribution result, and current morphology result, and summarize them to obtain the sediment composition result.

[0105] The final detection results are extracted from each standard sediment image, and the number of each predicted category is counted to obtain the single-field count results.

[0106] The area of ​​the predicted bounding boxes for the same predicted category is calculated, and the total area of ​​the category is obtained by summing the areas of each predicted bounding box. The total area of ​​the standard sediment image is calculated, and the ratio of the total area of ​​the category to the total area of ​​the image is calculated to obtain the single field-of-view occupancy result.

[0107] Furthermore, the area of ​​the predicted bounding box corresponding to each predicted category is calculated. The width and height of each predicted bounding box are extracted, and the product of the width and height is calculated to obtain the area of ​​the predicted bounding box. The areas of all predicted bounding boxes of the same predicted category are summed to obtain the total area of ​​the category. The image width and height of the standard sediment image are extracted, and the product of the image width and height is calculated to obtain the total area of ​​the image. The ratio of the total area of ​​the category to the total area of ​​the image is calculated to obtain the single-view occupancy result.

[0108] Extract the coordinates of the center point of the predicted bounding box, calculate the area of ​​the covered region based on the maximum and minimum values ​​of the x and y coordinates of the center point, and calculate the ratio of the area of ​​the covered region to the total area of ​​the image to obtain the single field of view distribution result.

[0109] Furthermore, the center point coordinates are extracted for the predicted bounding box corresponding to each predicted category, along with the coordinates of the leftmost, rightmost, topmost, and bottommost center points. The difference between the maximum and minimum values ​​of the center point coordinates on the horizontal axis is calculated to obtain the width of the coverage area, and the difference between the maximum and minimum values ​​on the vertical axis is calculated to obtain the height of the coverage area. The coverage area is calculated by multiplying the width and height of the coverage area, and then the ratio of the coverage area to the total image area is calculated to obtain the single-view distribution result.

[0110] The single-field counting results, single-field occupancy results, and single-field distribution results of all standard sediment images collected at the same time point are sorted in ascending order, and the median value is calculated to obtain the current counting result, current occupancy result, and current distribution result. A new quantitative index, the current morphology result, is constructed using the current occupancy result and the current counting result. The ratio of the current occupancy result to the current counting result is then calculated to obtain the current morphology result.

[0111] It should be noted that the current morphological results are used to represent the average proportion of an image occupied by a single predicted species.

[0112] The current counting results, current occupancy results, current distribution results, and current morphology results are summarized in order to obtain category records. The category records are then arranged in the order of red blood cells, white blood cells, epithelial cells, casts, crystals, and bacteria to obtain sediment composition results.

[0113] S4. Construct a sediment composition matrix based on the sediment composition results and form a time series data set. Compare the sediment composition matrix of adjacent time points element by element to calculate the change in sediment composition and calculate the overall change intensity of sediment. Then, summarize the health monitoring results.

[0114] A sediment composition matrix is ​​constructed based on the sediment composition results, and then sorted in chronological order to generate a time series data set.

[0115] Furthermore, for each time point, a sediment composition matrix is ​​constructed based on the sediment composition results. The rows of the sediment composition matrix represent six different types of sediment targets, and the columns of the sediment composition matrix represent the current counting result, current occupancy result, current distribution result, and current morphology result, respectively. The expression is as follows: ; in, For time points The composition matrix of the sediment at that time For the first Time point The current count result at that time, For the first Time point The current count result at that time, For the first Time point The current count result at that time, For the first Time point The current count result at that time, For the first Time point The current count result at that time, For the first Time point The current count result at that time, For the first Time point The current placeholder result at that time. For the first Time point The current placeholder result at that time. For the first Time point The current placeholder result at that time. For the first Time point The current placeholder result at that time. No. Time point The current placeholder result at that time. For the first Time point The current placeholder result at that time. For the first Time point The current display results at that time No. Time point The current display results at that time For the first Time point The current display results at that time For the first Time point The current display results at that time For the first Time point The current display results at that time For the first Time point The current display results at that time For the first Time point The current form result at that time, For the first Time point The current form result at that time, For the first Time point The current form result at that time, For the first Time point The current form result at that time, For the first Time point The current form result at that time, For the first Time point The current form of the result at that time.

[0116] To demonstrate the changes in sediment composition at different time points Figure 5 The graphs show the relationship between the current counting result, current occupancy result, current distribution result, and current shape result over time. Figure 5 By centralizing multiple sediment composition parameters of the same monitored object at consecutive time points within the same coordinate system, the evolution of sediment composition at different time points can be intuitively reflected. The current count result characterizes the quantity level of sediment targets at the current time point; the current occupancy result characterizes the proportion of the corresponding sediment target in the total image area; the current distribution result characterizes the distribution range and dispersion of sediment targets in the field of view; and the current morphology result reflects the average occupancy characteristics of a unit target. By displaying these four parameters together, the limitations of relying solely on a single quantitative indicator can be avoided, resulting in a more detailed and comprehensive depiction of the sediment composition state at the same time point.

[0117] The sediment composition matrix is ​​sorted according to time order to obtain a time series data set.

[0118] Based on the time series data set, the sediment composition matrix at adjacent time points is compared element by element to calculate the change in sediment composition for each category.

[0119] Furthermore, based on the time series data set, the sediment composition matrix at adjacent time points is compared element-by-element to calculate the degree of change in sediment composition. The current count, current occupancy, current distribution, and current morphology results are extracted from the sediment composition matrix at the current time point, as well as the corresponding current count, current occupancy, current distribution, and current morphology results from the sediment composition matrix at the previous time point, to obtain the sediment composition change, expressed as: ; in, For the first Class at a point in time The change in the composition of the sediment, For the first Class at a point in time The current count result, For the first Class at a point in time The current count result, For the first Class at a point in time The current placeholder result, For the first Class at a point in time The current placeholder result, For the first Class at a point in time The current exhibition results, For the first Class at a point in time The current exhibition results, For the first Class at a point in time The current form result, For the first Class at a point in time The current form of the result.

[0120] It should be noted that the current counting, occupancy, distribution, and morphology results characterize the state of urine sediment composition from four aspects: quantity, area occupancy, spatial dispersion, and individual morphological characteristics, respectively. The changes in sediment composition comprehensively reflect the overall changes of the same type of sediment component between adjacent time points. In other words, if any characteristic quantity changes significantly between adjacent time points, it will be reflected in the changes in sediment composition, demonstrating the overall intensity of changes in sediment composition. By summing the squares of the changes in each dimension and taking the square root, the mutual cancellation of changes in different directions can be avoided, and the sensitivity to abnormal changes can be enhanced.

[0121] The root mean square of the compositional changes of the six types of sediment was calculated to obtain the overall intensity of sediment variation.

[0122] To demonstrate the monitoring results of the overall changes in urine sediment composition, Figure 6 The curves show the relationship between the overall change intensity of sediment and time points. Figure 6 Using time points as the basis for horizontal changes and the overall change intensity of sediment as the vertical observation indicator, this method reflects the overall fluctuation and trend of sediment composition between adjacent time points. Figure 6 It emphasizes the expression of the overall degree of change in the context of time series, that is, by comprehensively considering the changes of various types of sediment components in the current counting results, current occupancy results, current distribution results, and current morphology results, a unified index that can characterize the overall state fluctuation level is formed. Through Figure 6It is possible to clearly observe whether the composition of urine sediment is in a relatively stable state, a continuously increasing state, or a state of significant fluctuation at different time points, thus better meeting the application purpose of "health monitoring".

[0123] The health monitoring results are obtained by summarizing the sediment composition matrix, the changes in sediment composition, and the overall change intensity of sediment.

[0124] In summary, this invention achieves standardized compensation for complex sample backgrounds by obtaining standard sediment images, thereby improving the accuracy and repeatability of detection results; and improves the precision and comprehensiveness of clinical component quantification indicators by obtaining sediment composition results.

[0125] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A method for health monitoring of urine sediment composition based on image recognition, characterized in that, include: Acquire field-of-view images, filter the field-of-view images, acquire empty field-of-view images, and preprocess the filtered field-of-view images using the empty field-of-view images to obtain standard sediment images. The convolutional network is trained using historical standard sediment images to obtain historical basic feature maps, and the total regression loss is calculated to complete the training of the convolutional network. The basic feature maps are obtained through the trained convolutional network and summarized into the final detection results. Based on the final detection results of the standard sediment image, the single-field counting result, single-field occupancy result, and single-field distribution result are calculated, and then the current counting result, current occupancy result, current distribution result, and current morphology result are obtained, and the sediment composition result is summarized. Based on the sediment composition results, a sediment composition matrix is ​​constructed and a time series data set is formed. The sediment composition matrix at adjacent time points is compared element by element to calculate the change in sediment composition, and the overall change intensity of sediment is calculated. Finally, the health monitoring results are summarized.

2. The method for health monitoring of urine sediment composition based on image recognition as described in claim 1, characterized in that, The field-of-view image includes a field-of-view microscope image and imaging parameters; The empty field image includes an empty field microscope image and the same imaging parameters as the field image.

3. The method for health monitoring of urine sediment composition based on image recognition as described in claim 2, characterized in that, The steps for acquiring and filtering the field-of-view images are as follows: Acquire field-of-view images, and perform grayscale processing on the field-of-view microscope images to obtain a grayscale image of the field-of-view microscope. Establish a coordinate system for the grayscale image of the field-of-view microscope and calculate the Laplacian operator pixel by pixel; The number of pixels in the grayscale image of the field of view microscope is counted, the average value of the Laplacian operator of all pixels in the grayscale image of the field of view microscope is calculated, and the grayscale clarity value of the grayscale image of the field of view microscope is calculated. Set a sharpness threshold and filter the grayscale images of the field-of-view microscope based on the sharpness threshold.

4. The method for health monitoring of urine sediment composition based on image recognition as described in claim 3, characterized in that, The step of preprocessing the filtered field-of-view images using empty field-of-view images to obtain standard sediment images is as follows: Acquire empty field-of-view images, and perform grayscale processing on the empty field-of-view microscope images to obtain empty field-of-view microscope grayscale images. The median value of the grayscale value of each pixel in all empty field microscope grayscale images is calculated to obtain the reference background grayscale image. The grayscale value ratio between the field microscope grayscale image and the reference background grayscale image is calculated to obtain the flat field corrected image. The flat-field correction image is normalized to obtain a standard sediment image.

5. The method for health monitoring of urine sediment composition based on image recognition as described in claim 1, characterized in that, The steps to obtain the historical basic feature map are as follows: Load a standard sediment image, manually annotate the standard sediment image to obtain the visible sediment target category and the true bounding box, and record the standard sediment image as a single-channel input matrix; Extract historical standard sediment images, denote the historical standard sediment images as a single-channel input matrix, and define the structure of the first convolutional layer; The input matrix is ​​padded to obtain a padded matrix. Convolution is performed on the padded matrix to obtain the first convolution output value. Nonlinear activation is then applied to the first convolution output to obtain the first basic feature map. Based on the first basic feature map, the second and third convolutional layers are concatenated to perform convolution calculations, resulting in the historical basic feature map.

6. The method for health monitoring of urine sediment composition based on image recognition as described in claim 5, characterized in that, The steps to complete the training of the convolutional network are as follows: Establish the correspondence between the spatial locations of historical basic feature maps and the spatial locations of historical standard sediment images; Establish a bounding box prediction layer to obtain the predicted bounding boxes; Establish a category prediction layer to determine the predicted category and prediction confidence value for each location; Based on the corresponding positions of the ground truth bounding box and the historical base feature map, calculate the bounding box offset, the width and height of the ground truth bounding box, and calculate the bounding box regression loss with the predicted bounding box. Calculate the category regression loss based on the predicted category and the category of the visible sediment target; The total regression loss is calculated by summing the bounding box regression loss and the class regression loss, and then iteratively updated until the convergence condition is met. The total regression loss is backpropagated, and the convolution parameters are updated layer by layer to obtain the trained convolutional network.

7. The method for health monitoring of urine sediment composition based on image recognition as described in claim 6, characterized in that, The results are summarized into the final detection results, and the steps are as follows: The standard sediment image is input into the trained convolutional network to generate a basic feature map. The predicted bounding box, predicted confidence value, and predicted category at each location in the basic feature map are summarized to obtain the final detection result.

8. The method for health monitoring of urine sediment composition based on image recognition as described in claim 1, characterized in that, The steps for calculating the single-field counting result, single-field occupancy result, and single-field distribution result based on the final detection result of the standard sediment image are as follows: The final detection results are extracted from each standard sediment image, and the number of each predicted category is counted to obtain the single field-of-view counting results. The area of ​​the predicted bounding boxes for the same predicted category is calculated, and the total area of ​​the category is obtained by summing the areas of each predicted bounding box. The total area of ​​the standard sediment image is calculated, and the ratio of the total area of ​​the category to the total area of ​​the image is calculated to obtain the single field-of-view occupancy result. Extract the coordinates of the center point of the predicted bounding box, calculate the area of ​​the covered region based on the maximum and minimum values ​​of the x and y coordinates of the center point, and calculate the ratio of the area of ​​the covered region to the total area of ​​the image to obtain the single field of view distribution result.

9. The method for health monitoring of urine sediment composition based on image recognition as described in claim 8, characterized in that, The steps to summarize the sediment composition results are as follows: The single-field counting results, single-field occupancy results, and single-field distribution results of all standard sediment images collected at the same time point are sorted in ascending order, and the median value is calculated to obtain the current counting result, current occupancy result, and current distribution result. The current shape result is obtained by calculating the ratio between the current occupancy result and the current count result; The current counting results, current occupancy results, current distribution results, and current morphology results are summarized in order to obtain category records. The category records are then arranged to obtain the sediment composition results.

10. The method for health monitoring of urine sediment composition based on image recognition as described in claim 1 or 9, characterized in that, The health monitoring results are obtained by summarizing them, and the steps are as follows: A sediment composition matrix is ​​constructed based on the sediment composition results, and then sorted in chronological order to generate a time series data set. Based on the time series data set, the sediment composition matrix at adjacent time points is compared element by element to calculate the change in sediment composition for each category. The root mean square calculation of the changes in sediment composition is used to obtain the overall intensity of sediment change. The health monitoring results are obtained by summarizing the sediment composition matrix, the changes in sediment composition, and the overall change intensity of sediment.