Blood collection tube liquid level height real-time monitoring method, device, system, equipment and product
Through the machine learning model based on the object detection algorithm, the automatic blood collection machine can realize real-time monitoring of the blood collection surface height by the automatic blood collection machine, which solves the problem that the automatic blood collection machine cannot recognize the liquid level height, reduces blood overflow and equipment pollution, and improves the accuracy of the blood collection process Sex and safety.
Patent Information
- Application Number
- CN202410991276.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-23
- Publication Date
- 2024-11-15
AI Technical Summary
The existing automatic blood collection machine cannot automatically identify the height of the blood in the blood collection vessel, resulting in the inability to accurately determine the time when blood collection is stopped, increasing the risk of blood overflow and equipment contamination.
Using a machine learning model based on object detection algorithm, the blood collection tube image is obtained through the camera, the data is marked to train the model, and the blood level is monitored in real time, automatic tracking and judgment are realized, and the auxiliary equipment accurately stops blood collection.
Realize accurate monitoring of the blood collection surface when unattended, reduce blood overflow and equipment pollution, and improve the accuracy and safety of the blood collection process.
Smart Images

Figure CN118968404A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of automatic blood sampling machines, and in particular relates to a method, device, system, equipment and product for real-time monitoring of the liquid level of a blood sampling tube. Background Art
[0002] Blood sampling is a routine examination method for patients during hospitalization to determine multiple medical clinical indicators such as biochemistry, immunity and pathology. The blood vessels of humans or animals are located in the subcutaneous tissue or inside the body tissue, and blood sampling often requires puncture of veins, arteries or tissues.
[0003] For a long time, in the daily blood collection of clinical laboratory medicine, whether it is physical examination, hospital outpatient clinic or ward blood collection, it is mainly completed by manual puncture based on the nurses' years of experience and feel. However, with the increasing number of obese patients, and the high requirements of medical staff for needle puncture technology in infants and ICU (Intensive Care Unit) wards, the situation of inaccurate puncture often occurs, which not only increases the pain of patients, but also increases the probability of medical disputes. For this reason, the automatic blood collection machine came into being, which can not only greatly increase the efficiency of blood collection, but also improve the accuracy and reproducibility of blood sample collection, reduce the exposure of medical staff to allergens, and reduce the tension caused to patients when blood is drawn.
[0004] In an automatic blood collection machine, the blood content in the blood collection tube is of great clinical significance: if the blood sample is insufficient, the expected test results cannot be achieved, and if the blood sample is excessive, it is easy to cause blood splashing and overflow, infecting the automatic blood collection equipment. At present, there is no existing technology that can track and identify the blood in the blood collection tube in the direction of machine vision. Therefore, how to automatically track and determine the rising liquid level of blood in the blood collection tube when the automatic blood collection machine is unattended, so that the auxiliary equipment can determine the precise time to stop blood collection, assist the machine to complete the entire blood drawing process, and reduce the blood contamination inside the automatic blood collection machine caused by blood overflow and the secondary infection of the next patient is a topic that technicians in this field urgently need to study. Summary of the invention
[0005] The purpose of the present invention is to provide a method, device, system, computer equipment, computer readable storage product and computer program product for real-time monitoring of the liquid level in a blood collection tube, so as to solve the problem that the existing automatic blood collection machine cannot automatically determine the time to stop blood collection because it cannot automatically identify the blood level in the blood collection tube.
[0006] In order to achieve the above object, the present invention adopts the following technical solutions:
[0007] In a first aspect, a method for real-time monitoring of the liquid level of a blood collection tube is provided, comprising:
[0008] Acquire a plurality of blood collection tube sample images historically collected by a camera from a blood collection tube in a blood collection machine, wherein the camera is fixedly installed in the blood collection machine and a lens field of view of the camera covers the blood collection tube;
[0009] For each blood collection tube sample image in the plurality of blood collection tube sample images, respond to a human-computer interaction operation to obtain corresponding annotation data, wherein the annotation data includes a blood marking frame in the tube and an annotated height of a blood level in the tube;
[0010] Using the blood collection tube sample images as model input items and the labeled data of the blood collection tube sample images as model output items, importing into a machine learning model based on a target detection algorithm for model training, and obtaining a blood in tube recognition model;
[0011] Acquire a new image of the blood collection tube acquired by the camera in real time;
[0012] The new blood collection tube image is input into the blood in tube recognition model in real time, and the blood in tube marking frame and the blood in tube liquid level marking height in the new blood collection tube image are output.
[0013] Based on the above invention content, a new scheme for real-time monitoring of the liquid level height of a blood collection tube based on a target detection algorithm is provided, that is, after obtaining a plurality of blood collection tube sample images historically collected by a camera on the blood collection tube in the blood collection machine, firstly obtain each blood collection tube sample image and include the annotation data of the blood marking frame in the tube and the blood liquid level height in the tube, then import them into a machine learning model based on the target detection algorithm for model training, and obtain a blood recognition model in the tube, and finally input the new blood collection tube image collected by the camera in real time into the blood recognition model in real time, and output the blood marking frame in the tube and the blood liquid level height in the tube in the new blood collection tube image, so that the blood liquid level rise in the blood collection tube can be automatically tracked and determined when the blood collection machine is unattended, so as to achieve the purpose of assisting the equipment to determine the precise time point to stop blood collection, and then assist the machine to complete the entire blood drawing process, reduce the blood contamination inside the automatic blood collection machine equipment caused by blood overflow and the secondary infection of the next patient, and facilitate practical application and promotion.
[0014] In a possible design, the blood collection tube sample image and the blood collection tube new image are acquired by the camera when a near-infrared light source illuminates the blood collection tube, wherein the near-infrared light source is fixedly installed in the blood collection machine, and the emission wavelength range of the near-infrared light source belongs to the wavelength range of [760,950] nm.
[0015] In a possible design, the labeling data further includes a labeling frame of the blood collection tube and a labeling height of the top of the blood collection tube;
[0016] Inputting the new blood collection tube image into the blood in tube recognition model in real time, and outputting the blood in tube marking frame and the blood level in tube marked height in the new blood collection tube image, including:
[0017] Inputting the new blood collection tube image into the blood in tube recognition model in real time, and outputting the blood in tube marking frame, the blood level in tube marking height, the blood collection tube marking frame and the blood collection tube top marking height in the new blood collection tube image;
[0018] According to the blood marking frame in the tube, the blood sampling tube marking frame and the marked height of the top of the blood sampling tube in the new blood sampling tube image, the marked height of the blood liquid level in the tube in the new blood sampling tube image is corrected to obtain the corrected marked height of the blood liquid level in the tube in the new blood sampling tube image.
[0019] In a possible design, the marked height of the blood level in the tube in the new blood collection tube image is corrected according to the blood mark frame in the tube, the blood collection tube mark frame and the marked height of the top of the blood collection tube in the new blood collection tube image to obtain the corrected marked height of the blood level in the tube in the new blood collection tube image, including:
[0020] According to the blood marking frame in the tube and the blood collection tube marking frame in the new blood collection tube image, determining whether the bottom edges of the two frames are at the same height;
[0021] If so, the height h of the top of the blood collection tube in the new blood collection tube image is tube , the height h of the blood level in the new image of the blood collection tube is marked according to the following formula: blood Correction is performed to obtain the corrected blood level mark height in the new image of the blood collection tube.
[0022]
[0023] In the formula, h t ' ube Indicates the known true height of the blood collection tube.
[0024] In one possible design, the target detection algorithm is implemented using a YOLOv5 network.
[0025] In a second aspect, a device for real-time monitoring of the liquid level of a blood collection tube is provided, comprising a blood collection tube image acquisition unit, a sample image annotation unit, a recognition model training unit, and a recognition model application unit;
[0026] The blood collection tube image acquisition unit is used to acquire a plurality of blood collection tube sample images historically acquired by a camera from the blood collection tube in the blood collection machine, wherein the camera is fixedly installed in the blood collection machine and the camera lens field of view covers the blood collection tube;
[0027] The sample image annotation unit is communicatively connected to the blood collection tube image acquisition unit, and is used to respond to a human-computer interaction operation for each blood collection tube sample image in the plurality of blood collection tube sample images to obtain corresponding annotation data, wherein the annotation data contains a blood marking frame in the tube and a marked height of the blood level in the tube;
[0028] The recognition model training unit is respectively connected to the blood sampling tube image acquisition unit and the sample image annotation unit for communication, and is used to use the sample images of the blood sampling tubes as model input items, and the annotation data of the sample images of the blood sampling tubes as model output items, and import them into a machine learning model based on a target detection algorithm for model training, so as to obtain an in-tube blood recognition model;
[0029] The blood collection tube image acquisition unit is further used to acquire a new image of the blood collection tube acquired by the camera in real time from the blood collection tube;
[0030] The recognition model application unit is respectively communicatively connected to the blood collection tube image acquisition unit and the recognition model training unit, and is used to input the new blood collection tube image into the blood in tube recognition model in real time, and output the blood in tube marking frame and the blood in tube liquid level marked height in the new blood collection tube image.
[0031] In a third aspect, the present invention provides a real-time monitoring system for the liquid level of a blood collection tube, comprising an automatic blood collection machine, a camera and a control device, wherein the camera is fixedly installed in the automatic blood collection machine, and the camera lens field of view covers the blood collection tube in the automatic blood collection machine;
[0032] The control device is communicatively connected to the automatic blood sampling machine and the camera, respectively, and is used to execute the real-time monitoring method of the liquid level in the blood sampling tube as described in the first aspect or any possible design of the first aspect, and after starting the automatic blood sampling machine, it is determined in real time whether the marked height of the blood liquid level in the tube in the new image of the blood sampling tube has reached a preset height. If so, a blood sampling stop instruction is sent to the automatic blood sampling machine.
[0033] In a fourth aspect, the present invention provides a computer device comprising a memory, a processor and a transceiver which are communicatively connected in sequence, wherein the memory is used to store a computer program, the transceiver is used to send and receive messages, and the processor is used to read the computer program to execute the real-time monitoring method for the liquid level of a blood collection tube as described in the first aspect or any possible design of the first aspect.
[0034] In a fifth aspect, the present invention provides a computer-readable storage product having instructions stored thereon, which, when executed on a computer, executes the method for real-time monitoring of the liquid level in a blood collection tube as described in the first aspect or any possible design of the first aspect.
[0035] In a sixth aspect, the present invention provides a computer program product, comprising a computer program or instructions, which, when executed by a computer, implements the method for real-time monitoring of the liquid level in a blood collection tube as described in the first aspect or any possible design of the first aspect.
[0036] Beneficial effects of the above scheme:
[0037] (1) The present invention creatively provides a new scheme for real-time monitoring of the liquid level height of a blood collection tube based on a target detection algorithm, that is, after obtaining a plurality of blood collection tube sample images historically collected by a camera from a blood collection machine, firstly obtain each blood collection tube sample image and include the labeled data of the blood marking frame in the tube and the blood liquid level in the tube, then import them into a machine learning model based on a target detection algorithm for model training, and obtain a blood recognition model in the tube, and finally input a new blood collection tube image collected by the camera in real time into the blood recognition model in real time, and output the blood marking frame in the tube and the blood liquid level in the new blood collection tube image. In this way, the blood liquid level rise in the blood collection tube can be automatically tracked and determined when the blood collection machine is unattended, so as to achieve the purpose of assisting the equipment in determining the precise time point for stopping blood collection, and further assist the machine in completing the entire blood drawing process, reducing the blood contamination inside the automatic blood collection machine equipment caused by blood overflow and the secondary infection of the next patient, which is convenient for practical application and promotion. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] 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 these drawings without paying creative work.
[0039] Figure 1 A schematic flow chart of a method for real-time monitoring of the liquid level in a blood collection tube provided in an embodiment of the present application.
[0040] Figure 2 This is an example diagram of a blood collection tube sample image provided in an embodiment of the present application.
[0041] Figure 3 This is an example diagram of highly annotating a blood collection tube sample image provided in an embodiment of the present application.
[0042] Figure 4 This is an example diagram of the results of identifying blood in a blood collection tube for new images of blood collection tubes at different blood collection times provided in an embodiment of the present application, wherein: Figure 4 (a) in FIG. 1 shows an example of the result of identifying the blood in the blood collection tube by a new image of the blood collection tube at the initial moment of blood collection. Figure 4 (b) in FIG. 1 shows an example of the result of identifying the blood in the blood collection tube for a new image of the blood collection tube at the mid-term of blood collection. Figure 4 (c) in the figure shows an example of the result of identifying the blood in the tube for a new image of the blood collection tube at the end of the blood collection.
[0043] Figure 5 A schematic diagram of the structure of a device for real-time monitoring of the liquid level in a blood collection tube provided in an embodiment of the present application.
[0044] Figure 6 A schematic diagram of the structure of a real-time monitoring system for the liquid level in a blood collection tube provided in an embodiment of the present application.
[0045] Figure 7 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the present invention will be briefly introduced below in combination with the drawings and the description of the embodiments or the prior art. Obviously, the following description of the structure of the drawings is only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. It should be noted that the description of these embodiments is used to help understand the present invention, but does not constitute a limitation of the present invention.
[0047] It should be understood that although the terms first and second, etc. may be used herein to describe various objects, these objects should not be limited by these terms. These terms are only used to distinguish one object from another object. For example, a first object can be referred to as a second object, and similarly, a second object can be referred to as a first object without departing from the scope of the exemplary embodiments of the present invention.
[0048] It should be understood that the term "and / or" that may appear in this document is merely a description of the association relationship between associated objects, indicating that there may be three relationships. For example, A and / or B can indicate three situations: A exists alone, B exists alone, or A and B exist at the same time. For another example, A, B and / or C can indicate the existence of any one of A, B and C or any combination of them. The term " / and" that may appear in this document describes another type of association object relationship, indicating that there may be two relationships. For example, A / and B can indicate two situations: A exists alone or A and B exist at the same time. In addition, the character " / " that may appear in this document generally indicates that the previous and next associated objects are in an "or" relationship.
[0049] Example:
[0050] like Figure 1 As shown, the real-time monitoring method of the liquid level in the blood collection tube provided in the first aspect of this embodiment can be, but is not limited to, executed by a computer device having certain computing resources and communicating with a camera, such as a control device in an automatic blood collection machine. Figure 1 As shown, the real-time monitoring method of the liquid level of the blood collection tube may include, but is not limited to, the following steps S1 to S5.
[0051] S1. Acquire a plurality of blood collection tube sample images historically collected by a camera from a blood collection tube in a blood collection machine, wherein the camera is fixedly installed in the blood collection machine and the camera lens field of view covers the blood collection tube.
[0052] In step S1, the blood collection machine may be, but is not limited to, an automatic blood collection machine, and the blood collection tube is a conventional configuration in the blood collection machine. Considering that myoglobin in the blood has a strong absorption effect on the light emitted by the near-infrared light source, the blood in the blood collection tube will appear dark gray to black under the irradiation of the near-infrared light source, which is relatively easy to distinguish. Therefore, preferably, the sample image of the blood collection tube is acquired by the camera when the near-infrared light source irradiates the blood collection tube, wherein the near-infrared light source is fixedly installed in the blood collection machine, and the wavelength range of the light emission of the near-infrared light source may be, but is not limited to, specifically belonging to the wavelength range of [760,950] nm. An example of the sample image of the blood collection tube with a clear blood (i.e., black part) dividing line is as follows: Figure 2 As shown, the specific number may be, but is not limited to, 20000. In addition, the camera may be, but is not limited to, implemented by an existing industrial camera.
[0053] S2. For each blood collection tube sample image in the plurality of blood collection tube sample images, respond to the human-computer interaction operation to obtain corresponding annotation data, wherein the annotation data includes but is not limited to a blood marking frame in the tube and a marked height of the blood level in the tube.
[0054] In step S2, the common and simple labelme annotation tool (an image annotation tool developed by the Computer Science and Artificial Intelligence Laboratory of the Massachusetts Institute of Technology, which is written in Python and PyQT and is used for image annotation) can be used for manual annotation to obtain the annotation data of each blood collection tube sample image. For example, the example of highly annotating the blood collection tube sample image is as follows Figure 3 In addition, in order to realize the recognition of the blood collection tube and the height of the top of the blood collection tube, preferably, the annotation data also includes but is not limited to the blood collection tube marking frame and the height of the top of the blood collection tube.
[0055] S3. Using the sample images of each blood collection tube as model input items, and using the labeled data of the sample images of each blood collection tube as model output items, importing them into a machine learning model based on a target detection algorithm for model training, and obtaining an in-tube blood recognition model.
[0056] In step S3, the target detection algorithm is an existing artificial intelligence recognition algorithm for identifying objects in a picture and marking the location of the objects, and specifically can be but not limited to Faster R-CNN (Faster Regions with Convolutional Neural Networks features, a target detection algorithm proposed by He Kaiming et al. in 2015, which won multiple first places in the 2015 ILSVRV and COCO competitions) target detection algorithm, SSD (Single Shot MultiBox Detector, a target detection algorithm proposed by Wei Liu at ECCV 2016, which is one of the currently popular main detection frameworks) target detection algorithm or YOLO (Youonly look Once, the latest version has been developed to V5, and is widely used in the industry. Its basic principle is: first, the input image is divided into 7×7 grids, 2 frames are predicted for each grid, and then the target window with relatively low probability is removed according to the threshold, and finally the redundant window is removed by merging the frames to obtain the detection result) target detection algorithm, etc. Therefore, based on a certain amount of sample data (i.e., the sample images of each blood collection tube) and sample annotation data (i.e., the annotation data of each blood collection tube sample image), through the conventional calibration modeling process (the specific process includes the calibration process and the verification process of the model, that is, first by comparing the model simulation results with the measured data, and then adjusting the model parameters according to the comparison results, so that the simulation results are consistent with the actual process) training to obtain the blood in the tube recognition model with the ability to identify blood in the tube and the ability to annotate the height of the blood level in the tube. In addition, if the annotation data also includes the blood collection tube marking frame / and the annotated height of the top of the blood collection tube, the blood in the tube recognition model will also have the ability to identify blood collection tubes / and the ability to annotate the height of the top of the blood collection tube, etc.
[0057] In the step S3, considering that in the use scenario of blood level tracking, the target detection algorithm needs to have the characteristics of high speed, high efficiency and accurate detection, otherwise it will have more serious clinical consequences. Therefore, after repeated tests, the target detection algorithm preferably adopts the YOLOv5 network (which uses the concept of grid, that is, the image is divided into many grids, each grid is responsible for predicting one or more objects, and this refined image division is very suitable for blood level tracking scenarios that require precise tracking) to implement. The YOLOv5 network is a mature network model on the market. Its working principle is as follows: (1) Preparation (performed in the input layer Input): The image needs to undergo data enhancement (especially Mosaic data enhancement) and initialize a set of anchor presets (YOLOv56.0 version provides different general presets for models with different parameter amounts); (2) Feature extraction (performed in the backbone network Backbone): The basic structures such as the Conv module, C3 module and SPPF module are used to extract features from the input image. Among them, the Conv module is used to downsample the input image (a total of 5 downsamplings were performed), and the C3 module is used to extract and fuse features from the input image to enrich the semantic information of the features. In this process, Bootstrap is used to reduce the number of parameters and the amount of calculation, and the CSPNet idea is used to enhance the CNN (Convolutional Neural Network). Networks, convolutional neural networks) learning ability; the SPPF module uses pooling and feature fusion to enrich the semantic information of features, so that the deepest feature map has extremely rich semantic information; (3) Processing features (performed in the neck network Neck): Fuse shallow features with the feature maps of three scales for target detection (shallow features are conducive to detection). Version 6.0 draws on PANet and fuses shallow features with the extracted feature maps, so that the feature maps have both rich semantic information and accurate location information of objects; (4) Predicting targets (performed in the head network Head): Predict the processed feature maps and optimize the parameter weights according to the loss function (Classification Loss and Bounding Box Regeression Loss) and the optimizer.
[0058] S4. Acquire a new image of the blood collection tube captured by the camera in real time.
[0059] In step S4, preferably, the new image of the blood collection tube is acquired by the camera when the near-infrared light source irradiates the blood collection tube. In addition, the acquisition frequency of the new image of the blood collection tube may be, but is not limited to, 15 images per second, so as to monitor the liquid level of the blood collection tube in real time at high speed.
[0060] S5. Input the new blood collection tube image into the blood in tube recognition model in real time, and output the blood in tube marking frame and the blood level mark height in the new blood collection tube image.
[0061] In step S5, since the blood in tube recognition model has the ability to recognize blood in tube and mark the height of the blood level in tube through the aforementioned model training, the blood in tube marking frame and the marked height of the blood level in tube in the new blood collection tube image can be output (in the field of blood collection technology, since the height of the blood level in tube directly reflects the size of the blood volume in tube, the volume unit ml is generally used to represent the height of the blood level in tube), such as Figure 4 Shown: In Figure 4 In (a), since there is no blood in the tube, there is no recognized blood mark frame in the tube in the new blood collection tube image (the blood level in the tube is marked as 0.0 ml at this time); Figure 4 In (b), since there is less blood in the tube, the blood marking frame in the tube (i.e., the blood marking frame in the figure, with the corresponding confidence mark of 0.28) and the marked height of the blood level in the tube (e.g., 0.49 ml) are identified in the new blood collection tube image; Figure 4 In (c), since there is a lot of blood in the tube, there is an identified blood marking box in the tube (i.e., the blood marking box in the figure, with the corresponding confidence mark of 0.98) and the marked height of the blood level in the tube (for example, 1.67 ml) in the new image of the blood collection tube. In this way, if it is found that the marked height of the blood level in the tube in the new image of the blood collection tube has reached a preset height (for example, 1.67 ml), it can be determined to stop blood collection, otherwise it returns to step S4 to continue real-time monitoring, which can assist the machine to complete the entire blood drawing process and reduce blood contamination inside the automatic blood collection machine caused by blood overflow and secondary infection of the next patient. In addition, if the blood in the tube recognition model also has the ability to recognize blood collection tubes and the ability to mark the height of the top of the blood collection tube, etc., then the blood collection tube marking box and the marked height of the top of the blood collection tube in the new image of the blood collection tube can also be output, such as Figure 4 Shown: In Figure 4 In (a), there is an identified blood collection tube marking box (i.e., the tube marking box in the figure, and the corresponding confidence mark is 0.85) in the new blood collection tube image; Figure 4 In (b), there is an identified blood collection tube marking box in the new blood collection tube image (i.e., the tube marking box in the figure, and the corresponding confidence mark is 0.84); Figure 4 In (c), there is an identified blood collection tube marking box in the new blood collection tube image (i.e., the tube marking box in the figure, and the corresponding confidence mark is 0.98); Figure 4Although the height of the top mark of the blood collection tube is not shown as an example, it does not mean that it cannot be shown.
[0062] In the step S5, considering that the height of the blood collection tube is fixed and known, in order to accurately obtain the marked height of the blood level in the tube in the new blood collection tube image, preferably, when the marked data also includes the blood collection tube marking frame and the marked height of the top of the blood collection tube, the new blood collection tube image is input into the blood in tube recognition model in real time, and the blood in tube marking frame and the marked height of the blood level in the tube in the new blood collection tube image are output, including but not limited to the following steps S51 to S52.
[0063] S51. Input the new blood collection tube image into the blood in tube recognition model in real time, and output the blood in tube marking frame, blood in tube level marking height, blood collection tube marking frame and blood collection tube top marking height in the new blood collection tube image.
[0064] S52. Correct the marked height of the blood level in the new image of the blood collection tube according to the blood marking frame in the tube, the blood collection tube marking frame and the marked height of the top of the blood collection tube in the new image of the blood collection tube, and obtain the corrected marked height of the blood level in the tube in the new image of the blood collection tube.
[0065] In the step S52, specifically, the marked height of the blood level in the tube in the new image of the blood collection tube is corrected according to the blood marking frame in the tube, the blood collection tube marking frame and the marked height of the top of the blood collection tube in the new image of the blood collection tube to obtain the corrected marked height of the blood level in the tube in the new image of the blood collection tube, including but not limited to the following steps S521 to S523.
[0066] S521. According to the blood marking frame in the tube and the blood collection tube marking frame in the new blood collection tube image, determine whether the bottom edges of the two frames are at the same height.
[0067] S522. If yes, then mark the height h of the top of the blood collection tube in the new blood collection tube image. tube , the height h of the blood level in the new image of the blood collection tube is marked according to the following formula: blood Correction is performed to obtain the corrected blood level mark height in the new image of the blood collection tube.
[0068]
[0069] In the formula, h t ' ube Indicates the known true height of the blood collection tube.
[0070] S523. If not, mark the height h of the top of the blood collection tube in the new blood collection tube image. tube , the height h of the blood level in the new image of the blood collection tube is marked according to the following formula: blood Correction is performed to obtain the corrected blood level mark height in the new image of the blood collection tube.
[0071]
[0072] In the formula, h t ' ube represents the known true height of the blood collection tube, η blood represents the confidence output by the blood in tube recognition model and corresponding to the blood in tube marking frame, η tube The confidence level output by the blood in tube recognition model and corresponding to the blood collection tube marking frame.
[0073] Therefore, based on the real-time monitoring method of the liquid level height of the blood collection tube described in the aforementioned steps S1 to S5, a new scheme for real-time monitoring of the liquid level height of the blood collection tube based on the target detection algorithm is provided, that is, after obtaining a plurality of blood collection tube sample images historically collected by the camera on the blood collection tube in the blood collection machine, firstly obtain each blood collection tube sample image and include the labeled data of the blood marking frame in the tube and the labeled height of the blood liquid level in the tube, then import them into the machine learning model based on the target detection algorithm for model training, and obtain the blood recognition model in the tube, and finally input the new blood collection tube image collected by the camera in real time into the blood recognition model in real time, and output the blood marking frame in the tube and the labeled height of the blood liquid level in the tube in the new blood collection tube image, so that the rising situation of the blood liquid level in the blood collection tube can be automatically tracked and determined when the blood collection machine is unattended, so as to achieve the purpose of the auxiliary equipment determining the precise time point to stop blood collection, and then assist the machine to complete the entire blood drawing process, reduce the blood contamination inside the automatic blood collection machine equipment caused by blood overflow and the secondary infection of the next patient, and facilitate practical application and promotion.
[0074] like Figure 5 As shown, the second aspect of this embodiment provides a virtual device for implementing the real-time monitoring method of the liquid level of a blood collection tube described in the first aspect, comprising a blood collection tube image acquisition unit, a sample image annotation unit, a recognition model training unit and a recognition model application unit;
[0075] The blood collection tube image acquisition unit is used to acquire a plurality of blood collection tube sample images historically acquired by a camera from the blood collection tube in the blood collection machine, wherein the camera is fixedly installed in the blood collection machine and the camera lens field of view covers the blood collection tube;
[0076] The sample image annotation unit is communicatively connected to the blood collection tube image acquisition unit, and is used to respond to a human-computer interaction operation for each blood collection tube sample image in the plurality of blood collection tube sample images to obtain corresponding annotation data, wherein the annotation data contains a blood marking frame in the tube and a marked height of the blood level in the tube;
[0077] The recognition model training unit is respectively connected to the blood sampling tube image acquisition unit and the sample image annotation unit for communication, and is used to use the sample images of the blood sampling tubes as model input items, and the annotation data of the sample images of the blood sampling tubes as model output items, and import them into a machine learning model based on a target detection algorithm for model training, so as to obtain an in-tube blood recognition model;
[0078] The blood collection tube image acquisition unit is further used to acquire a new image of the blood collection tube acquired by the camera in real time from the blood collection tube;
[0079] The recognition model application unit is respectively communicatively connected to the blood collection tube image acquisition unit and the recognition model training unit, and is used to input the new blood collection tube image into the blood in tube recognition model in real time, and output the blood in tube marking frame and the blood in tube liquid level marked height in the new blood collection tube image.
[0080] The working process, working details and technical effects of the aforementioned device provided in the second aspect of this embodiment can be referred to the real-time monitoring method of the liquid level in the blood collection tube described in the first aspect, and will not be described in detail here.
[0081] like Figure 6 As shown, the third aspect of this embodiment provides a physical system for implementing the real-time monitoring method for the liquid level height of a blood sampling tube as described in the first aspect, comprising an automatic blood sampling machine, a camera and a control device, wherein the camera is fixedly installed in the automatic blood sampling machine, and the camera's lens field of view covers the blood sampling tube in the automatic blood sampling machine; the control device is communicatively connected to the automatic blood sampling machine and the camera, respectively, for executing the real-time monitoring method for the liquid level height of a blood sampling tube as described in the first aspect, and after starting the automatic blood sampling machine, determines in real time whether the marked height of the blood level in the tube in the new image of the blood sampling tube has reached a preset height, and if so, sends a blood sampling stop instruction to the automatic blood sampling machine.
[0082] The working process, working details and technical effects of the aforementioned system provided in the third aspect of this embodiment can be referred to the real-time monitoring method of the liquid level in the blood collection tube described in the first aspect, and will not be described in detail here.
[0083] like Figure 7As shown, the fourth aspect of this embodiment provides a computer device for executing the real-time monitoring method of the liquid level of the blood collection tube as described in the first aspect, including a memory, a processor and a transceiver that are sequentially connected in communication, wherein the memory is used to store a computer program, the transceiver is used to send and receive messages, and the processor is used to read the computer program to execute the real-time monitoring method of the liquid level of the blood collection tube as described in the first aspect. For example, the memory may include, but is not limited to, a random access memory (Random-Access Memory, RAM), a read-only memory (Read-Only Memory, ROM), a flash memory (Flash Memory), a first-in-first-out memory (First Input First Output, FIFO) and / or a first-in-last-out memory (First Input Last Output, FILO), etc.; the processor may include, but is not limited to, a microprocessor of the STM32F105 series. In addition, the computer device may also include, but is not limited to, a power module, a display screen and other necessary components.
[0084] The working process, working details and technical effects of the aforementioned computer device provided in the fourth aspect of this embodiment can be referred to the real-time monitoring method of the liquid level in the blood collection tube described in the first aspect, and will not be described in detail here.
[0085] In a fifth aspect of this embodiment, there is provided a computer-readable storage product storing instructions including the method for real-time monitoring of the liquid level in a blood collection tube as described in the first aspect, that is, the computer-readable storage product stores instructions, and when the instructions are run on a computer, the method for real-time monitoring of the liquid level in a blood collection tube as described in the first aspect is executed. The computer-readable storage product refers to a carrier for storing data, which may include but is not limited to computer-readable storage media such as floppy disks, optical disks, hard disks, flash memory, USB flash drives, and / or memory sticks, and the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
[0086] The working process, working details and technical effects of the aforementioned computer-readable storage product provided in the fifth aspect of this embodiment can be referred to the real-time monitoring method of the liquid level in the blood collection tube described in the first aspect, and will not be described in detail here.
[0087] In a sixth aspect of this embodiment, a computer program product is provided, including a computer program or an instruction, wherein when the computer program or the instruction is executed by a computer, the real-time monitoring method for the liquid level of a blood collection tube as described in the first aspect is implemented. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.
[0088] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for real-time monitoring of the liquid level of a blood collection tube, characterized in that: include: Acquire a plurality of blood collection tube sample images historically collected by a camera from a blood collection tube in a blood collection machine, wherein the camera is fixedly installed in the blood collection machine and a lens field of view of the camera covers the blood collection tube; For each blood collection tube sample image in the plurality of blood collection tube sample images, respond to a human-computer interaction operation to obtain corresponding annotation data, wherein the annotation data includes a blood marking frame in the tube and an annotated height of a blood level in the tube; Using the blood collection tube sample images as model input items and the labeled data of the blood collection tube sample images as model output items, importing into a machine learning model based on a target detection algorithm for model training, and obtaining a blood in tube recognition model; Acquire a new image of the blood collection tube acquired by the camera in real time; The new blood collection tube image is input into the blood in tube recognition model in real time, and the blood in tube marking frame and the blood in tube liquid level marking height in the new blood collection tube image are output.
2. The method for real-time monitoring of the liquid level of a blood collection tube according to claim 1, characterized in that: The blood collection tube sample image and the blood collection tube new image are acquired by the camera when a near-infrared light source irradiates the blood collection tube, wherein the near-infrared light source is fixedly installed in the blood collection machine, and the emission wavelength range of the near-infrared light source belongs to the wavelength interval [760,950] nm.
3. The method for real-time monitoring of the liquid level of a blood collection tube according to claim 1, characterized in that: The labeling data also includes a labeling frame of the blood collection tube and a labeling height of the top of the blood collection tube; Inputting the new blood collection tube image into the blood in tube recognition model in real time, and outputting the blood in tube marking frame and the blood level in tube marked height in the new blood collection tube image, including: Inputting the new blood collection tube image into the blood in tube recognition model in real time, and outputting the blood in tube marking frame, the blood level in tube marking height, the blood collection tube marking frame and the blood collection tube top marking height in the new blood collection tube image; According to the blood marking frame in the tube, the blood sampling tube marking frame and the marked height of the top of the blood sampling tube in the new blood sampling tube image, the marked height of the blood liquid level in the tube in the new blood sampling tube image is corrected to obtain the corrected marked height of the blood liquid level in the tube in the new blood sampling tube image.
4. The method for real-time monitoring of the liquid level of a blood collection tube according to claim 3, characterized in that: Correcting the marked height of the blood level in the new blood collection tube image according to the blood marking frame in the tube, the blood collection tube marking frame and the marked height of the top of the blood collection tube in the new blood collection tube image to obtain the corrected marked height of the blood level in the tube in the new blood collection tube image, including: According to the blood marking frame in the tube and the blood collection tube marking frame in the new blood collection tube image, determining whether the bottom edges of the two frames are at the same height; If so, the height h of the top of the blood collection tube in the new blood collection tube image is tube , the height h of the blood level in the new image of the blood collection tube is marked according to the following formula: blood Correction is performed to obtain the corrected blood level mark height in the new image of the blood collection tube. In the formula, h t ' ube Indicates the known true height of the blood collection tube.
5. The method for real-time monitoring of the liquid level of a blood collection tube according to claim 1, characterized in that: The target detection algorithm is implemented using the YOLOv5 network.
6. A device for real-time monitoring of the liquid level of a blood collection tube, characterized in that: It includes a blood collection tube image acquisition unit, a sample image annotation unit, a recognition model training unit and a recognition model application unit; The blood collection tube image acquisition unit is used to acquire a plurality of blood collection tube sample images historically acquired by a camera from the blood collection tube in the blood collection machine, wherein the camera is fixedly installed in the blood collection machine and the camera lens field of view covers the blood collection tube; The sample image annotation unit is communicatively connected to the blood collection tube image acquisition unit, and is used to respond to a human-computer interaction operation for each blood collection tube sample image in the plurality of blood collection tube sample images to obtain corresponding annotation data, wherein the annotation data contains a blood marking frame in the tube and a marked height of the blood level in the tube; The recognition model training unit is respectively connected to the blood sampling tube image acquisition unit and the sample image annotation unit for communication, and is used to use the sample images of the blood sampling tubes as model input items, and the annotation data of the sample images of the blood sampling tubes as model output items, and import them into a machine learning model based on a target detection algorithm for model training, so as to obtain an in-tube blood recognition model; The blood collection tube image acquisition unit is further used to acquire a new image of the blood collection tube acquired by the camera in real time from the blood collection tube; The recognition model application unit is respectively communicatively connected to the blood collection tube image acquisition unit and the recognition model training unit, and is used to input the new blood collection tube image into the blood in tube recognition model in real time, and output the blood in tube marking frame and the blood in tube liquid level marked height in the new blood collection tube image.
7. A real-time monitoring system for the liquid level of a blood collection tube, characterized in that: It includes an automatic blood sampling machine, a camera and a control device, wherein the camera is fixedly installed in the automatic blood sampling machine, and the camera lens field of view covers the blood sampling tube in the automatic blood sampling machine; The control device is communicatively connected to the automatic blood sampling machine and the camera, respectively, and is used to execute the real-time monitoring method of the liquid level in the blood sampling tube as described in any one of claims 1 to 5, and after starting the automatic blood sampling machine, it is used to determine in real time whether the marked height of the blood liquid level in the tube in the new image of the blood sampling tube has reached a preset height. If so, a blood sampling stop instruction is sent to the automatic blood sampling machine.
8. A computer device, characterized in that: It includes a memory, a processor and a transceiver which are communicatively connected in sequence, wherein the memory is used to store a computer program, the transceiver is used to send and receive messages, and the processor is used to read the computer program to execute the real-time monitoring method for the liquid level of a blood collection tube as described in any one of claims 1 to 5.
9. A computer readable storage product, characterized in that The computer-readable storage product stores instructions, and when the instructions are executed on the computer, the real-time monitoring method for the liquid level of the blood collection tube as described in any one of claims 1 to 5 is executed.
10. A computer program product comprising a computer program or instructions, characterized in that When the computer program or the instruction is executed by a computer, the method for real-time monitoring of the liquid level in a blood collection tube as claimed in any one of claims 1 to 5 is implemented.
