Sample layered detection method and system based on image recognition and medium

Detecting the stratification status of blood samples through image recognition technology solves the problem in the existing technology of being unable to accurately determine the stable stratification of blood samples, reducing cell damage and improving cell yield.

CN118533826APending Publication Date: 2024-08-23SHENZHEN CELLBRI BIO INNOVATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310194019.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-02-23
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

The existing technology cannot accurately determine whether the blood sample has completed stable stratification, resulting in cell damage during the centrifugation process. Moreover, manual observation and experimental statistical methods are inefficient and cannot adapt to the stable stratification time of samples of different concentrations.

Method used

A sample stratification detection method based on image recognition is adopted, by collecting images of the sample liquid after the centrifuge container is rotated, using a preset stripe recognition model to obtain stratified stripe data, generating a stripe matrix, and judging matrix stability to determine the completion of stratification. Reduce manual judgment and cell damage.

Benefits of technology

It improves the accuracy of stable stratification detection of sample fluids, reduces cell damage, increases cell yield, and is suitable for blood samples of different thicknesses.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118533826A
    Figure CN118533826A
Patent Text Reader

Abstract

The invention discloses a sample layering detection method and system based on image recognition and a medium, and the method comprises the following steps: after a centrifugal container rotates, collecting a sample image of a sample liquid located in an analysis area; performing image recognition on the sample image through a preset stripe recognition model to obtain layered stripe data; generating a stripe matrix according to the layered stripe data; and when the stripe matrix is a stable matrix, determining stable layering of the sample liquid, and determining a layering detection result according to the stable matrix. According to the invention, the accuracy of stable layering detection of the sample liquid in the centrifugal container is improved, so that damage to cells in the sample liquid is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of biomedical technology, and in particular to a sample stratification detection method, system and medium based on image recognition. Background Art

[0002] At present, in the process of processing blood samples, it is often necessary to perform high-speed centrifugal stratification of blood samples through containers such as centrifugal cups. In the process of centrifugal stratification of blood samples, if stratification has been completed, if centrifugation continues after the time point when stratification is completed, it will damage the cells in the blood sample, thereby affecting the cell yield. Therefore, how to determine whether the blood sample has completed stable stratification is an important indicator for cell centrifugation. In the actual centrifugal stratification, due to the different viscosities of different blood samples, the time points for completing stable stratification of different blood samples are also different. In the prior art, it is usually determined whether the stable stratification is completed by artificial observation of the blood sample; or multiple centrifugal stratification experiments are performed and the stratification time after stable stratification is counted. Then, in order to avoid misjudgment, the longest stratification time in the results obtained by experimental statistics is used as the time point for determining the completion of stable stratification. The shortcomings of the above scheme are that the efficiency of artificial observation to determine the completion of stable stratification is low, and it depends on manual experience, and it is impossible to accurately determine whether the stable stratification is completed; and the longest stratification time obtained in the experimental results is used as the time point for completing stable stratification, which is also not accurate enough for blood samples of different viscosities. Therefore, there is an urgent need for a method to accurately determine and complete stable stratification to reduce damage to cells. Summary of the invention

[0003] The embodiments of the present invention provide a sample stratification detection method, system and medium based on image recognition to solve the problem that it is impossible to accurately determine whether stable stratification is completed in the prior art.

[0004] A sample layered detection method based on image recognition, comprising:

[0005] After the centrifugal container is rotated, a sample image of the sample fluid located in the analysis area is collected;

[0006] Performing image recognition on the sample image by using a preset stripe recognition model to obtain layered stripe data;

[0007] generating a stripe matrix according to the layered stripe data;

[0008] When the stripe matrix is ​​a stable matrix, the sample liquid is confirmed to be stably stratified, and a stratification detection result is determined according to the stable matrix.

[0009] A sample stratification detection system based on image recognition comprises a centrifugal container and a controller connected to the centrifugal container, wherein the controller is used to execute the sample stratification detection method based on image recognition.

[0010] A computer-readable storage medium stores a computer program, wherein the computer program implements the above-mentioned sample stratification detection method based on image recognition when executed by a processor.

[0011] The above-mentioned sample stratification detection method, system and medium based on image recognition, the method includes: determining the analysis area of ​​the centrifugal container; after the centrifugal container rotates, collecting a sample image of the sample liquid located in the analysis area; performing image recognition on the sample image through a preset stripe recognition model to obtain stratified stripe data; generating a stripe matrix according to the stratified stripe data; when the stripe matrix is ​​a stable matrix, confirming that the sample liquid is stably stratified, and determining the stratification detection result according to the stable matrix. The sample stratification detection method of the present invention can accurately determine the stratification detection after stable stratification, without manual judgment or manual observation of the number of layers, thereby improving the accuracy of stable stratification detection of the sample liquid in the centrifugal container, thereby reducing cell damage in the sample liquid and improving the cell yield. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

