Blood bag identification method, device and system and computer readable storage medium
By using an image-based blood bag recognition model to identify blood bag location, type and barcode information during the blood bag recognition process, the problem of low accuracy in blood bag recognition in the prior art is solved, and more efficient and accurate blood bag recognition is achieved.
Patent Information
- Application Number
- CN202411815963.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-03-28
AI Technical Summary
The prior art has the problem of low recognition accuracy in the blood bag recognition process, mainly because manual recognition is prone to introducing subjective factors, resulting in inaccurate identification results.
By obtaining the blood bag image to be identified, the blood bag recognition model trained based on the blood bag image training set is used to identify the blood bag position, type and barcode information, and then the blood bag recognition result is obtained. The method includes obtaining the blood bag image to be identified, inputting the image to the blood bag identification model, identifying the blood bag barcode information, and generating the blood bag identification result based on multiple information.
Through automatic and intelligent blood bag recognition methods, the subjective factors of manual identification are reduced, the accuracy and efficiency of blood bag recognition are improved, and the comprehensiveness and reliability of the identification results are ensured.
Smart Images

Figure CN119723193A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information identification technology, and in particular to a blood bag identification method, device, system and computer-readable storage medium. Background Art
[0002] The main function of the low-temperature intelligent storage system is to place a single bag of blood on a blood tray first, then quickly freeze the entire blood tray, and finally store or remove the quickly frozen blood tray. During the process of placing blood bags on a tray for quick freezing, storing and removing blood trays, the blood bag information in the entire blood tray must be identified and recorded to prevent blood bag storage errors. Due to the large number of blood bags stored and the complicated process of identifying and detecting blood bags, if it is done manually, it is easy to be mixed with subjective factors of personnel, and the identification results cannot be guaranteed, resulting in low identification accuracy. Summary of the invention
[0003] Based on this, it is necessary to provide a blood bag identification method, device, system, equipment, computer-readable storage medium and computer program product that can improve the accuracy of blood bag identification in order to solve the above technical problems.
[0004] In a first aspect, the present application provides a blood bag identification method, comprising:
[0005] Acquire the blood bag image to be identified;
[0006] Inputting the blood bag image to be identified into a blood bag identification model to obtain the blood bag position and blood bag type; the blood bag identification model is trained based on a blood bag image training set;
[0007] Identifying the blood bag barcode information corresponding to the blood bag position in the image to be identified;
[0008] A blood bag identification result corresponding to the blood bag image to be identified is obtained according to the blood bag position, the blood bag type and the blood bag barcode information.
[0009] In one embodiment, the blood bag positions include multiple ones; and obtaining the blood bag identification result corresponding to the blood bag image to be identified according to the blood bag positions, the blood bag types and the blood bag barcode information includes:
[0010] For a target blood bag position, a blood bag identification result of the target blood bag position is obtained according to the blood bag type and blood bag barcode information corresponding to the target blood bag position; the target blood bag position includes any blood bag position;
[0011] According to the blood bag recognition result at the target blood bag position, a blood bag recognition result corresponding to the blood bag image to be recognized is obtained.
[0012] In one embodiment, the method further comprises:
[0013] If the blood bag identification result corresponding to the target blood bag position belongs to the first category, an abnormal reminder is issued; the first category includes a category indicating that the blood bag belongs to an invalid blood bag;
[0014] If the blood bag identification result corresponding to the target blood bag position belongs to the second category, the blood bag identification result is saved, and the saved blood bag identification results are counted to obtain the number of valid blood bags; the second category includes a category that characterizes that the blood bag belongs to a valid blood bag.
[0015] In one embodiment, the method further comprises:
[0016] In the case of issuing the abnormal reminder, in response to the triggering of re-identification of the blood bag, the target blood bag image corresponding to the adjusted blood bag is re-acquired; the target blood bag image is used as the blood bag image to be identified, and the step of inputting the blood bag image to be identified into the blood bag identification model to obtain the blood bag position and blood bag type is returned to be executed.
[0017] In one embodiment, the training step of the blood bag recognition model includes:
[0018] Acquire a blood bag image training set, wherein the blood bag image training set includes sample blood bag images, each sample blood bag image carries a blood bag annotation position and a blood bag annotation type;
[0019] Input each of the sample blood bag images into the initial model to obtain the corresponding blood bag prediction position and blood bag prediction type;
[0020] Determining a position loss according to the predicted position of the blood bag and the corresponding marked position of the blood bag, and determining a type loss according to the predicted type of the blood bag and the marked type of the blood bag;
[0021] determining a total loss based on the location loss and the type loss;
[0022] The model parameters of the initial model are adjusted according to the total loss until the training conditions are met to obtain a blood bag recognition model.
[0023] In a second aspect, the present application also provides a blood bag identification device, comprising:
[0024] A blood bag image acquisition module, used to acquire the blood bag image to be identified;
[0025] A first blood bag recognition module, used for inputting the blood bag image to be recognized into a blood bag recognition model to obtain the blood bag position and blood bag type; the blood bag recognition model is trained based on a blood bag image training set;
[0026] A second blood bag identification module, used for identifying the blood bag barcode information corresponding to the blood bag position in the image to be identified;
[0027] The recognition result obtaining module is used to obtain the blood bag recognition result corresponding to the blood bag image to be recognized according to the blood bag position, the blood bag type and the blood bag barcode information.
[0028] In a third aspect, the present application further provides a blood bag identification system, including a blood bag conveying mechanism, an image acquisition device and a controller; the image acquisition device is connected to the controller, wherein:
[0029] The blood bag conveying mechanism is used for conveying blood bags;
[0030] The image acquisition device is used to acquire the image of the blood bag transported by the blood bag transport mechanism;
[0031] The controller is used to obtain the image of the blood bag to be identified taken by the image acquisition device, and execute the blood bag identification method as described above.
[0032] In one of the embodiments, the system further comprises a light source and a shading member, wherein the light source is used to emit light; and the shading member is used to adjust the brightness of light irradiated by the light source to the blood bag transported by the blood bag transport mechanism.
[0033] In one of the embodiments, the controller is connected to the light source, and the controller is also used to adjust the brightness of the light source according to the duty cycle of the pulse signal so that the exposure brightness of the blood bag photographed by the image acquisition device is within a preset brightness range.
[0034] In a fourth aspect, the present application further provides a blood bag identification device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the blood bag identification method provided in the first aspect when executing the computer program.
[0035] In a fifth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the blood bag identification method provided in the first aspect is implemented.
[0036] In a sixth aspect, the present application further provides a computer program product, including a computer program, which, when executed by a processor, implements the blood bag identification method provided in the first aspect.
[0037] The above-mentioned blood bag identification method, device, system, equipment, computer-readable storage medium and computer program product obtain the blood bag image to be identified, identify the blood bag image to be identified based on the blood bag identification model, obtain the blood bag position and blood bag type, and identify the blood bag barcode information corresponding to the blood bag position in the image to be identified, and obtain the blood bag identification result corresponding to the image to be identified according to the blood bag position, blood bag type and blood bag barcode information. That is, automatic and intelligent blood bag identification is performed through the blood bag identification model, which can avoid the problem of inaccurate identification caused by subjective factors of manual identification. In addition, the blood bag identification result obtained based on the identified blood bag position, blood bag type and blood bag barcode information is more comprehensive, further improving the accuracy of blood bag identification. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0039] Figure 1 is an application environment diagram of a blood bag identification method in an embodiment;
[0040] Figure 2 is a schematic flow chart of a blood bag identification method in one embodiment;
[0041] Figure 3 A schematic diagram of the training process of a blood bag recognition model in one embodiment;
[0042] Figure 4 is a flow chart of a blood bag identification method in another embodiment;
[0043] Figure 5 is a structural block diagram of a blood bag identification device in one embodiment;
[0044] Figure 6 is a schematic diagram of a blood bag identification system in one embodiment;
[0045] Figure 7 is a schematic diagram of installing a light shielding member in one embodiment;
[0046] Figure 8 FIG. 1 is a diagram showing the internal structure of a blood bag identification device in one embodiment. DETAILED DESCRIPTION
[0047] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0048] The blood bag identification method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The server 104 can receive the blood bag image to be identified sent by the terminal 102, and then input the blood bag image to be identified into the blood bag recognition model to obtain the blood bag position and blood bag type, wherein the blood bag recognition model is obtained based on the training of the blood bag image training set, and the server 104 identifies the blood bag barcode information corresponding to the blood bag position in the image to be identified, and obtains the blood bag recognition result corresponding to the blood bag image to be identified according to the blood bag position, blood bag type and blood bag barcode information. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices, and the Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, projection devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The head-mounted device can be a virtual reality (VR) device, an augmented reality (AR) device, smart glasses, etc. The server 104 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services. It can be understood that the blood bag identification method provided in the embodiment of the present application can not only be used in the above-mentioned scenario where the server and the terminal interact, but can also be applied to the server alone or to the scenario corresponding to the terminal alone.
[0049] In an exemplary embodiment, Figure 2 As shown, a blood bag identification method is provided, and the method is applied to Figure 1 The server in the example is used to illustrate, including the following steps 202 to 208. Among them:
[0050] Step 202: Acquire the image of the blood bag to be identified.
[0051] The blood bag image to be identified refers to the blood bag image to be identified. The blood bag image to be identified may include an image of one blood bag or multiple blood bag images. In an exemplary scenario, a camera captures a blood bag placed in the camera field of view to obtain a blood bag image to be identified, and the blood bag may be placed in a blood bag container, such as a blood tray, a tray, etc., and one blood tray may hold one or more blood bags.
[0052] It can be understood that the blood bag image to be identified can be obtained during the storage or transportation of the blood bag. When the blood bag is stored or transported, the blood bag information can be identified and detected by obtaining the blood bag image to be identified. The blood bag is usually attached with a blood bag barcode, which is used to uniquely identify the corresponding blood information, such as blood source, blood type, blood volume, blood expiration date, blood storage conditions, etc.
[0053] In actual application scenarios, blood bags are usually manually laid flat and neatly arranged in a blood tray, with the side with the blood bag barcode facing upwards. The blood tray is then transported to a target storage address for storage by a blood bag conveying mechanism. An image acquisition device is used to capture an image corresponding to the blood tray placed on the blood bag conveying mechanism. The captured image is used as the blood bag image to be identified, and the image acquisition device then sends the blood bag image to be identified to a server.
[0054] Step 204, input the blood bag image to be identified into a blood bag identification model to obtain the blood bag position and blood bag type; wherein the blood bag identification model is trained based on a blood bag image training set.
[0055] The server inputs the acquired blood bag image to be identified into the blood bag identification model to obtain the blood bag position and blood bag type. The blood bag position refers to the position in the blood bag container where the blood bag can be placed, which can be represented by the coordinates in the blood bag container. The blood bag type includes the presence or absence of a blood bag, that is, a blood bag and a blood bag without a blood bag, and can also include a liquid blood bag and a solid blood bag, wherein a liquid blood bag refers to a blood bag corresponding to liquid blood, and a solid blood bag refers to a blood bag corresponding to coagulated blood.
[0056] Optionally, the blood bag recognition model is trained based on a blood bag image training set, the blood bag image training set includes blood bag sample images, the blood bag sample images may include a blood bag annotation area and a blood bag annotation type corresponding to each blood bag annotation area, wherein the blood bag annotation area refers to the area corresponding to the annotated blood bag position, and the blood bag annotation type refers to the annotated blood bag type; the blood bag sample images are input into the initial model to obtain a blood bag prediction area and a blood bag prediction type for each blood bag prediction area, wherein the blood bag prediction area is the area corresponding to the blood bag position predicted by the initial model, and the blood bag prediction type is the blood bag type predicted by the initial model; a region division loss is determined based on the blood bag prediction area and the blood bag annotation area, and a type loss is determined based on the blood bag prediction type and the blood bag annotation type, a total loss is obtained based on the region division loss and the type loss, and the initial model is trained based on the total loss until the total loss is less than a loss threshold or the number of training times reaches a times threshold, to obtain a blood bag recognition model. By inputting the blood bag image to be identified into the blood bag recognition model, the corresponding blood bag area and the blood bag type corresponding to each blood bag area can be obtained. By adding the corresponding coordinates to each blood bag area based on the preset coordinate system, the blood bag position corresponding to the blood bag area and the blood bag type corresponding to each blood bag position can be obtained.
[0057] Alternatively, the training data set may also include blood bag sample images, where the blood bag sample images include blood bag position annotations and blood bag type annotations.
[0058] It can be understood that the blood bag position and the blood bag type are corresponding, that is, each blood bag position has a corresponding blood bag type, and the blood bag types corresponding to different blood bag positions may be the same or different. For example, the blood bag type corresponding to blood bag position A is a blood bag, and the blood bag type corresponding to blood bag position B is a blood bag, and so on.
[0059] Step 206, identifying the blood bag barcode information corresponding to the blood bag position in the image to be identified.
[0060] After obtaining the blood bag position, the blood bag position can be marked on the image to be identified, and then the blood bag barcode information corresponding to the blood bag position can be identified. The blood bag barcode information can include the presence of a blood bag barcode and the absence of a blood bag barcode, that is, the blood bag barcode information is used to characterize the presence or absence of a blood bag barcode.
[0061] Optionally, at each blood bag position in the image to be identified, the blood bag barcode is identified to obtain the blood bag barcode information corresponding to the blood bag position, thereby obtaining the blood bag type and blood bag barcode information corresponding to each blood bag position.
[0062] Optionally, the blood bag barcode information corresponding to the blood bag position may be identified by a barcode recognition algorithm or a barcode recognition model, which is not specifically limited herein.
[0063] Step 208, obtaining a blood bag recognition result corresponding to the blood bag image to be recognized according to the blood bag position, blood bag type and blood bag barcode information.
[0064] The blood bag recognition result includes the blood bag type and blood bag barcode information corresponding to each blood bag position. Optionally, the blood bag recognition result of the blood bag image to be recognized is obtained according to the blood bag type and blood bag barcode information corresponding to each blood bag position. After obtaining the blood bag type and blood bag barcode information corresponding to each blood bag position in the blood bag image to be recognized, the number of blood bags can also be counted to obtain the number of blood bags in the image to be recognized. For example, the number of blood bags refers to the number of blood bag positions corresponding to the blood bags and the blood bag barcodes, which is not limited to this. The number of blood bags can also be counted according to actual needs, which is not limited here.
[0065] In the above-mentioned blood bag identification method, by acquiring the image of the blood bag to be identified, the blood bag image to be identified is identified based on the blood bag identification model to obtain the blood bag position and the blood bag type, and the blood bag barcode information corresponding to the blood bag position in the image to be identified is identified, and according to the blood bag position, the blood bag type and the blood bag barcode information, the blood bag identification result corresponding to the image to be identified is obtained, that is, automatic and intelligent blood bag identification is performed through the blood bag identification model, which can avoid the problem of inaccurate identification caused by subjective factors of manual identification. In addition, the blood bag identification result obtained based on the identified blood bag position, blood bag type and blood bag barcode information is more comprehensive, further improving the accuracy of blood bag identification.
[0066] In some embodiments, the blood bag position includes multiple blood bag positions; according to the blood bag position, the blood bag type and the blood bag barcode information, a blood bag recognition result corresponding to the blood bag image to be recognized is obtained, including:
[0067] For the target blood bag position, the blood bag recognition result of the target blood bag position is obtained according to the blood bag type and blood bag barcode information corresponding to the target blood bag position; the target blood bag position includes any blood bag position; according to the blood bag recognition result of the target blood bag position, the blood bag recognition result corresponding to the blood bag image to be recognized is obtained.
[0068] The target blood bag position may be any blood bag position. There are multiple blood bag positions, that is, there are multiple positions where blood bags can be placed.
[0069] For the target blood bag position, the blood bag type and blood bag barcode information corresponding to the target blood bag position are obtained, and the blood bag identification result of the target blood bag position is obtained according to the blood bag type and blood bag barcode information corresponding to the target blood bag position. For example, the blood bag identification result of the target blood bag position is that there is a blood bag and a blood bag barcode, there is a blood bag but no blood bag barcode, there is a blood bag barcode but no blood bag, or there is no blood bag and no blood bag barcode.
[0070] Optionally, different blood bag identification results can be identified by identifiers, for example, 1 is used to identify the blood bag identification result as having a blood bag and a blood bag barcode, 2 is used to identify the blood bag identification result as having a blood bag but no blood bag barcode, 3 is used to identify the blood bag identification result as having a blood bag barcode but no blood bag, 4 is used to identify the blood bag identification result as having no blood bag and no blood bag barcode, or A is used to identify the blood bag identification result as having a blood bag and a blood bag barcode, B is used to identify the blood bag identification result as having a blood bag but no blood bag barcode, C is used to identify the blood bag identification result as having a blood bag barcode but no blood bag, D is used to identify the blood bag identification result as having no blood bag and no blood bag barcode, etc. The identifier can be represented by Roman numerals or by letters, and the representation form of the identifier is not specifically limited here.
[0071] According to the blood bag recognition results at each blood bag position, the blood bag recognition result corresponding to the blood bag image to be recognized can be obtained.
[0072] In this embodiment, the blood bag identification result of the target blood bag position is obtained according to the blood bag type and blood bag barcode information corresponding to the target blood bag position, and then the blood bag identification result corresponding to the blood bag image to be identified is obtained based on the target blood bag identification result. That is, the blood bag identification result corresponding to the blood bag image to be identified is obtained based on the blood bag identification result of each blood bag position, which can improve the accuracy of the blood bag identification result of the blood bag image to be identified.
[0073] In some embodiments, the above method further comprises:
[0074] If the blood bag identification result corresponding to the target blood bag position belongs to the first category, an abnormal reminder is issued; the first category includes a category that indicates that the blood bag belongs to an invalid blood bag; if the blood bag identification result corresponding to the target blood bag position belongs to the second category, the blood bag identification result is saved, and the saved blood bag identification results are counted to obtain the number of valid blood bags; the second category includes a category that indicates that the blood bag belongs to a valid blood bag.
[0075] The categories to which the blood bag identification result belongs include a first category and a second category. The first category is a category that indicates that the blood bag belongs to an invalid blood bag, which refers to a blood bag that does not participate in the quantity statistics. The second category is a category that indicates that the blood bag belongs to a valid blood bag, which refers to a blood bag that participates in the quantity statistics. Exemplarily, the first category includes, for example, a blood bag without a blood bag barcode, or a blood bag barcode without a blood bag, and the second category includes, for example, a blood bag and a blood bag barcode, or a blood bag without a blood bag barcode.
[0076] In an optional application scenario, if the blood bag identification result corresponding to the target blood bag position belongs to the first category, the corresponding processing method may be one or more of the following:
[0077] (1) Issuing an abnormal reminder, which is used to indicate abnormalities in blood bag transmission, such as loss of blood bags or loss of blood bag barcodes, etc., can be manually confirmed and detected to avoid blood bag loss or storage errors.
[0078] (2) issuing an abnormality alert, and after issuing the abnormality alert, reacquiring multiple frames of blood bag images corresponding to the abnormality alert, comparing the clarity of the acquired multiple frames of blood bag images, determining the target blood bag image with the highest clarity, using the target blood bag image as the blood bag image to be identified, and returning to the step of inputting the blood bag image to be identified into the blood bag identification model to obtain the blood bag position and blood bag type.
[0079] (3) The blood bag image corresponding to the currently identified blood bag is obtained again, and the blood bag image obtained again is used as the blood bag image to be identified, and the step of inputting the blood bag image to be identified into the blood bag identification model to obtain the blood bag position and the blood bag type is returned. If the blood bag identification result corresponding to the target blood bag position obtained by the second identification still belongs to the first category, an abnormal reminder is issued; if the blood bag identification result corresponding to the target blood bag position belongs to the second category, the blood bag identification result is saved.
[0080] (4) issuing an abnormal reminder, and after issuing the abnormal reminder, segmenting the acquired image to be identified according to the blood bag position to obtain the blood bag image corresponding to each blood bag position, and then re-identifying the blood bag type and blood bag barcode information of the blood bag image to obtain the blood bag type and blood bag barcode information corresponding to the blood bag image, and obtaining the blood bag identification result corresponding to the blood bag image based on the obtained blood bag type and blood bag barcode information, and then determining the category to which the blood bag identification result of the blood bag image belongs. If the blood bag identification result of the blood bag image still belongs to the first category, issuing the abnormal reminder again and stopping the blood bag identification process; if the blood bag identification result of the blood bag image belongs to the second category, saving the blood bag identification result of the blood bag image.
[0081] Optionally, if the blood bag identification result corresponding to the target blood bag position belongs to the second category, the blood bag identification result is saved in a preset format, that is, the blood bag identification result corresponding to the blood bag position is saved, and after all blood bags are identified, the saved blood bag identification results are counted to obtain the number of valid blood bags.
[0082] In this embodiment, if the blood bag identification result corresponding to the target blood bag position belongs to the first category, an abnormal reminder is issued; if the blood bag identification result corresponding to the target blood bag position belongs to the second category, the blood bag identification result is saved, and the saved blood bag identification results are counted to obtain the number of valid blood bags, so that the blood bag identification results can be classified, and different processing is performed according to the different categories corresponding to the blood bag identification results, so that the blood bag status can be monitored in time, and any abnormality can be processed in time, thereby improving the accuracy of blood bag monitoring.
[0083] In an exemplary embodiment, the method further includes:
[0084] In the event of an abnormal reminder, in response to the triggering of blood bag re-identification, the target blood bag image corresponding to the adjusted blood bag is reacquired; the target blood bag image is used as the blood bag image to be identified, and the step of inputting the blood bag image to be identified into the blood bag identification model to obtain the blood bag position and blood bag type is returned.
[0085] In an actual application scenario, after the server issues an abnormal reminder, the staff can check and confirm the blood bag corresponding to the abnormal reminder, and after adjusting the blood bag, instruct the blood bag to be re-identified, such as pressing a re-identification button, or instructing the image acquisition device to re-acquire the blood bag image corresponding to the adjusted blood bag, etc. The server responds to the trigger of blood bag re-identification, re-acquires the target blood bag image corresponding to the adjusted blood bag, and then uses the target blood bag image as the blood bag image to be identified, and returns to execute the step of inputting the blood bag image to be identified into the blood bag recognition model to obtain the blood bag position and blood bag type.
[0086] Optionally, the abnormality reminder can be implemented in the form of voice, text or graphics, for example, by repeating the voice reminder of "there is an abnormality, please deal with it", displaying an abnormality reminder message or an abnormality reminder icon on the display interface, etc. In response to the trigger of the blood bag re-identification, for example, it can be the trigger of the physical button for the blood bag re-identification, or the receiving of the input blood bag re-identification instruction, or in response to the trigger of the blood bag re-identification control, etc. The form of the abnormality reminder and the trigger form of the blood bag re-identification are not specifically limited here.
[0087] In the present embodiment, in the case of an abnormal reminder, in response to the triggering of blood bag re-identification, the target blood bag image corresponding to the adjusted blood bag is reacquired, and the target blood bag image is used as the blood bag image to be identified, thereby re-identifying the target blood bag image. This enables timely adjustment of the blood bag for which the abnormal reminder has occurred, and re-identification of the image corresponding to the adjusted blood bag to obtain the corresponding blood bag identification result, which can improve the timeliness of abnormal processing and the accuracy of blood bag identification.
[0088] In an exemplary embodiment, Figure 3 As shown, the training steps of the blood bag recognition model include the following steps 302 to 310.
[0089] Step 302: Obtain a blood bag image training set, wherein the blood bag image training set includes sample blood bag images, and each sample blood bag image carries a blood bag annotation position and a blood bag annotation type.
[0090] The sample blood bag image refers to the image corresponding to the sample blood bag. The sample blood bag image includes images corresponding to sample blood bags in various states, for example, a blood bag image with a blood bag and a blood bag barcode, a blood bag image with a blood bag but no blood bag barcode, a blood bag image with no blood bag and a blood bag barcode, a blood bag image without a blood bag and no blood bag barcode, etc. In addition, for the case of a blood bag barcode, the blood bag barcode can also be located at different positions of the blood bag. The sample blood bag image carries the blood bag annotation position and the blood bag annotation type, that is, the blood bag position and the blood bag type on the blood bag image are annotated. The blood bag position refers to the position where the blood bag can be placed, and the blood bag position annotation can be a blood bag coordinate annotation. Usually, the blood bag image training set includes multiple sample blood bag images. The more sample blood bag images there are, the more accurate the blood bag recognition model obtained by the final training will be. The number of sample blood bag images is not limited here.
[0091] Step 304: input each sample blood bag image into the initial model to obtain the corresponding blood bag prediction position and blood bag prediction type.
[0092] The predicted position of a blood bag refers to the position of a blood bag predicted by the initial model for the sample blood bag image, and the predicted type of a blood bag refers to the type of blood bag predicted by the initial model for the sample blood bag image.
[0093] Step 306, determining the position loss according to the predicted position of the blood bag and the corresponding marked position of the blood bag, and determining the type loss according to the predicted type of the blood bag and the marked type of the blood bag.
[0094] The position loss is used to characterize the gap between the predicted position of the blood bag and the annotated position of the blood bag. The type loss is used to characterize the gap between the predicted type of the blood bag and the annotated type of the blood bag.
[0095] Step 308, determining the total loss based on the position loss and the type loss.
[0096] After obtaining the position loss and type loss, the total loss of the model training can be calculated. Optionally, the position loss and type loss can be weighted summed to obtain the total loss.
[0097] Step 310, adjusting the model parameters of the initial model according to the total loss until the training conditions are met to obtain a blood bag recognition model.
[0098] The model parameters of the initial model are adjusted based on the total loss, wherein the model parameters are adjusted in a direction to reduce the total loss.
[0099] Each sample blood bag image is input into the initial model through continuous iteration to adjust the parameters of the initial model according to the total loss, until the total loss is less than the loss threshold, or the number of iterative training reaches the preset number of times, and the initial model corresponding to the model is used as the blood bag recognition model.
[0100] In this embodiment, supervised training is performed on the initial model by using blood bag sample images with blood bag labeled positions and blood bag labeled types to obtain a blood bag recognition model, which can improve the accuracy of the blood bag recognition model. The blood bag recognition model can directly identify the blood bag position and blood bag type in the input blood bag image, thereby improving the accuracy and efficiency of blood bag recognition.
[0101] In one example, the training steps of a blood bag recognition model may include: obtaining a blood bag image training set, the blood bag image training set includes sample blood bag images, each sample blood bag image carries a blood bag marking position, a blood bag marking type and a blood bag marking barcode, wherein the blood bag marking barcode refers to whether the blood bag barcode is marked; inputting each sample blood bag image into an initial model to obtain the corresponding blood bag predicted position, blood bag predicted type and blood bag predicted barcode respectively; wherein the blood bag predicted barcode refers to the blood bag barcode information obtained by predicting the blood bag image to be identified based on the initial model; determining the position loss according to the blood bag predicted position and the corresponding blood bag marking position, and determining the type loss according to the blood bag predicted type and the blood bag marking type, and determining the barcode loss according to the blood bag predicted barcode and the blood bag marking barcode; determining the total loss based on the position loss, type loss and barcode loss; adjusting the model parameters of the initial model according to the total loss until the training conditions are met to obtain a blood bag recognition model. The blood bag recognition model obtained through training can recognize the blood bag position, blood bag type and blood bag barcode information in the input blood bag image to be recognized, thereby improving the accuracy and recognition efficiency of blood bag recognition.
[0102] In one example, if Figure 4 As shown, the blood bag identification method includes the following steps 402 to 414.
[0103] Step 402: Acquire the image of the blood bag to be identified.
[0104] Step 404: input the image of the blood bag to be identified into the blood bag identification model to obtain the blood bag position and blood bag type.
[0105] Step 406, identifying the blood bag barcode information corresponding to the blood bag position in the image to be identified.
[0106] Step 408, obtaining a blood bag identification result of the target blood bag position according to the blood bag type and blood bag barcode information corresponding to the target blood bag position.
[0107] Step 410, obtaining a blood bag recognition result corresponding to the blood bag image to be recognized based on the blood bag recognition result at the target blood bag position.
[0108] Step 412, if the blood bag identification result of the target blood bag position belongs to the first category, an abnormal reminder is issued; if the blood bag identification result corresponding to the target blood bag position belongs to the second category, the blood bag identification result is saved, and the saved blood bag identification results are counted to obtain the number of valid blood bags.
[0109] Step 414, in the case of issuing an abnormal reminder, in response to the triggering of re-identification of the blood bag, re-acquire the target blood bag image corresponding to the adjusted blood bag, use the target blood bag image as the blood bag image to be identified, and return to execute step 404.
[0110] It can be understood that the meaning and description of the relevant terms in this embodiment can be found in the description and explanation of the corresponding terms in the above embodiments, and will not be repeated here.
[0111] In this embodiment, the blood bag position, blood bag type and blood bag barcode information of the blood bag image to be identified are identified through the blood bag identification model, and a blood bag identification result corresponding to the blood bag image to be identified is obtained, which can improve the accuracy and efficiency of blood bag identification, and can quickly realize blood bag identification at each link in the blood bag storage or transportation process, thereby greatly improving the monitoring efficiency of the blood bag transportation process.
[0112] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0113] Based on the same inventive concept, the embodiment of the present application also provides a blood bag identification device for implementing the blood bag identification method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more blood bag identification device embodiments provided below can refer to the limitations of the blood bag identification method above, and will not be repeated here.
[0114] In an exemplary embodiment, Figure 5 As shown, a blood bag identification device is provided, comprising: a blood bag image acquisition module 502, a first blood bag identification module 504, a second blood bag identification module 506 and an identification result obtaining module 508, wherein:
[0115] A blood bag image acquisition module 502 is used to acquire a blood bag image to be identified;
[0116] The first blood bag recognition module 504 is used to input the blood bag image to be recognized into the blood bag recognition model to obtain the blood bag position and blood bag type; the blood bag recognition model is trained based on the blood bag image training set;
[0117] The second blood bag identification module 506 is used to identify the blood bag barcode information corresponding to the blood bag position in the image to be identified;
[0118] The recognition result obtaining module 508 is used to obtain the blood bag recognition result corresponding to the blood bag image to be recognized according to the blood bag position, blood bag type and blood bag barcode information.
[0119] In some embodiments, the blood bag positions include multiple ones; the recognition result obtaining module 508 is also used to obtain the blood bag recognition result of the target blood bag position according to the blood bag type and blood bag barcode information corresponding to the target blood bag position; the target blood bag position includes any blood bag position; according to the blood bag recognition result of the target blood bag position, the blood bag recognition result corresponding to the blood bag image to be recognized is obtained.
[0120] In some embodiments, the above-mentioned device also includes a result category identification module, which is used to issue an abnormal reminder if the blood bag identification result corresponding to the target blood bag position belongs to the first category; the first category includes a category that characterizes that the blood bag belongs to an invalid blood bag; if the blood bag identification result corresponding to the target blood bag position belongs to the second category, the blood bag identification result is saved, and the saved blood bag identification results are counted to obtain the number of valid blood bags; the second category includes a category that characterizes that the blood bag belongs to a valid blood bag.
[0121] In some embodiments, the above-mentioned device also includes an exception handling module, which is used to re-acquire the target blood bag image corresponding to the adjusted blood bag in response to the trigger of blood bag re-identification when an exception reminder is issued; use the target blood bag image as the blood bag image to be identified, and return to execute the step of inputting the blood bag image to be identified into the blood bag recognition model to obtain the blood bag position and blood bag type.
[0122] In some embodiments, the above device further includes a model training module for implementing the training steps of the blood bag recognition model, including:
[0123] A blood bag image training set is obtained, which includes sample blood bag images, each of which carries a blood bag annotation position and a blood bag annotation type; each sample blood bag image is input into the initial model to obtain a corresponding blood bag prediction position and a blood bag prediction type; a position loss is determined according to the blood bag prediction position and the corresponding blood bag annotation position, and a type loss is determined according to the blood bag prediction type and the blood bag annotation type; a total loss is determined based on the position loss and the type loss; and model parameters of the initial model are adjusted according to the total loss until the training conditions are met to obtain a blood bag recognition model.
[0124] Each module in the blood bag identification device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.
[0125] In an exemplary embodiment, a blood bag identification system is provided, comprising a blood bag conveying mechanism, an image acquisition device and a controller; the image acquisition device is connected to the controller, wherein:
[0126] The blood bag conveying mechanism is used to convey blood bags; the image acquisition device is used to acquire images of blood bags conveyed by the blood bag conveying mechanism; the controller is used to obtain the images of blood bags to be identified taken by the image acquisition device and execute the above-mentioned blood bag identification method.
[0127] The blood bag conveying mechanism includes a component for placing blood bags, such as a conveyor belt, that is, the blood bags can be placed on the conveyor belt of the blood bag conveying mechanism for automatic conveyance. The image acquisition device includes at least a camera, an image sensor and an image processor, such as a camera. The image acquisition device is connected to the controller, that is, data transmission can be achieved between the image acquisition device and the controller.
[0128] For example, Figure 6As shown, the blood bag identification system includes a blood bag conveying mechanism 604, an image acquisition device 606 and a controller. The blood bag 602 can be placed in a blood tray 608 manually, and the blood tray 608 containing the blood bag 602 can be transported to a target position by the blood bag conveying mechanism 604. The image acquisition device 606 can be installed above the blood bag conveying mechanism 604, wherein the blood bag 602 can be placed on a blood bag container 608, such as a blood tray, and each blood tray can hold multiple blood bags. The camera field of view of the image acquisition device 606 can cover the blood tray 608 placed on the blood conveying mechanism 604, that is, cover all blood bags in the blood tray, so that the blood bag image acquired by the image acquisition device 606 can include all blood bags in the blood tray, and when the blood bag conveying mechanism 604 conveys the blood bag 602 to a preset position below the image acquisition device 604, an image corresponding to the blood bag conveyed by the blood bag conveying mechanism 604 is captured. In addition, the controller is connected to the image acquisition device 606, and the controller can also be set on the image acquisition device 606. The controller can obtain the blood bag image to be identified taken by the image acquisition device 606, and then input the blood bag image to be identified into the blood bag identification model to obtain the blood bag position and blood bag type, wherein the blood bag identification model is trained based on the blood bag image training set; identify the blood bag barcode information corresponding to the blood bag position in the image to be identified; and obtain the blood bag identification result corresponding to the blood bag image to be identified according to the blood bag position, blood bag type and blood bag barcode information. For the terms and steps in blood bag identification, please refer to the explanation and description of the corresponding terms and steps in the above-mentioned blood bag identification method, which will not be repeated here.
[0129] The above-mentioned blood bag identification system automatically transports blood bags through a blood bag conveying mechanism, and an image acquisition device collects blood bag images corresponding to the blood bags conveyed by the blood bag conveying mechanism. The blood bag images collected by the image acquisition device are intelligently identified through a controller, thereby enabling accurate and efficient identification of the transported blood bags.
[0130] In some embodiments, the blood bag identification system further comprises a light source and a light shielding member, wherein the light source is used to emit light; and the light shielding member is used to adjust the brightness of light irradiated from the light source to the blood bag transported by the blood bag transport mechanism.
[0131] The light source is used to emit light, such as a lighting lamp. The shading member refers to a member having a shading function. The shading member can be used to adjust the brightness of the light irradiated by the light source to the blood bag transported by the blood bag transport mechanism, for example, by adjusting the shading angle to adjust the brightness of the light. The shading member can be installed on both sides of the light source or below the light source.
[0132] In one example, if Figure 7As shown, the light source can be installed on both sides of the image acquisition device 702, and the shading member 704 is installed on both sides of the light source. In this example, there is a light source on each side of the image acquisition device 702, and shading members 704 are installed on both sides of each light source. By adjusting the shading angle of the shading member, the brightness of the light irradiated to the blood bag by the light source can be adjusted. Among them, the height of the image acquisition device 702 from the blood bag can be 600mm (millimeter)-700mm, and the material of the shading member 704 can be PC (Polycarbonate, polycarbonate) material, wood or metal material, etc.
[0133] In this embodiment, the brightness of the light irradiated by the light source to the blood bag transported by the blood bag transport mechanism is adjusted by the shading member, so that the physical adjustment of the brightness of the blood bag light can be achieved. The operation is simple and convenient, and the problem of overexposure or underexposure when the image acquisition device shoots the blood bag can be avoided, thereby improving the shooting quality of the blood bag image.
[0134] In some embodiments, the controller is connected to the light source, and the controller is also used to adjust the brightness of the light source according to the duty cycle of the pulse signal so that the exposure brightness of the blood bag photographed by the image acquisition device is within a preset brightness range.
[0135] The controller can adjust the voltage signal of the light source according to the duty cycle of the acquired pulse signal, and adjust the brightness of the light source according to the voltage information of the light source. The preset brightness range can be set according to the actual application scenario and the ambient brightness.
[0136] In this embodiment, by adjusting the brightness of the light source through the duty cycle, the exposure brightness of the blood bag photographed by the image acquisition device can be quickly adjusted to a preset brightness range, thereby avoiding overexposure or underexposure when the blood bag is photographed by the image acquisition device, so that the image acquisition is within a suitable brightness range, thereby improving the quality of the photographed blood bag image. In addition, by adjusting the exposure brightness of the image acquisition device through the light shielding member and the duty cycle together, the adjustment efficiency and accuracy of the exposure brightness can be improved.
[0137] In an exemplary embodiment, a blood bag identification device is provided. The blood bag identification device may be a server, and its internal structure diagram may be as follows: Figure 8As shown. The blood bag identification device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the blood bag identification device is used to provide computing and control capabilities. The memory of the blood bag identification device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the blood bag identification device is used to exchange information between the processor and an external device. The communication interface of the blood bag identification device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a blood bag identification method is implemented.
[0138] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0139] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the steps of the blood bag identification method in the above embodiment are implemented.
[0140] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the blood bag identification method in the above embodiment are implemented.
[0141] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the steps of the blood bag identification method in the above embodiment.
[0142] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0143] Those of ordinary skill 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 the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0144] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0145] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A blood bag identification method, characterized in that: The method comprises: Acquire the blood bag image to be identified; Inputting the blood bag image to be identified into a blood bag identification model to obtain the blood bag position and blood bag type; the blood bag identification model is trained based on a blood bag image training set; Identifying the blood bag barcode information corresponding to the blood bag position in the image to be identified; A blood bag identification result corresponding to the blood bag image to be identified is obtained according to the blood bag position, the blood bag type and the blood bag barcode information.
2. The method according to claim 1, characterized in that The blood bag positions include multiple ones; and obtaining the blood bag recognition result corresponding to the blood bag image to be recognized according to the blood bag positions, the blood bag types and the blood bag barcode information includes: For a target blood bag position, a blood bag identification result of the target blood bag position is obtained according to the blood bag type and blood bag barcode information corresponding to the target blood bag position; the target blood bag position includes any blood bag position; According to the blood bag recognition result at the target blood bag position, a blood bag recognition result corresponding to the blood bag image to be recognized is obtained.
3. The method according to claim 2, characterized in that The method further comprises: If the blood bag identification result corresponding to the target blood bag position belongs to the first category, an abnormal reminder is issued; the first category includes a category indicating that the blood bag belongs to an invalid blood bag; If the blood bag identification result corresponding to the target blood bag position belongs to the second category, the blood bag identification result is saved, and the saved blood bag identification results are counted to obtain the number of valid blood bags; the second category includes a category that characterizes that the blood bag belongs to a valid blood bag.
4. The method according to claim 3, characterized in that: The method further comprises: In the case of issuing the abnormal reminder, in response to the triggering of re-identification of the blood bag, the target blood bag image corresponding to the adjusted blood bag is re-acquired; the target blood bag image is used as the blood bag image to be identified, and the step of inputting the blood bag image to be identified into the blood bag identification model to obtain the blood bag position and blood bag type is returned to be executed.
5. The method according to claim 1, characterized in that The training steps of the blood bag recognition model include: Acquire a blood bag image training set, wherein the blood bag image training set includes sample blood bag images, each sample blood bag image carries a blood bag annotation position and a blood bag annotation type; Input each of the sample blood bag images into the initial model to obtain the corresponding blood bag prediction position and blood bag prediction type; Determining a position loss according to the predicted position of the blood bag and the corresponding marked position of the blood bag, and determining a type loss according to the predicted type of the blood bag and the marked type of the blood bag; determining a total loss based on the location loss and the type loss; The model parameters of the initial model are adjusted according to the total loss until the training conditions are met to obtain a blood bag recognition model.
6. A blood bag identification device, characterized in that: The device comprises: A blood bag image acquisition module, used to acquire the blood bag image to be identified; A first blood bag recognition module, used for inputting the blood bag image to be recognized into a blood bag recognition model to obtain the blood bag position and blood bag type; the blood bag recognition model is trained based on a blood bag image training set; A second blood bag identification module, used for identifying the blood bag barcode information corresponding to the blood bag position in the image to be identified; The recognition result obtaining module is used to obtain the blood bag recognition result corresponding to the blood bag image to be recognized according to the blood bag position, the blood bag type and the blood bag barcode information.
7. A blood bag identification system, characterized in that: It includes a blood bag conveying mechanism, an image acquisition device and a controller; the image acquisition device is connected to the controller, wherein: The blood bag conveying mechanism is used for conveying blood bags; The image acquisition device is used to acquire the image of the blood bag transported by the blood bag transport mechanism; The controller is used to obtain the image of the blood bag to be identified taken by the image acquisition device, and execute the blood bag identification method according to any one of claims 1 to 5.
8. The system according to claim 7, characterized in that The system also includes a light source and a shading member, wherein the light source is used to emit light; and the shading member is used to adjust the brightness of the light irradiated by the light source to the blood bag transported by the blood bag transport mechanism.
9. The system according to claim 8, characterized in that The controller is connected to the light source, and the controller is also used to adjust the brightness of the light source according to the duty cycle of the pulse signal so that the exposure brightness of the blood bag photographed by the image acquisition device is within a preset brightness range.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.