Urinary sediment analyzer and urinary sediment and urine color detection method
By using an image acquisition device and a deep neural network recognition model in the urine sediment analyzer, the urine color is directly detected, which solves the problem of high cost and low accuracy in the existing technology to detect urine color, and achieves efficient and accurate urine color detection.
Patent Information
- Application Number
- CN202510088167.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2019-09-30
- Publication Date
- 2025-05-06
AI Technical Summary
The prior art has problems of high cost and low accuracy when detecting urine color. Especially in urine sediment analyzers, it is impossible to effectively map RGB values to the corresponding color categories, resulting in deviations in the detection result.
The image acquisition device is used in the urine sediment analyzer to collect images of urine samples, and use color recognition models, especially deep neural network recognition models, to perform color recognition, and directly obtain the color of urine samples.
It realizes direct detection of urine color in the urine sediment analyzer, reducing detection costs, improving detection accuracy and improving user experience.
Smart Images

Figure CN119935912A_ABST
Abstract
Description
[0001] This application is an invention patent application (application date is September 30, 2019, application number is
[0002] 201910947603.5, a divisional application for the invention entitled “A method and analyzer for detecting urine color”. Technical Field
[0003] The present invention relates to the technical field of medical devices, and in particular to a urine sediment analyzer and a method for detecting urine sediment and urine color. Background Art
[0004] In modern medical clinical tests, urine color information is an important feature of the detection of formed components of urine sediment and can reflect the health status of the body.
[0005] At present, in the process of hospital testing, the color information of urine samples is mainly detected by dry chemical urine analyzers, such as color detection modules. This method drops the collected urine sample on a dry chemical test strip, soaks the test strip, and uses an RGB three-color light source to illuminate the test strip. Some light is reflected back from the test strip, and a receiver is used to receive the reflected light, and the RGB three-channel reflectivity is detected to detect the sample color. This method of adding a physical module to achieve color detection increases the cost, and because there will be problems such as clustering and adhesion in the urine sample image, the collection process is affected by the light source and other environments, and the color shift phenomenon of the R, G, B three-color vector space will occur during image collection. Therefore, under the influence of the image surface texture, lighting and shadow, this method can only simply extract the RGB space value, and cannot map the RGB value to the corresponding color category, and cannot understand that two different RGBs belong to the same color category.
[0006] In addition, the existing hospital laboratories that test urine components are either equipped with only urine dry chemical analyzers, or only equipped with urine sediment analyzers, or a cascade of the two. For hospitals equipped only with urine dry chemical analyzers, the urine color is detected by RGB three-channel reflectivity, so the actual color of the detected urine will be biased; for the laboratory departments that only have urine sediment analyzers, they can only install a color detection physical module, which increases the testing cost and may also face the problem of inaccurate color detection, affecting the accuracy of the final output report. Summary of the invention
[0007] The first purpose of the present invention is to provide a urine sediment analyzer, which collects the image of the urine sample to be tested by an image acquisition device, and inputs the image of the urine sample to be tested into a color recognition model to obtain the color of the urine sample to be tested, so that the user can directly detect the urine color in the urine sediment analyzer, thereby improving the user experience.
[0008] To achieve the above object, the present invention provides a solution: a urine sediment analyzer, comprising:
[0009] A urine providing device, the urine providing device is used to inject the urine sample to be tested into the counting pool;
[0010] A light source device, the light source device is used to emit light to illuminate the urine sample to be tested injected into the counting cell;
[0011] An objective lens, the objective lens is used to amplify the urine sample to be tested injected into the counting pool;
[0012] An image acquisition device, the image acquisition device is used to perform a camera operation on the urine sample to be tested in the counting pool through the objective lens to obtain an image of the urine sample to be tested;
[0013] A processing device is used to obtain a classification and counting result of formed components in the urine sample to be tested based on the image of the urine sample to be tested, and to determine the color of the urine sample to be tested based on the image of the urine sample to be tested and a urine color recognition model.
[0014] As an embodiment, obtaining the classification and counting results of the formed components in the urine sample to be tested based on the image of the urine sample to be tested includes: acquiring multiple images of the urine sample to be tested taken by the image acquisition device, and performing segmentation, feature extraction, classification recognition, and statistical counting on the multiple images of the urine sample to be tested to obtain the classification and counting results of the formed components in the urine sample to be tested.
[0015] As an embodiment, the acquiring the image of the urine sample to be tested includes: acquiring a first image of the urine sample to be tested corresponding to a first color mode;
[0016] Determining the color of the urine sample to be tested based on the image of the urine sample to be tested and the urine color recognition model includes: converting the first image of the urine sample to be tested to obtain a second image of the urine sample to be tested in a second color mode; inputting the second image information of the urine sample to be tested into the urine color recognition model to determine the color of the urine sample to be tested.
[0017] As an embodiment, the inputting the second image information of the urine sample to be tested into the urine color recognition model to determine the color of the urine sample to be tested includes: inputting the pixel values of different pixel points of the second image of the urine sample to be tested into the color recognition model to obtain the color confidence of the second image of the urine sample to be tested; and determining the color information of the urine sample to be tested based on the color confidence of the second image;
[0018] And / or, the urine color recognition model is a deep neural network recognition model.
[0019] As an implementation manner, the first color mode is an RGB color mode;
[0020] The second color mode is the HSV color mode, the HSL color mode, the HIS color mode, the YUV color mode, or the LAB color mode.
[0021] As an embodiment, the first color mode includes a first channel, a second channel and a third channel, the first image of the urine sample to be tested includes a plurality of pixels, each pixel having a pixel value corresponding to the first channel, the second channel and the third channel;
[0022] The converting the first image of the urine sample to be tested to obtain the second image of the urine sample to be tested in a second color mode includes: performing a color mode conversion operation on the pixel values of each pixel point in the first channel, the second channel, and the third channel of the first image of the urine sample to be tested, and obtaining the pixel values of the corresponding pixel point in the fourth channel, the fifth channel, and the sixth channel of the second color mode.
[0023] As an implementation manner, before the image acquisition device performs a photographing operation on the urine sample to be tested in the counting pool through the objective lens, the image acquisition device is subjected to a white balance adjustment.
[0024] As an embodiment, the image acquisition device is further used to respectively perform a camera operation on the multiple calibration urine samples in the counting pool through the objective lens to obtain a first image of the multiple calibration urine samples corresponding to the first color mode;
[0025] The processing device comprises a conversion unit, the conversion unit is used to convert the first images of the plurality of calibration urine samples to obtain the second images of the plurality of calibration urine samples in a second color mode, and is used to convert the first image of the urine sample to be tested to obtain the second image of the urine sample to be tested in the second color mode;
[0026] The processing device further comprises a pattern recognition unit, which is used to perform pattern recognition training on the second images of the plurality of calibration urine samples to obtain the urine color recognition model.
[0027] As an implementation method, the pattern recognition training is deep neural network training;
[0028] And / or, performing pattern recognition training on the second images of the multiple calibrated urine samples to obtain a urine color recognition model includes: performing deep neural network pattern recognition on the pixel values of different pixel points of the second images of the multiple calibrated urine samples to obtain color confidences corresponding to the multiple calibrated urine samples.
[0029] As an implementation manner, before the image acquisition device respectively performs an imaging operation on the plurality of calibration urine samples in the counting pool through the objective lens, the image acquisition device is subjected to a white balance adjustment;
[0030] And / or, before the pattern recognition unit performs pattern recognition training on the second images of the multiple calibration urine samples, the second images of the multiple calibration urine samples are preprocessed.
[0031] As an embodiment, the first color mode includes a first channel, a second channel and a third channel, each of the first images of the plurality of calibration urine samples includes a plurality of pixels, and each pixel has a pixel value corresponding to the first channel, the second channel and the third channel;
[0032] The converting the first images of the plurality of calibration urine samples to obtain second images of the plurality of calibration urine samples in a second color mode comprises:
[0033] After performing a color mode conversion operation on the pixel values of each pixel point in the first channel, the second channel, and the third channel in each of the first images of the multiple calibrated urine samples, the pixel values of the corresponding pixel point in the fourth channel, the fifth channel, and the sixth channel of the second color mode are obtained.
[0034] A second object of the present invention is to provide a urine sediment analyzer, the urine sediment analyzer comprising:
[0035] A urine providing device, the urine providing device is used to inject the urine sample to be tested into the counting pool;
[0036] A urine sediment detection module, which is used to perform classification counting detection and color detection of formed components on the urine sample to be tested in the counting pool;
[0037] A processing device is used to obtain the classification and counting results of the formed components in the urine sample to be tested and the color of the urine sample to be tested according to the detection information of the urine sediment detection module.
[0038] As an embodiment, the urine sediment detection module includes an objective lens and an image acquisition device, the objective lens is used to amplify the urine sample to be tested injected into the counting pool; the urine sediment detection module performs classification counting detection and color detection of formed components on the urine sample to be tested in the counting pool, including: the image acquisition device performs a camera operation on the urine sample to be tested in the counting pool through the objective lens to obtain an image of the urine sample to be tested; the classification counting result of the formed components in the urine sample to be tested and the color of the urine sample to be tested are obtained according to the detection information of the urine sediment detection module, including: obtaining the classification counting result of the formed components in the urine sample to be tested and the color of the urine sample to be tested according to the image of the urine sample to be tested;
[0039] Alternatively, the urine sediment detection module includes an objective lens, an image acquisition device, a light source device and a receiver;
[0040] The objective lens is used to amplify the urine sample to be tested injected into the counting pool;
[0041] The image acquisition device is used to perform a camera operation on the urine sample to be tested in the counting pool through the objective lens to obtain an image of the urine sample to be tested;
[0042] The light source device is used to illuminate the urine sample to be tested injected into the counting cell;
[0043] The receiver is used to receive the transmitted light irradiated by the light source device and formed by passing through the urine sample to be tested;
[0044] The urine sediment detection module performs classification counting detection of formed components on the urine sample to be tested in the counting pool, including: the image acquisition device performs a camera operation on the urine sample to be tested in the counting pool through the objective lens to obtain an image of the urine sample to be tested;
[0045] The urine sediment detection module performs color detection on the urine sample to be tested in the counting pool, including: the receiver receives the transmitted light irradiated by the light source device and formed by passing through the urine sample to be tested, and obtains the wavelength of the transmitted light;
[0046] The step of obtaining the classification and counting result of the formed components in the urine sample to be tested according to the detection information of the urine sediment detection module comprises: obtaining the classification and counting result of the formed components in the urine sample to be tested according to the image of the urine sample to be tested;
[0047] The obtaining the color of the urine sample to be tested according to the detection information of the urine sediment detection module comprises: obtaining the color of the urine sample to be tested according to the wavelength of the transmitted light;
[0048] Alternatively, the urine sediment detection module includes an objective lens, an image acquisition device, a light source device and a receiver;
[0049] The objective lens is used to amplify the urine sample to be tested injected into the counting pool;
[0050] The image acquisition device is used to perform a camera operation on the urine sample to be tested in the counting pool through the objective lens to obtain an image of the urine sample to be tested;
[0051] The light source device is used to illuminate the urine sample to be tested injected into the counting cell;
[0052] The receiver is used to receive reflected light irradiated by the light source device and reflected by the urine sample to be tested;
[0053] The urine sediment detection module performs classification counting detection of formed components on the urine sample to be tested in the counting pool, including: the image acquisition device performs a camera operation on the urine sample to be tested in the counting pool through the objective lens to obtain an image of the urine sample to be tested;
[0054] The urine sediment detection module performs color detection on the urine sample to be tested in the counting pool, including: the receiver receives the reflected light irradiated by the light source device and reflected by the urine sample to be tested, and obtains the wavelength of the reflected light;
[0055] The step of obtaining the classification and counting result of the formed components in the urine sample to be tested according to the detection information of the urine sediment detection module comprises: obtaining the classification and counting result of the formed components in the urine sample to be tested according to the image of the urine sample to be tested;
[0056] The obtaining the color of the urine sample to be tested according to the detection information of the urine sediment detection module includes: obtaining the color of the urine sample to be tested according to the wavelength of the reflected light.
[0057] As an embodiment, obtaining the classification and counting result of the formed components in the urine sample to be tested according to the image of the urine sample to be tested includes: acquiring multiple images of the urine sample to be tested taken by the image acquisition device, decomposing, feature extracting, classifying and identifying, and statistically counting the multiple images of the urine sample to be tested, and obtaining the classification and counting result of the formed components in the urine sample to be tested;
[0058] And / or, the acquiring the image of the urine sample to be tested includes: acquiring a first image of the urine sample to be tested corresponding to a first color mode;
[0059] The obtaining the color of the urine sample to be tested according to the image of the urine sample to be tested comprises: converting the first image of the urine sample to be tested to obtain a second image of the urine sample to be tested in a second color mode; inputting the second image information of the urine sample to be tested into the urine color recognition model to determine the color of the urine sample to be tested;
[0060] The step of inputting the second image information of the urine sample to be tested into the urine color recognition model to determine the color of the urine sample to be tested includes: inputting the pixel values of different pixel points of the second image of the urine sample to be tested into the color recognition model to obtain the color confidence of the second image of the urine sample to be tested; and determining the color information of the urine sample to be tested based on the color confidence of the second image.
[0061] The third object of the present invention is to provide a method for detecting urine sediment and urine color, the detection method comprising:
[0062] Controlling the urine providing device to inject the urine sample to be tested into the counting pool;
[0063] Controlling the image acquisition device to perform a camera operation on the urine sample to be tested in the counting pool through an objective lens to obtain an image of the urine sample to be tested;
[0064] Obtaining classification and counting results of formed components in the urine sample to be tested according to the image of the urine sample to be tested;
[0065] The color of the urine sample to be tested is determined according to the image of the urine sample to be tested and a urine color recognition model.
[0066] As an embodiment, obtaining the classification and counting result of the formed components in the urine sample to be tested according to the image of the urine sample to be tested includes: acquiring multiple images of the urine sample to be tested taken by the image acquisition device, decomposing, feature extracting, classifying and identifying, and statistically counting the multiple images of the urine sample to be tested, and obtaining the classification and counting result of the formed components in the urine sample to be tested;
[0067] And / or, the acquiring the image of the urine sample to be tested includes: acquiring a first image of the urine sample to be tested corresponding to a first color mode;
[0068] Determining the color of the urine sample to be tested according to the image of the urine sample to be tested and the urine color recognition model includes: converting the first image of the urine sample to be tested to obtain a second image of the urine sample to be tested in a second color mode; inputting the second image information of the urine sample to be tested into the urine color recognition model to determine the color of the urine sample to be tested;
[0069] The step of inputting the second image information of the urine sample to be tested into the urine color recognition model to determine the color of the urine sample to be tested includes: inputting the pixel values of different pixel points of the second image of the urine sample to be tested into the color recognition model to obtain the color confidence of the second image of the urine sample to be tested; and determining the color information of the urine sample to be tested based on the color confidence of the second image.
[0070] The urine sediment analyzer and the method for detecting urine sediment and urine color provided by the present invention can obtain the classification counting results of the formed components in the urine sample to be tested and the color of the urine sample to be tested according to the image of the urine sample to be tested acquired by the image acquisition device, so that the user can directly detect the urine color in the urine sediment analyzer, that is, directly detect the color of the urine sample through the urine sediment detection module, and there is no need to add a physical module to the urine sediment analyzer to detect the color of the urine sample, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying creative work.
[0072] Figure 1 A hardware structure diagram of a urine sediment analyzer in one embodiment of the present application;
[0073] Figure 2 is a schematic diagram of an image to be processed in an embodiment of the present application;
[0074] Figure 3 This is a flowchart of the steps of a urine color detection method in one embodiment of the present application;
[0075] Figure 4 This is a flow chart of the steps of a urine color detection method in another embodiment of the present application. DETAILED DESCRIPTION
[0076] The present invention is further described in detail below by specific embodiments in conjunction with the accompanying drawings. Wherein similar elements in different embodiments adopt associated similar element numbers. In the following embodiments, many detailed descriptions are for making the present application better understood. However, those skilled in the art can easily recognize that some features can be omitted in different situations, or can be replaced by other elements, materials, methods. In some cases, some operations related to the present application are not shown or described in the specification, this is to avoid the core part of the present application being overwhelmed by too much description, and for those skilled in the art, it is not necessary to describe these related operations in detail, and they can fully understand the related operations according to the description in the specification and the general technical knowledge in the art.
[0077] In addition, the features, operations or characteristics described in the specification can be combined in any appropriate manner to form various implementations. At the same time, the steps or actions in the method description can also be interchanged or adjusted in a manner that is obvious to those skilled in the art. Therefore, the various sequences in the specification and the drawings are only for the purpose of clearly describing a certain embodiment and are not meant to be a required sequence, unless otherwise specified that a certain sequence must be followed.
[0078] Urine sediment refers to the formed elements in urine, such as red blood cells, white blood cells and bacteria in urine; laminar flow refers to the flow of fluid particles without mixing with each other and with an orderly movement trajectory; the counting pool refers to the thin layer plate structure produced, and the urine sample is tested to form a laminar flow under the action of the sheath fluid.
[0079] A calibrated urine sample is a urine sample of known color that has been manually identified.
[0080] The present invention provides a urine color detection method and analyzer. The method converts the urine sample image into color space to obtain sample set data, performs deep neural network training on the sample set data to obtain a color recognition model, and inputs the urine sample to be tested into the color recognition model. The color of the urine sample to be tested can be obtained, so that the user can directly detect the urine color in the urine sediment analyzer, thereby improving the user experience and the accuracy of urine color detection.
[0081] Embodiment 1
[0082] The present embodiment provides a urine sediment analyzer. First, a calibration urine sample and a urine sample to be tested are obtained. The urine sample is input into a counting pool placed on a microscope stage through a urine providing device. After the inner cavity of the counting pool is filled with the urine sample to be tested, the injection valve of the urine providing device is closed. The urine sample to be tested is stationary and relies on gravity to allow cells and other formed elements to settle onto a glass slide under the counting pool and be evenly distributed in the counting pool, so that the cells and other formed elements have a consistent focal plane of the microscope objective.
[0083] Select the shooting areas of the calibration urine sample and the urine sample to be tested respectively, and divide the shooting areas of the calibration urine sample and the urine sample to be tested into multiple viewing areas; control the driving device to the predetermined positions of the multiple viewing areas, and obtain multiple images shot by the image acquisition device; identify the concentration of the formed components of the multiple images; and then segment, extract features, classify and identify each image, count and finally output the results. The formed components of urine include epithelium, casts, crystals, cells and bacteria.
[0084] See also Figure 1 , which is a hardware structure diagram of a urine sediment analyzer in an embodiment of the present application. The urine sediment analyzer 50 may include a storage device 502, a display screen 506, a microscope 514, and a controller 500 connected or controlled by a connection 516 to the storage device 502, the display screen 506, and the microscope 514. Among them, the microscope 514 includes a light source device 504, a counting pool 508, an image acquisition device 510, and an objective lens 512. The counting pool 508 can be arranged on a sample table, and moved along a first direction or a second direction under the drive of a driving mechanism to adjust the position of the counting pool 508, so as to form different shooting positions on the counting pool 508, wherein the first direction is perpendicular to the second direction and is located in the same plane; the microscope 514 may also include different types of objective lenses 512 (such as high-power lenses and low-power lenses), and the objective lens 512 is used to magnify the liquid sample (including but not limited to urine samples or reference samples) loaded in the counting pool 508; the image acquisition device 510 performs a shooting operation on the liquid sample in the counting pool 508 through the objective lens 512. In this embodiment, when the liquid sample loaded into the counting pool 508 is photographed, the controller 500 can control the light source device 504 to emit light to illuminate the liquid sample loaded into the counting pool 508, the controller 500 can control the driving mechanism to move the counting pool 508 to a preset photographing position, and select the high-power lens or the low-power lens in the objective lens 512 to aim at the counting pool 508, the controller 500 performs a photographing operation on the preset photographing position of the counting pool 508 through the image acquisition device 510 and the objective lens 512, and acquires one or more to-be-processed images 530 (shown in FIG. 5 ) corresponding to the urine sample. Figure 2 ). The urine sample contains urine sediment 532, and the urine sediment 532 may include formed elements such as red blood cells, white blood cells, bacteria, yeast, crystals, casts, and epithelial cells. In one embodiment, the controller 500 may control the objective lens 512 to be in different positions, such as adjusting the position of the objective lens 512 in a third direction for focusing processing, wherein the third direction may be perpendicular to the plane formed by the first direction and the second direction.
[0085] Before performing the video recording operation on the urine sample injected into the counting pool, it is necessary to adjust the white balance of the image acquisition device 510, specifically, turn on the urine sediment analyzer, pour the cleaning fluid into the counting pool of the urine sediment analyzer 50, select the microscope field of view of the counting pool plane to take pictures, obtain image information, ensure that the microscope field of view is clear and without interference, and restore the color and tone of the cleaning fluid.
[0086] In this embodiment, the multiple calibration urine sample images 530 collected by the image acquisition device have a first color mode, the first color mode includes a first channel, a second channel and a third channel, each first image of the calibration urine sample includes a plurality of pixels, each pixel has a corresponding pixel value of the first channel, the second channel and the third channel. If the first color mode is an RGB mode, that is, the multiple calibration urine sample images 530 include a first channel red channel R, a second channel green channel G and a third channel blue channel B, each pixel in the multiple calibration urine sample images 530 includes a pixel value on the red channel R, a pixel value on the green channel G and a pixel value on the blue channel B.
[0087] In one embodiment, the urine samples of known colors may be red, black, green, blue, etc., and the urine samples of these colors are calibrated into color categories after artificial color recognition, and there is at least one urine sample of each color type. The urine samples classified by color category are respectively injected into the counting pool, and after the formed components in the urine are fully precipitated, the image acquisition device 510 of the urine sediment analyzer 50 performs a camera operation on the urine samples of different color categories that have been manually calibrated, and obtains the first image of multiple calibrated urine samples in the first color mode RGB.
[0088] After collecting images of urine samples of different colors, first images of urine samples of different color categories in RGB color mode are obtained, and the first images of urine samples with artificially calibrated colors constitute a calibration sample set.
[0089] The processing device 515 of the urine sediment analyzer is connected to the image acquisition device 510. The processing device 515 includes a conversion unit 5151. The conversion unit 5151 is used to convert the first image in the RGB color mode in the calibration sample set to obtain the second image of multiple calibration urine samples in the second color mode, including controlling the color mode conversion operation of each pixel point in the first channel red channel, the second channel green channel and the third channel blue channel of each calibration urine sample to obtain the pixel value of the corresponding pixel point in the fourth, fifth and sixth channels of the second color mode. In this embodiment, the second color mode is HSV, and in other embodiments, it can also be HSL, HIS, YUV, LAB and other color modes. The second image is the calibration urine sample image in the HSV color mode, the fourth channel is the hue H channel, the fifth channel is the saturation S channel, and the sixth channel is the brightness V channel.
[0090] Specifically, the first image of the calibrated urine sample acquired in the RGB color mode by the image acquisition device 510 is converted into the second image in the HSV color mode. The process is as follows: the values of the R, G, and B channels of all pixels in the acquired calibrated urine sample image 530 in the RGB color mode are converted into the values of the H, S, and V channels corresponding to the pixels in the HSV color space using the following formula.
[0091] Max=max(R,G,B) Formula (1)
[0092] Min=min(R,G,B) Formula (2)
[0093]
[0094]
[0095] V= Max Formula (5)
[0096] Among them: R, G, B represent the R, G, B values of a pixel in the image, Max and Min are the maximum and minimum values of R, G, B respectively, and H, S, V represent the corresponding H, S, V values in the HSV color space after conversion.
[0097] The processing device 515 of the urine sediment analyzer 50 also includes a pattern recognition unit 5152. The pattern recognition unit 5152 performs pattern recognition training on the second images of multiple calibrated urine samples to obtain a urine color recognition model. In this application, a deep neural network algorithm is used to perform pattern recognition training on the second image to obtain the color confidence corresponding to the multiple calibrated urine samples. In addition, the control pattern recognition unit 5152 performs preprocessing on the second images of multiple calibrated urine samples, including unifying the image size, such as scaling and transforming it to 200*200; or performing data enhancement, including rotation, flipping, cropping, etc., to facilitate the unification of the collected sample set data and improve recognition efficiency.
[0098] Specifically, urine samples of different color categories in the calibration sample set are a subset, for example, the sample set includes a red sample set, a blue sample set, a black sample set, and a green sample set, and each set includes 20 different patient urine samples. For example, each of the 20 different red patient samples obtains multiple first RGB images in the RGB color mode, and each photo of a single red sample has multiple pixels, each pixel corresponds to different values of the three channels of R, G, and B. After algorithm conversion, the RGB value of the pixel in each photo is converted into the HSV value of the HSV color space, and multiple photos of a single red sample have a second image corresponding to the HSV color space. In this way, multiple RGB images of a single red sample are converted into HSV images, and there are 20 different HSV images of 20 manually labeled red samples of different patients; each obtained HSV image information is subjected to deep neural network training. In other embodiments, other methods can also be used for color recognition training, such as using a color comparison table in a color space to determine the color of a urine sample. That is, for the multiple HSV images of the 20 samples in this set that have been calibrated as red, after software calculation, it may be concluded that the colors are red, reddish brown, brown, etc.; because when the HSV image data is input, it already carries the information that the sample is a calibrated color such as red, so for the red, reddish brown, brown, etc. colors obtained by the software operation, red is selected as the color confidence of the sample, and the software will adjust the operation algorithm according to the selected red confidence, so that the results of running multiple HSV images of each sample are all red. For urine samples of other colors, such as calibrated black, blue, and green, the same deep neural network algorithm is used for training, and ultimately the color confidence of each calibrated urine sample is guaranteed to be the color of the manually calibrated urine sample. After training the calibrated samples of different color subsets in the sample set, an accurate and stable urine color recognition model can be obtained.
[0099] After obtaining the trained urine color recognition model, for the urine sample to be tested, the image acquisition device is also used to perform a camera operation on the urine sample to be tested, and the first image under the corresponding RGB color mode is obtained. After the color mode conversion operation is performed on each pixel point in the first image of the urine sample to be tested, the pixel values of the fourth, fifth, and sixth channels of the corresponding pixel point in the second color mode are obtained. In this embodiment, the second color mode is HSV, the second image is the image of the urine sample to be tested under the HSV color mode, the fourth channel is the hue H channel, the fifth channel is the saturation S channel, and the sixth channel is the brightness V channel.
[0100] Specifically, the first image of the urine sample to be tested acquired by the image acquisition device 510 in the RGB color mode is converted into the second image in the HSV color mode. The process is as follows: the values of the R, G, and B channels of all pixels in the acquired urine sample image in the RGB color mode are converted into the values of the H, S, and V channels corresponding to the pixels in the HSV color space using formulas (1)-(5).
[0101] The obtained HSV color space information of the urine sample to be tested is input into the trained deep neural network to obtain the color confidence of the corresponding urine sample, and the color of the urine sample to be tested is determined according to the obtained color confidence.
[0102] Finally, after the color of the urine sample is obtained through deep neural network recognition, the urine color information is recorded in the urine sediment analyzer, and the user can output the test report after reviewing the results.
[0103] By performing color space conversion on the color-calibrated urine sample image to obtain sample set data, performing deep neural network training on the sample set data to obtain a color recognition model, and inputting the urine sample to be tested into the color recognition model, the color of the urine sample to be tested can be obtained, allowing users to directly detect the urine color in the urine sediment analyzer, thereby improving the user experience and the accuracy of urine color detection.
[0104] Embodiment 2
[0105] This embodiment provides a method for detecting urine color. Figure 3 The method includes steps 700 to 703:
[0106] Step 700: Acquire a first image of a calibration urine sample and a first image of a urine sample to be tested in a first color mode;
[0107] Step 701: Controlling the color mode conversion of the first images of the plurality of calibration urine samples and the first image of the sample to be tested in the first color mode, and obtaining the second images of the plurality of calibration urine samples and the second image of the urine sample to be tested;
[0108] Step 702: performing pattern recognition on the second images of the plurality of calibrated urine samples to obtain a urine color recognition model;
[0109] Step 703: input the second image of the urine sample to be tested into the color recognition model to determine the color information of the urine sample to be tested.
[0110] In some embodiments of the present scheme, the urine color detection method of the present scheme is applied to a urine sediment analyzer, which includes an image acquisition device, which controls the image acquisition device to respectively perform camera operations on multiple calibrated urine samples and urine samples to be tested, and obtains first images of multiple calibrated urine samples corresponding to a first color mode and a first image of the urine sample to be tested.
[0111] In some embodiments, before photographing the plurality of calibration urine samples and the urine sample to be tested, white balance adjustment is performed on the image acquisition device.
[0112] In some embodiments, before performing pattern recognition on the second images of the plurality of calibration urine samples, the second images of the plurality of calibration urine samples are pre-processed.
[0113] In some embodiments, the first color mode includes a first channel, a second channel and a third channel, each first image includes a plurality of pixels, and each pixel has a pixel value corresponding to the first channel, the second channel and the third channel; controlling the color mode conversion operation of the first images of the plurality of calibrated urine samples and the first image of the urine sample to be tested with the first color mode to generate the second images of the plurality of calibrated urine samples and the second image of the urine sample to be tested with the second color mode, including: controlling the color mode conversion operation of the pixel values of the first, second and third channels of each pixel in each of the first images of the plurality of calibrated urine samples and the first image of the urine sample to be tested to obtain the pixel values of the corresponding pixel in the fourth, fifth and sixth channels of the second color mode.
[0114] For example, if the first color mode is RGB mode, the multiple calibration urine sample images 530 include a first channel red channel R, a second channel green channel G, and a third channel blue channel B, and each pixel point in the multiple calibration urine sample images 530 includes a pixel value on the red channel R, a pixel value on the green channel G, and a pixel value on the blue channel B. The second color mode is HSV, and the second image is a calibration urine sample image in the HSV color mode, the fourth channel is the hue H channel, the fifth channel is the saturation S channel, and the sixth channel is the brightness V channel.
[0115] Performing pattern recognition on the second images of the multiple calibrated urine samples to obtain a urine color recognition model includes performing deep neural network pattern recognition on the pixel values of different pixel points of the second color patterns of the multiple calibrated urine samples to obtain color confidences corresponding to the multiple calibrated urine samples.
[0116] The second image of the urine sample to be tested is input into the urine color recognition model to determine the color information of the urine sample to be tested, including obtaining the color confidence of the urine sample to be tested in the trained color recognition model based on the pixel values of different pixel points of the second image of the urine sample to be tested, so as to determine the color information of the urine sample to be tested.
[0117] The urine color detection method provided in this embodiment performs color space conversion on a urine sample image with a calibrated color to obtain sample set data, performs deep neural network training on the sample set data to obtain a color recognition model, and inputs the urine sample to be tested into the color recognition model. The color of the urine sample to be tested can be obtained, so that the user can directly detect the urine color in the urine sediment analyzer, thereby improving the user experience and the accuracy of urine color detection.
[0118] Embodiment 3
[0119] Urine color information is an important feature of urine sediment visible component detection, and urine color can reflect the health of the body. During the detection process of clinical urine analyzer, urine sediment sample color information is mainly detected by adding physical modules, such as urine dry chemical modules. Collect urine samples and drop them on dry chemical test strips to soak the test strips. Use RGB three-color light sources to illuminate the test strips. Some light is reflected back from the test strips. Use receivers to receive reflected light, detect RGB three-channel reflectivity, and then detect sample color. This method can detect the color of urine samples, but it needs to be implemented by adding physical modules.
[0120] The present application proposes a urine sediment color detection method, which can directly detect the color of a urine sample through a urine sediment detection module and accurately reflect the health status of the body.
[0121] See also Figure 4 The specific plan is to start the urine sediment analyzer, inject the cleaning fluid sample to adjust the white balance of the microscope, inject the urine sample into the counting pool of the in vitro diagnostic instrument, select the plane microscope field of the counting pool to take a picture, collect the urine sample image, and then convert the urine sample image from RGB to HSV color space. Finally, input the sample data into the trained deep neural network recognition model to obtain the urine sample color after color recognition.
[0122] The color recognition process is divided into the following steps:
[0123] 1. Obtaining an original sample set, which includes calibrated color images of N types of urine samples;
[0124] 2. Preprocess the original sample data (unify the image size, such as scaling it to 200*200) and perform data enhancement, including rotation, flipping, cropping, etc.;
[0125] 3. Train the sample set with a deep neural network to obtain a urine color recognition model;
[0126] 4. Convert the urine sample image collected by the microscope from RGB to HSV color space. The specific process is as follows:
[0127] Max=max(R,G,B) Formula (1)
[0128] Min=min(R,G,B) Formula (2)
[0129]
[0130] V= Max Formula (5)
[0131] Among them: R, G, B represent the R, G, B values of a pixel in the image, Max and Min are the maximum and minimum values of R, G, B respectively, and H, S, V represent the corresponding H, S, V values in the HSV color space after conversion.
[0132] 5. Input the HSV color space information into the trained deep neural network to obtain the corresponding urine sample color confidence, and then obtain the urine sample color recognition result based on the color confidence.
[0133] After the color of the urine sample is obtained through deep neural network recognition, the information is recorded in the in vitro diagnostic instrument. After the user reviews the results, the test report (including paper report and electronic report, etc.) can be output.
[0134] In this embodiment, HSV color space data is used as input data. In other embodiments, other color spaces such as HSL, HIS, YUV, LAB, etc. may also be used, such as:
[0135] This solution uses a deep neural network to identify urine color, and can also use a color comparison table in a color space to determine urine color; in this solution, the urine sediment analyzer uses a microscope image, and in other embodiments, it can also be an image collected by any other device; this solution uses a light source to illuminate the urine sample, uses a receiver to receive the transmitted light, and calculates the color of the urine sample by the wavelength of the projected light. In other embodiments, a receiver can also be used to receive reflected light and calculate the color of the urine sample by the wavelength of the reflected light.
[0136] In the present embodiment, a urine color detection method and analyzer are provided. The color space conversion of the urine sample image with calibrated color is performed to obtain sample set data. The sample set data is subjected to deep neural network training to obtain a color recognition model. The urine sample to be tested is input into the color recognition model. The color of the urine sample to be tested can be obtained, so that the user can directly detect the urine color in the urine sediment analyzer, thereby improving the user experience and the accuracy of urine color detection.
[0137] Embodiment 4
[0138] This embodiment provides a computer-readable storage medium on which a computer application is stored. When the computer application is executed by a processor, the above-mentioned method steps for detecting urine color are implemented.
[0139] This document is described with reference to various exemplary embodiments. However, those skilled in the art will recognize that changes and modifications may be made to the exemplary embodiments without departing from the scope of this document. For example, various operating steps and components for performing the operating steps may be implemented in different ways (e.g., one or more steps may be deleted, modified, or incorporated into other steps) depending on the specific application or considering any number of cost functions associated with the operation of the system.
[0140] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. In addition, as understood by those skilled in the art, the principles of this article can be reflected in a computer program product on a computer-readable storage medium, which is pre-installed with a computer-readable program code. Any tangible, non-temporary computer-readable storage medium can be used, including magnetic storage devices (hard disks, floppy disks, etc.), optical storage devices (CD to ROM, DVD, Blu Ray disks, etc.), flash memory and / or the like. These computer program instructions can be loaded onto a general-purpose computer, a special-purpose computer or other programmable data processing device to form a machine, so that these instructions executed on a computer or other programmable data processing device can generate a device that implements a specified function. These computer program instructions can also be stored in a computer-readable memory, which can instruct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory can form a manufactured product, including an implementation device that implements a specified function. Computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operating steps are performed on a computer or other programmable device to generate a computer-implemented process, so that the instructions executed on a computer or other programmable device can provide steps for implementing a specified function.
[0141] Although the principles of this invention have been shown in various embodiments, many modifications of structures, arrangements, proportions, elements, materials and components particularly suitable for specific environments and operational requirements can be used without departing from the principles and scope of this invention. The above modifications and other changes or amendments will be included in the scope of this invention.
[0142] The foregoing specific description has been described with reference to various embodiments. However, those skilled in the art will recognize that various modifications and changes can be made without departing from the scope of the present disclosure. Therefore, the consideration of the present disclosure will be illustrative rather than restrictive, and all these modifications will be included in its scope. Similarly, the advantages, other advantages and solutions to the problems of various embodiments have been described above. However, the benefits, advantages, solutions to the problems and any elements that can produce these, or make them more clear, should not be interpreted as critical, necessary or necessary. The term "include" and any other variants used in this article are all non-exclusive inclusions, so that the process, method, article or device including the list of elements not only includes these elements, but also includes other elements that are not explicitly listed or do not belong to the process, method, system, article or device. In addition, the term "coupled" and any other variants used in this article refer to physical connections, electrical connections, magnetic connections, optical connections, communication connections, functional connections and / or any other connections.
Claims
1. A urine sediment analyzer, characterized in that: include: A urine providing device, the urine providing device is used to inject the urine sample to be tested into the counting pool; A light source device, the light source device is used to emit light to illuminate the urine sample to be tested injected into the counting cell; An objective lens, the objective lens is used to amplify the urine sample to be tested injected into the counting pool; An image acquisition device, the image acquisition device is used to perform a camera operation on the urine sample to be tested in the counting pool through the objective lens to obtain an image of the urine sample to be tested; A processing device is used to obtain a classification and counting result of formed components in the urine sample to be tested based on the image of the urine sample to be tested, and to determine the color of the urine sample to be tested based on the image of the urine sample to be tested and a urine color recognition model.
2. The urine sediment analyzer according to claim 1, characterized in that: The step of obtaining the classification and counting result of the formed components in the urine sample to be tested based on the image of the urine sample to be tested comprises: acquiring multiple images of the urine sample to be tested taken by the image acquisition device, performing segmentation, feature extraction, classification and recognition, and statistical counting on the multiple images of the urine sample to be tested, and obtaining the classification and counting result of the formed components in the urine sample to be tested.
3. The urine sediment analyzer according to claim 1, characterized in that: The acquiring the image of the urine sample to be tested comprises: acquiring a first image of the urine sample to be tested corresponding to a first color mode; Determining the color of the urine sample to be tested based on the image of the urine sample to be tested and the urine color recognition model includes: converting the first image of the urine sample to be tested to obtain a second image of the urine sample to be tested in a second color mode; inputting the second image information of the urine sample to be tested into the urine color recognition model to determine the color of the urine sample to be tested.
4. The urine sediment analyzer according to claim 3, characterized in that: The step of inputting the second image information of the urine sample to be tested into the urine color recognition model to determine the color of the urine sample to be tested comprises: inputting the pixel values of different pixel points of the second image of the urine sample to be tested into the color recognition model to obtain the color confidence of the second image of the urine sample to be tested; and determining the color information of the urine sample to be tested based on the color confidence of the second image; And / or, the urine color recognition model is a deep neural network recognition model.
5. The urine sediment analyzer according to claim 4, characterized in that: The first color mode is the RGB color mode; The second color mode is the HSV color mode, the HSL color mode, the HIS color mode, the YUV color mode, or the LAB color mode.
6. The urine sediment analyzer according to any one of claims 3 to 5, characterized in that: The first color mode includes a first channel, a second channel and a third channel, the first image of the urine sample to be tested includes a plurality of pixels, each pixel having a pixel value corresponding to the first channel, the second channel and the third channel; The converting the first image of the urine sample to be tested to obtain the second image of the urine sample to be tested in a second color mode includes: performing a color mode conversion operation on the pixel values of each pixel point in the first channel, the second channel, and the third channel of the first image of the urine sample to be tested, and obtaining the pixel values of the corresponding pixel point in the fourth channel, the fifth channel, and the sixth channel of the second color mode.
7. The urine sediment analyzer according to any one of claims 1 to 5, characterized in that: Before the image acquisition device performs a photographing operation on the urine sample to be tested in the counting pool through the objective lens, a white balance adjustment is performed on the image acquisition device.
8. The urine sediment analyzer according to any one of claims 1 to 5, characterized in that: The image acquisition device is also used to respectively perform camera operations on the multiple calibration urine samples in the counting pool through the objective lens to obtain first images of the multiple calibration urine samples corresponding to the first color mode; The processing device comprises a conversion unit, the conversion unit is used to convert the first images of the plurality of calibration urine samples to obtain the second images of the plurality of calibration urine samples in a second color mode, and is used to convert the first image of the urine sample to be tested to obtain the second image of the urine sample to be tested in the second color mode; The processing device further comprises a pattern recognition unit, which is used to perform pattern recognition training on the second images of the plurality of calibration urine samples to obtain the urine color recognition model.
9. The urine sediment analyzer according to claim 8, characterized in that: The pattern recognition training is deep neural network training; And / or, performing pattern recognition training on the second images of the multiple calibrated urine samples to obtain a urine color recognition model includes: performing deep neural network pattern recognition on the pixel values of different pixel points of the second images of the multiple calibrated urine samples to obtain color confidences corresponding to the multiple calibrated urine samples.
10. The urine sediment analyzer according to claim 8, characterized in that: Before the image acquisition device respectively performs an imaging operation on the plurality of calibration urine samples in the counting pool through the objective lens, performing a white balance adjustment on the image acquisition device; And / or, before the pattern recognition unit performs pattern recognition training on the second images of the multiple calibration urine samples, the second images of the multiple calibration urine samples are preprocessed.
11. The urine sediment analyzer according to claim 8, characterized in that: The first color mode includes a first channel, a second channel and a third channel, each of the first images of the plurality of calibration urine samples includes a plurality of pixels, and each pixel has a pixel value corresponding to the first channel, the second channel and the third channel; The converting the first images of the plurality of calibration urine samples to obtain second images of the plurality of calibration urine samples in a second color mode comprises: After performing a color mode conversion operation on the pixel values of each pixel point in the first channel, the second channel, and the third channel in each of the first images of the multiple calibrated urine samples, the pixel values of the corresponding pixel point in the fourth channel, the fifth channel, and the sixth channel of the second color mode are obtained.
12. A urine sediment analyzer, characterized in that: include: A urine providing device, the urine providing device is used to inject the urine sample to be tested into the counting pool; A urine sediment detection module, which is used to perform classification counting detection and color detection of formed components on the urine sample to be tested in the counting pool; A processing device is used to obtain the classification and counting results of the formed components in the urine sample to be tested and the color of the urine sample to be tested according to the detection information of the urine sediment detection module.
13. The urine sediment analyzer according to claim 12, characterized in that: The urine sediment detection module includes an objective lens and an image acquisition device, wherein the objective lens is used to amplify the urine sample to be tested injected into the counting pool; The urine sediment detection module performs classification counting detection and color detection of formed components on the urine sample to be tested in the counting pool, including: the image acquisition device performs a camera operation on the urine sample to be tested in the counting pool through the objective lens to obtain an image of the urine sample to be tested; the classification counting result of the formed components in the urine sample to be tested and the color of the urine sample to be tested are obtained according to the detection information of the urine sediment detection module, including: obtaining the classification counting result of the formed components in the urine sample to be tested and the color of the urine sample to be tested according to the image of the urine sample to be tested; Alternatively, the urine sediment detection module includes an objective lens, an image acquisition device, a light source device and a receiver; The objective lens is used to amplify the urine sample to be tested injected into the counting pool; The image acquisition device is used to perform a camera operation on the urine sample to be tested in the counting pool through the objective lens to obtain an image of the urine sample to be tested; The light source device is used to illuminate the urine sample to be tested injected into the counting cell; The receiver is used to receive the transmitted light irradiated by the light source device and formed by passing through the urine sample to be tested; The urine sediment detection module performs classification counting detection of formed components on the urine sample to be tested in the counting pool, including: the image acquisition device performs a camera operation on the urine sample to be tested in the counting pool through the objective lens to obtain an image of the urine sample to be tested; The urine sediment detection module performs color detection on the urine sample to be tested in the counting pool, including: the receiver receives the transmitted light irradiated by the light source device and formed by passing through the urine sample to be tested, and obtains the wavelength of the transmitted light; The step of obtaining the classification and counting result of the formed components in the urine sample to be tested according to the detection information of the urine sediment detection module comprises: obtaining the classification and counting result of the formed components in the urine sample to be tested according to the image of the urine sample to be tested; The obtaining the color of the urine sample to be tested according to the detection information of the urine sediment detection module comprises: obtaining the color of the urine sample to be tested according to the wavelength of the transmitted light; Alternatively, the urine sediment detection module includes an objective lens, an image acquisition device, a light source device and a receiver; The objective lens is used to amplify the urine sample to be tested injected into the counting pool; The image acquisition device is used to perform a camera operation on the urine sample to be tested in the counting pool through the objective lens to obtain an image of the urine sample to be tested; The light source device is used to illuminate the urine sample to be tested injected into the counting cell; The receiver is used to receive reflected light irradiated by the light source device and reflected by the urine sample to be tested; The urine sediment detection module performs classification counting detection of formed components on the urine sample to be tested in the counting pool, including: the image acquisition device performs a camera operation on the urine sample to be tested in the counting pool through the objective lens to obtain an image of the urine sample to be tested; The urine sediment detection module performs color detection on the urine sample to be tested in the counting pool, including: the receiver receives the reflected light irradiated by the light source device and reflected by the urine sample to be tested, and obtains the wavelength of the reflected light; The step of obtaining the classification and counting result of the formed components in the urine sample to be tested according to the detection information of the urine sediment detection module comprises: obtaining the classification and counting result of the formed components in the urine sample to be tested according to the image of the urine sample to be tested; The obtaining the color of the urine sample to be tested according to the detection information of the urine sediment detection module includes: obtaining the color of the urine sample to be tested according to the wavelength of the reflected light.
14. The urine sediment analyzer according to claim 13, characterized in that: The step of obtaining the classification and counting result of the formed components in the urine sample to be tested according to the image of the urine sample to be tested comprises: obtaining a plurality of images of the urine sample to be tested taken by the image acquisition device, and performing decomposition, feature extraction, classification recognition, and statistical counting on the plurality of images of the urine sample to be tested to obtain the classification and counting result of the formed components in the urine sample to be tested; And / or, the acquiring the image of the urine sample to be tested includes: acquiring a first image of the urine sample to be tested corresponding to a first color mode; The obtaining the color of the urine sample to be tested according to the image of the urine sample to be tested comprises: converting the first image of the urine sample to be tested to obtain a second image of the urine sample to be tested in a second color mode; inputting the second image information of the urine sample to be tested into the urine color recognition model to determine the color of the urine sample to be tested; The step of inputting the second image information of the urine sample to be tested into the urine color recognition model to determine the color of the urine sample to be tested includes: inputting the pixel values of different pixel points of the second image of the urine sample to be tested into the color recognition model to obtain the color confidence of the second image of the urine sample to be tested; and determining the color information of the urine sample to be tested based on the color confidence of the second image.
15. A method for detecting urine sediment and urine color, characterized in that: include: Controlling the urine providing device to inject the urine sample to be tested into the counting pool; Controlling the image acquisition device to perform a camera operation on the urine sample to be tested in the counting pool through an objective lens to obtain an image of the urine sample to be tested; Obtaining classification and counting results of formed components in the urine sample to be tested according to the image of the urine sample to be tested; The color of the urine sample to be tested is determined according to the image of the urine sample to be tested and a urine color recognition model.
16. The method for detecting urine sediment and urine color according to claim 15, characterized in that: The step of obtaining the classification and counting result of the formed components in the urine sample to be tested according to the image of the urine sample to be tested comprises: obtaining a plurality of images of the urine sample to be tested taken by the image acquisition device, and performing decomposition, feature extraction, classification recognition, and statistical counting on the plurality of images of the urine sample to be tested to obtain the classification and counting result of the formed components in the urine sample to be tested; And / or, the acquiring the image of the urine sample to be tested includes: acquiring a first image of the urine sample to be tested corresponding to a first color mode; Determining the color of the urine sample to be tested according to the image of the urine sample to be tested and the urine color recognition model includes: converting the first image of the urine sample to be tested to obtain a second image of the urine sample to be tested in a second color mode; inputting the second image information of the urine sample to be tested into the urine color recognition model to determine the color of the urine sample to be tested; The step of inputting the second image information of the urine sample to be tested into the urine color recognition model to determine the color of the urine sample to be tested includes: inputting the pixel values of different pixel points of the second image of the urine sample to be tested into the color recognition model to obtain the color confidence of the second image of the urine sample to be tested; and determining the color information of the urine sample to be tested based on the color confidence of the second image.