[0013] Figure 1 is a flow chart of a sample stratification detection method based on image recognition in one embodiment of the present invention;

[0014] Figure 2 is a flow chart of a sample stratification detection method based on image recognition in another embodiment of the present invention;

[0015] Figure 3 is a flow chart of step S30 of a sample layered detection method based on image recognition in one embodiment of the present invention;

[0016] Figure 4 is a schematic diagram of a computer device in one embodiment of the present invention. DETAILED DESCRIPTION

[0017] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0018] In one embodiment, if Figure 1 As shown, a sample layered detection method based on image recognition is provided, comprising the following steps S10-S40:

[0019] S10: After the centrifugal container rotates, a sample image of the sample liquid located in the analysis area is collected; wherein, after the controller receives the sample stratification detection instruction, it controls the centrifugal container to rotate, and at this time, the sample liquid in the centrifugal container begins to be stratified. The sample liquid includes but is not limited to a blood mixed sample liquid. The sample liquid contains cells, and therefore, it is necessary to control the centrifugal container to stop rotating after the sample liquid completes stable stratification, thereby avoiding cell damage to the cells in the sample liquid during an excessively long centrifugation process. In the present invention, after starting to centrifuge and stratify the sample liquid (that is, after the centrifugal container rotates), it is necessary to first collect a sample image of the sample liquid that rotates with the centrifugal container through a collection device, and then further perform image analysis on it in the subsequent step S20 to obtain stratified stripe data.

[0020] Understandably, in the present invention, it is necessary to collect the sample image of the sample liquid located in the analysis area, and firstly, it is necessary to determine the analysis area of ​​the centrifugal container; wherein, the centrifugal container includes but is not limited to a centrifugal cup, a can or a bottle, etc. Understandably, after the centrifugal container is installed, the acquisition device is fixedly installed above or below the centrifugal container, and the viewing angle of the acquisition device remains unchanged during the entire process of sample stratification detection of the sample liquid, so as to ensure the accuracy of the sample stratification detection process. In an embodiment of the present invention, after the controller receives the sample stratification detection instruction, the centrifugal container can be rotated or not, but the acquisition device needs to first collect the container image of the centrifugal container (the container image needs to include part or all of the centrifugal space in the centrifugal container that can hold the sample liquid), and then identify the best visual area from the container image to determine whether the sample liquid is stably stratified, that is, the above-mentioned analysis area, that is, the analysis area is the image area in the container image taken by the acquisition device that is most easily identifiable whether the sample liquid contained in the centrifugal space of the centrifugal container is stratified or has completed stable stratification. The sample liquid includes but is not limited to a blood mixed sample liquid, and the sample liquid contains cells. Therefore, it is necessary to accurately determine that the sample liquid has completed stable stratification and timely control the centrifugal container to stop the centrifugal rotation in time after completing the centrifugation process (that is, the sample stratification detection process), thereby avoiding cell damage in the sample liquid during an excessively long centrifugation process.

[0021] In one embodiment, if Figure 2 As shown, before the step S10, that is, before collecting the sample image of the sample liquid located in the analysis area after the centrifugal container rotates, the following steps S101-S103 are included:

[0022] S101, photographing the container image of the centrifugal container by means of a collection device installed above or below the centrifugal container; wherein, after the centrifugal container is installed, the collection device is fixedly installed above or below the centrifugal container (in one embodiment, in order to make the container image finally photographed more accurate, the collection device can be installed above and below the centrifugal container at the same time, and then photographed synchronously above and below to determine the container image), and the viewing angle of the collection device remains unchanged during the entire process of sample stratification detection of the sample liquid, so as to ensure the accuracy of the sample stratification detection process. At the upper position of the centrifugal container, the collection device photographs the container image above the centrifugal container (including at least a part of the centrifugal space of the centrifugal container, the centrifugal space can contain sample liquid or not, and the centrifugal container can be rotated or not), and at this time, the container image includes part or all of the centrifugal space photographed from the upper part of the centrifugal container; and at the lower position of the centrifugal container, the collection device photographs the container image below the centrifugal container, and at this time, the container image includes part or all of the centrifugal space photographed from the lower part of the centrifugal container. Capturing container images means taking one or more container images (usually only one container image is sufficient, but when one container image is not clear enough to accurately identify the analysis area, other container images need to be captured for further determination), and then analyzing them in the subsequent step S102 to determine the analysis area.

[0023] S102, dividing the container image into multiple sub-images according to a preset segmentation method, and determining a target image from all the sub-images, wherein each of the target images includes a section of the container wall of the centrifugal container and a centrifugal space that is attached to the container wall and is used to hold the sample liquid; specifically, the preset segmentation method can be set according to demand, for example, when the centrifugal container is a centrifugal cup with a cylindrical centrifugal space, the collection device captures the container image from the top or bottom of the centrifugal container, and the container image includes at least a portion of the centrifugal space (the centrifugal space captured from the top or bottom is a circle or a portion of a circle). At this time, if the container image is a rectangular image that includes at least a portion of a circular centrifugal space (such as a sector-shaped, semicircular or circular centrifugal space), the rectangular container image can be segmented to obtain multiple sub-images, and the above-mentioned preset segmentation method can be to divide the rectangular container image into multiple small rectangular sub-images; in another embodiment, the above-mentioned preset segmentation method can be: determine the center of the centrifugal space according to the arc-shaped container wall in the container image, and then divide the rectangular container image into multiple complete or incomplete sector-shaped sub-images with the center of the circle as the center and a sector of a preset angle as a reference. It is understandable that, after the container image is divided into multiple sub-images according to the preset segmentation method, not every sub-image has at least a portion of the centrifugal space. Therefore, it is necessary to screen out the target image with at least a portion of the centrifugal space, that is, all sub-images with at least a portion of the centrifugal space are the target images. In this embodiment, the target image is determined from all the sub-images, specifically: the sub-image including at least a section of the container wall of the centrifugal container and the centrifugal space that is attached to the container wall and used to hold the sample liquid is determined as the target image. That is, since the container wall serves as the outer barrier of the circular centrifugal space in the container image, it is an arc-shaped line in the container image, which is easier to identify than the centrifugal space. Therefore, as long as it is ensured that the sub-image contains at least a section of the container wall, it can be determined that it also contains at least a portion of the centrifugal space. Therefore, the target image with the centrifugal space that can be used to hold the sample liquid can be determined from the sub-image by the above method in this embodiment.

[0024] S103, determining the analysis area from all the target images. Since all the target images have at least a part of the centrifugal space, but since image recognition is required in the subsequent process to observe whether the sample liquid has completed stable stratification, the range of the centrifugal space that needs to be image recognized should meet the recognition requirements, for example, in the direction perpendicular to the arc-shaped container wall, the thickness of the centrifugal space should exceed the preset thickness, and the preset thickness can be set according to the requirements, and the sample liquid with the preset thickness needs to be able to fully observe all layers after the sample liquid completes stable stratification (for example, the preset thickness is greater than or equal to the radius of the circular centrifugal space). Therefore, determining the analysis area from all the target images is specifically to first determine the target image whose centrifugal space thickness exceeds the preset thickness from all the target images, and then select the target image with a smaller high brightness area (the fewer high brightness areas, the easier it is to perform image analysis and recognition in the image recognition process) and a higher definition (the higher the definition, the easier it is to perform image analysis and recognition in the image recognition process) from the determined target images as the analysis area.

[0025] Furthermore, step S103, i.e., determining the analysis area from all the target images, includes:

[0026] Obtain the high brightness area corresponding to each of the target images; As can be seen from the above content, further, obtaining the high brightness area corresponding to each of the target images is specifically: from all target images, determine the target image whose centrifugal space thickness exceeds the preset thickness (to determine the target image that needs the centrifugal space range to meet the recognition requirements from all target images), and then obtain the high brightness area of ​​each of the determined target images. Among them, the high brightness area refers to the area where the brightness value of the pixel point in the target image (which can be understood as the pixel value) meets the preset brightness threshold (the preset brightness threshold is set according to the specific layered observation requirements).

[0027] Determine the area ratio of the high brightness region of each target image in the target image to which it belongs; that is, the area ratio refers to the ratio of the area occupied by the high brightness region in a target image in the target image.

[0028] All the target images whose area ratio exceeds a preset ratio threshold (the preset ratio threshold is set according to demand) are deleted, and the clarity of each of the remaining target images is obtained, and the area occupied by the target image with the highest clarity in the container image is recorded as the analysis area. That is, in this embodiment, since the fewer high-brightness areas, the easier it is to perform image analysis and recognition during the image recognition process. Therefore, if the area area corresponding to the high-brightness area accounts for a target image that exceeds a preset proportion threshold, it means that the sample image captured in the area occupied by the target image will be unfavorable for subsequent image recognition. Therefore, it is necessary to delete the target images of this part, and only retain the target images whose area area ratio does not exceed the preset proportion threshold, and record the area occupied by the target image with the highest clarity (the higher the clarity, the easier it is to perform image analysis and recognition during the image recognition process) in the container image among all the retained target images as the analysis area, wherein the clarity calculation method may be the Tenengrad gradient method, which refers to first using the Sobel operator to respectively calculate the horizontal and vertical gradients in the target image, and then, after deleting all the target images whose area area ratio exceeds the preset proportion threshold, the higher the gradient value corresponding to each of the remaining target images, the higher the clarity of the target image. It can be understood that the gradient value corresponding to the target image may refer to the average value of the gradients in the horizontal and vertical directions of the target image after being processed by the Sobel operator. The larger the average value is, the clearer the target image is and the higher the corresponding clarity is.

[0029] In one embodiment, the step S10, i.e., collecting a sample image of the sample liquid located in the analysis area after the centrifugal container rotates, includes:

[0030] The centrifugal container is controlled to rotate at a preset speed to drive the sample liquid in the centrifugal container to adhere to the inner wall of the centrifugal container to form a liquid ring with a rectangular or trapezoidal cross-section, and at least a portion of the liquid ring is located in the centrifugal space of the analysis area; in this embodiment, the preset speed can be set according to demand, and in the centrifugal container rotating at the preset speed, the sample liquid can rotate with the centrifugal container, and then adhere to the inner wall of the centrifugal container to form a hollow liquid ring, and on the cross-section passing through the central axis of the liquid ring, the cross-section of the liquid ring is rectangular (including a rectangular or approximately rectangular shape) or trapezoidal (including a trapezoidal or approximately trapezoidal shape). That is, when the centrifuge container is cylindrical (and has a cylindrical centrifugal space), the centrifuge container rotates at a preset speed around a central axis perpendicular to the horizontal plane. At the preset speed, the sample liquid will form a liquid ring around the central axis on the inner wall of the centrifuge container, and the outer ring liquid surface of the liquid ring (that is, the outer ring side wall of the liquid ring) fits the inner wall of the centrifuge container, and the inner ring liquid surface of the liquid ring is parallel to the central axis of the centrifuge container (the preset speed is high, the centrifuge container rotates at a high speed, such as 2500rpm; at this time, the cross-section of the liquid ring is rectangular) or relatively inclined (the preset speed is low, the centrifuge container rotates at a low speed, such as 500rpm; at this time, the cross-section of the liquid ring is a trapezoidal-like shape that is narrow at the top and wide at the bottom). Specifically, when the inner ring liquid surface of the liquid ring is parallel to the central axis of the centrifugal container, the inner ring liquid surface of the liquid ring is perpendicular to the horizontal plane (that is, perpendicular to the inner ring liquid surface, the vertical inner ring liquid surface of the liquid ring is 90 degrees to the horizontal plane). At this time, since the central axis and the inner wall of the centrifugal container are also perpendicular to the horizontal plane, the cross sections of the liquid ring cut by the plane passing through the central axis are all rectangular cross sections. It can be understood that, since the liquid surface may not be completely perpendicular to the horizontal plane when the centrifugal container rotates, the inner ring liquid surface of the liquid ring may not be perpendicular to the horizontal plane, but may be inclined at an angle close to 90 degrees to the horizontal plane (in the present invention, this is also referred to as the vertical inner ring liquid surface). At this time, the rectangular cross section of the liquid ring refers to a quasi-rectangular cross section that is close to a rectangle but the inner ring liquid surface is slightly deformed (not perpendicular to the horizontal plane, but inclined at an angle close to 90 degrees to the horizontal plane). In another embodiment of the present invention, when the inner ring liquid surface of the liquid ring is relatively inclined with respect to the central axis of the centrifugal container, the inner ring liquid surface of the liquid ring is not perpendicular to the horizontal plane, but is displayed at a certain inclination angle. At this time, since the central axis and the inner wall of the centrifugal container are both perpendicular to the horizontal plane, the cross sections of the liquid ring taken by the plane passing through the central axis are all trapezoidal cross sections. In this embodiment, at least a portion of the liquid ring is located in the centrifugal space of the analysis area, so that the sample image taken subsequently includes at least a portion of the upper surface or lower surface of the liquid ring corresponding to the annular area range.

[0031] By means of a collection device installed above or below the analysis area, a sample image of the analysis area is captured in real time or at a fixed time, and the sample image includes at least a portion of the upper surface or lower surface of the liquid ring corresponding to the annular region range. Wherein, the collection device is fixedly mounted above or below the centrifugal container (in one embodiment, in order to make the sample image finally captured more accurate, the collection device can be installed above and below the centrifugal container at the same time, and then the sample image is captured synchronously above and below the centrifugal container). During the entire process of sample stratification detection of the sample liquid, the viewing angle of the collection device remains unchanged, so as to ensure the accuracy of the sample stratification detection process. At the upper position of the centrifugal container, the collection device captures the sample image corresponding to the upper surface of the corresponding liquid ring in the analysis area, and at this time, the sample image includes a portion of the annular region range corresponding to the upper surface of the corresponding liquid ring in the analysis area; and at the lower position of the centrifugal container, the collection device captures the sample image corresponding to the lower surface of the corresponding liquid ring in the analysis area, and at this time, the sample image includes a portion of the annular region range corresponding to the lower surface of the corresponding liquid ring in the analysis area. The acquisition of sample images can be performed periodically or in real time, that is, real-time shooting can be performed continuously, or timed shooting can be performed at intervals of a preset number of frames or seconds, and it is only necessary to meet the number of real-time sample images actually required in the layered detection process.

[0032] S20: performing image recognition on the sample image through a preset stripe recognition model to obtain layered stripe data; wherein the preset stripe recognition model is a neural network model that is trained through deep learning based on a neural network (such as a ResNet or VGG network), and the training process of the preset stripe recognition model may be: inputting the layered image samples obtained historically into a preset training model with initial parameters constructed based on a neural network, and associating each layered image sample with a layered stripe label (the layered stripe label may be layered stripe data corresponding to the layered image sample, including but not limited to the number of stripes and the position of stripes, etc.), performing image recognition on the layered image samples through the preset training model to obtain sample layered labels, and determining the predicted loss value of the preset training model based on the sample layered labels and the layered stripe labels; when the predicted loss value does not reach the preset convergence condition, iteratively updating the initial parameters in the preset training model until the predicted loss value reaches the convergence condition, and then recording the preset training model after convergence as the preset stripe recognition model.

[0033] In one embodiment, the step S20, i.e., performing image recognition on the sample image by using a preset stripe recognition model to obtain layered stripe data, includes:

[0034] The sample images collected are sequentially input into the preset stripe recognition model according to the collection time points; that is, in this embodiment, each sample image is associated with a collection time, and is sequentially input into the preset stripe recognition model according to the collection time points from earliest to latest for image recognition.

[0035] The sample image is subjected to edge image enhancement processing and grayscale processing through the preset stripe recognition model to obtain the image to be recognized; that is, in this embodiment, the sample image is first subjected to edge image enhancement processing and then subjected to grayscale processing to obtain the image to be recognized.

[0036] The number of stripes in the image to be identified and the stripe position information of each stripe are obtained by identifying the preset stripe recognition model, and the number of stripes, the stripe position information and the acquisition time point corresponding to the same sample image are associated and recorded as the layered stripe data of the sample image. That is, in this embodiment, the preset stripe recognition model can identify the number of stripes and the stripe position information (the coordinate position of each stripe) formed after the sample liquid in the image to be identified is layered, and then the above information is associated with its acquisition time and stored as the layered stripe data and then output.

[0037] S30: Generate a stripe matrix according to the layered stripe data; in this embodiment, after a plurality of sample images are collected and then image recognition is performed to obtain the corresponding layered stripe data, the corresponding stripe matrix can be generated, that is, after every specific time period (or after a preset number of sample images are collected), the stripe matrix is ​​generated according to the obtained layered stripe data corresponding to the preset number of sample images, and then it is determined whether the stripe matrix is ​​a stable matrix. After determining the stable matrix from the obtained stripe matrix, it is determined whether the sample liquid has completed stable stratification.

[0038] In one embodiment, if Figure 3 As shown, the step S30, i.e., generating a stripe matrix according to the layered stripe data, includes the following steps S301-S305:

[0039] S301, insert all the layered stripe data into the layered data queue in the order of acquisition time points from first to last; that is, in this embodiment, the layered stripe data (that is, the sample image corresponding thereto) can be sorted according to the acquisition time points. The earlier (the earlier) the acquisition time points are, the higher the ranking of the layered stripe data in the sample queue is, and the later (the later) the acquisition time points are, the higher the ranking of the layered stripe data in the sample queue is. Therefore, the first layered stripe data in the sample queue (the layered stripe data corresponding to the first sample image collected) will be recorded as the initial layered data (the number of stripes in the initial layered data is 1). It can be understood that in the present invention, the order in the sample queue can also be arranged in the order of acquisition time points from last to first. At this time, the last layered stripe data in the sample queue can be recorded as the initial layered data, and the subsequent other operations will also be changed in sequence.

[0040] S302, generating a stripe matrix according to the first group of layered stripe data; the first group of layered stripe data is a preset number of layered stripe data arranged first in the layered data queue; that is, the first group of layered stripe data is a preset number of layered stripe data arranged first in the layered data queue, that is, the layered stripe data corresponding to a preset number (for example, ten) of sample images acquired in the first batch. The number of stripes in the first group of layered stripe data, the stripe position information, and the acquisition time point are matrixed to form a stripe matrix.

[0041] S303, extracting the stripe stability features in the stripe matrix, and filling the stripe stability features into a preset matrix diagram to obtain a matrix feature diagram; wherein the stripe stability features in the stripe matrix include stripe number change features and stripe position change features, etc., and the above-mentioned stripe stability features are automatically filled into the framework of the preset matrix diagram in the order of acquisition time to obtain a matrix feature diagram.

[0042] S304, judging whether the matrix feature graph meets the preset stability condition; further, the stripe stability feature includes a stripe number change feature and a stripe position change feature; the step S304, i.e., judging whether the matrix feature graph meets the preset stability condition, comprises:

[0043] Determine whether the stripe number change characteristics and the stripe position change characteristics in the matrix feature graph change with the acquisition time point within a preset time length; that is, in this embodiment, it is necessary to determine whether the matrix feature graph meets the preset stability conditions through the stripe number change characteristics and the stripe position change characteristics in the matrix feature graph.

[0044] When the stripe number variation feature and the stripe position variation feature do not change with the acquisition time point within a preset time length, it is confirmed that the matrix feature map meets the preset stability condition; that is, in this embodiment, if the stripe number variation feature and the stripe position variation feature do not change with the acquisition time point within a preset time length, it means that the stripe stability feature in the current sample image has remained unchanged within the preset time length, and the number of stripes and the stripe position are unchanged, and it can be said that the sample image has met the preset stability condition. That is, in this embodiment, the preset stability condition is that the stripe number variation feature and the stripe position variation feature do not change with the acquisition time point within a preset time length.

[0045] When the stripe number variation feature or the stripe position variation feature changes with the acquisition time point within the preset time length, it is confirmed that the matrix feature image does not meet the preset stability condition. That is, in this embodiment, if the stripe number variation feature or the stripe position variation feature does not change with the acquisition time point within the preset time length, it means that the stripe stability feature in the current sample image cannot remain unchanged within the preset time length, and the stripe number and stripe position will continue to change with the acquisition time point, which means that the sample image does not meet the preset stability condition.

[0046] S305, when the matrix characteristic graph satisfies a preset stability condition, determining that the stripe matrix is ​​a stable matrix. That is, in this embodiment, if the matrix characteristic graph satisfies a preset stability condition, it can be determined that the stripe stability characteristics (the number of stripes and the stripe positions of the sample liquid) in the currently continuously collected sample images have stabilized and no longer change with the collection time point, and at this time, the stripe matrix is ​​determined to be a stable matrix.

[0047] Furthermore, after step S304, that is, after determining whether the matrix characteristic graph satisfies a preset stability condition, the method further includes:

[0048] When the matrix characteristic graph does not meet the preset stability condition, a new stripe matrix is ​​generated according to the next set of layered stripe data; the next set of layered stripe data is a preset number of layered stripe data arranged after and adjacent to the previous set of layered stripe data in the layered data queue; that is, in this embodiment, a preset number of layered stripe data arranged after and adjacent to the first set of layered stripe data in the sample queue will be recorded as the next set of layered stripe data. The number of stripes in the next set of layered stripe data, the stripe position information, and the acquisition time point are matrixed to form a new stripe matrix.

[0049] Extract new stripe stability features from the new stripe matrix, and update the matrix feature map according to the new stripe stability features; that is, automatically fill the new stripe stability features re-extracted from the new stripe matrix into the framework of the preset matrix map in the order of acquisition time, update the original matrix feature map, and obtain the updated matrix feature map.

[0050] Determine whether the updated matrix feature map meets the preset stability condition; that is, determine whether the stripe number change characteristic and the stripe position change characteristic in the updated matrix feature map change with the acquisition time point within the preset time length; when the stripe number change characteristic and the stripe position change characteristic do not change with the acquisition time point within the preset time length, confirm that the updated matrix feature map meets the preset stability condition; when the stripe number change characteristic or the stripe position change characteristic changes with the acquisition time point within the preset time length, confirm that the updated matrix feature map does not meet the preset stability condition.

[0051] When the updated matrix characteristic graph satisfies the preset stability condition, the new stripe matrix is ​​determined to be a stable matrix. That is, in this embodiment, if the updated matrix characteristic graph satisfies the preset stability condition, it can be determined that the stripe stability characteristics (the number of stripes and the stripe positions of the sample liquid) in the currently continuously collected sample images have stabilized and no longer change with the collection time point, and at this time, the new stripe matrix is ​​determined to be a stable matrix.

[0052] S40: When the stripe matrix is ​​a stable matrix, confirm that the sample liquid is stably stratified, and determine the stratification detection result according to the stable matrix. That is, when the stripe matrix is ​​a stable matrix, it can be determined that the sample liquid has completed stable stratification, and at this time, the stratification detection result can be output. It is understandable that the stratification detection result can be generated according to the last group of stratification stripe data in the stable matrix and its corresponding sample image. It is understandable that, since it has been explained in step S301 above that the number of stripes in the initial stratification data is 1, in some embodiments, the last group of stratification stripe data in the stable matrix and the above-mentioned initial stratification data can also be compared to finally determine the stratification detection result. Among them, the stratification detection result includes but is not limited to the number of stripes in the final stratification of the sample liquid (the number of stripes in the last group of stratification stripe data in the stable matrix), the stripe position of each layer of stripes in the sample image (the stripe position corresponding to the stripe position information in the last group of stratification stripe data in the stable matrix) and the morphology, etc. It is understandable that after the stable stratification of the sample liquid is identified, it is also necessary to control the centrifugal container to stop rotating to avoid cell damage in the sample liquid during the long centrifugation process.

[0053] The sample stratification detection method of the present invention determines in the container image an analysis area that is most easily identifiable as to whether the sample liquid contained in the centrifugal space of the centrifugal container is stratified or has completed stable stratification, and then after collecting the sample image corresponding to the analysis area, image recognition is performed on the sample image through a preset stripe recognition model constructed based on a neural network to determine the stratified stripe data, thereby improving the accuracy of stable stratification detection of the sample liquid in the centrifugal container; thereafter, a stripe matrix is ​​generated according to the stratified stripe data, and when it is judged that the stripe matrix is ​​a stable matrix, it is confirmed that the sample liquid is stably stratified, and the stratification detection result is determined according to the stable matrix, and the rotation of the centrifugal container is stopped, thereby reducing the cell damage caused to the cells in the sample liquid during the excessively long centrifugation process, thereby improving the cell yield.

[0054] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0055] The present invention also provides a sample stratification detection system based on image recognition, comprising a centrifugal container and a controller connected to the centrifugal container, wherein the controller is used to execute the sample stratification detection method based on image recognition.

[0056] For more specific definitions of the sample stratification detection system based on image recognition and the controller, please refer to the above-mentioned definitions of the sample stratification detection method based on image recognition, which will not be repeated here. Each module in the above-mentioned controller can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules. It can be understood that the controller can be regarded as one or more computer devices, such as Figure 4 As shown, the computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store the data used by the sample stratification detection method based on image recognition in the above-mentioned embodiment. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a sample stratification detection method based on image recognition is implemented.

[0057] In one embodiment, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned sample stratification detection method based on image recognition is implemented.

[0058] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0059] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0060] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.

Claims

1. A sample stratification detection method based on image recognition, characterized in that: include: After the centrifugal container is rotated, a sample image of the sample fluid located in the analysis area is collected; Performing image recognition on the sample image by using a preset stripe recognition model to obtain layered stripe data; generating a stripe matrix according to the layered stripe data; When the stripe matrix is ​​a stable matrix, the sample liquid is confirmed to be stably stratified, and a stratification detection result is determined according to the stable matrix.

2. The sample stratification detection method based on image recognition according to claim 1, characterized in that: After the centrifugal container rotates and before the sample image of the sample liquid located in the analysis area is collected, the method includes: Taking a container image of the centrifugal container by using a collection device installed above or below the centrifugal container; Segmenting the container image into a plurality of sub-images according to a preset segmentation method, and determining a target image from all the sub-images, wherein each of the target images includes a section of the container wall of the centrifugal container and a centrifugal space that is attached to the container wall and is used to contain the sample liquid; An analysis region is determined from all of the target images.

3. The sample stratification detection method based on image recognition as claimed in claim 2, characterized in that: The step of determining the analysis area from all the target images comprises: Acquire the high brightness area corresponding to each of the target images; Determine the area ratio of the high brightness area of ​​each target image in the target image to which it belongs; All the target images whose area ratio exceeds a preset ratio threshold are deleted, and the clarity of each of the remaining target images is obtained, and the area occupied by the target image with the highest clarity in the container image is recorded as the analysis area.

4. The sample stratification detection method based on image recognition according to claim 1, characterized in that: After the centrifugal container rotates, collecting a sample image of the sample liquid located in the analysis area includes: Controlling the centrifugal container to rotate at a preset speed, so as to drive the sample liquid in the centrifugal container to adhere to the inner wall of the centrifugal container to form a liquid ring with a rectangular or trapezoidal cross section, at least a portion of the liquid ring is located in the centrifugal space of the analysis area; A sample image of the analysis area is captured in real time or at a fixed time by a collection device installed above or below the analysis area, wherein the sample image includes at least a portion of the annular area corresponding to the upper surface or lower surface of the liquid ring.

5. The sample stratification detection method based on image recognition according to claim 1, characterized in that: The step of performing image recognition on the sample image by using a preset stripe recognition model to obtain layered stripe data includes: Inputting the collected sample images into a preset fringe recognition model in sequence according to the collection time points; Performing edge image enhancement processing and grayscale processing on the sample image through the preset stripe recognition model to obtain an image to be recognized; The number of stripes of the image to be identified and the stripe position information of each stripe are obtained through the preset stripe recognition model, and the number of stripes, the stripe position information and the acquisition time point corresponding to the same sample image are associated and recorded as the layered stripe data of the sample image.

6. The sample stratification detection method based on image recognition according to claim 5, characterized in that: The step of generating a stripe matrix according to the layered stripe data comprises: Insert all the layered stripe data into the layered data queue in the order of the acquisition time points from the earliest to the latest; Generate a stripe matrix according to a first group of layered stripe data; the first group of layered stripe data is a preset number of layered stripe data arranged first in the layered data queue; Extracting stable features of stripes in the stripe matrix, and filling the stable features of stripes into a preset matrix map to obtain a matrix feature map; Determining whether the matrix characteristic graph satisfies a preset stability condition; When the matrix characteristic graph satisfies a preset stability condition, the stripe matrix is ​​determined to be a stable matrix.

7. The sample stratification detection method based on image recognition according to claim 6, characterized in that: After determining whether the matrix characteristic graph satisfies a preset stability condition, the method further includes: When the matrix characteristic diagram does not meet the preset stability condition, a new stripe matrix is ​​generated according to the next set of layered stripe data; the next set of layered stripe data is a preset number of layered stripe data arranged after and adjacent to the previous set of layered stripe data in the layered data queue; Extracting new fringe stability features from the new fringe matrix, and updating the matrix feature map according to the new fringe stability features; Determining whether the updated matrix characteristic graph meets a preset stability condition; When the updated matrix characteristic graph meets a preset stability condition, the new stripe matrix is ​​determined to be a stable matrix.

8. The sample stratification detection method based on image recognition according to claim 6, characterized in that: The stripe stability characteristics include stripe number change characteristics and stripe position change characteristics; The determining whether the matrix characteristic graph satisfies a preset stability condition includes: Determine whether the stripe number change feature and the stripe position change feature in the matrix feature graph change with the acquisition time point within a preset time length; When the stripe number variation characteristic and the stripe position variation characteristic do not change with the acquisition time point within a preset time length, confirming that the matrix feature graph satisfies a preset stability condition; When the stripe number variation characteristic or the stripe position variation characteristic changes with the acquisition time point within a preset time length, it is confirmed that the matrix feature graph does not satisfy a preset stability condition.

9. A sample stratification detection system based on image recognition, characterized in that: It comprises a centrifugal container and a controller connected to the centrifugal container, and the controller is used to execute the sample stratification detection method based on image recognition as described in any one of claims 1 to 8.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the sample stratification detection method based on image recognition as described in any one of claims 1 to 8 is implemented.