Blood bag OCR detection method and device based on neural network and model training method
Through the neural network-based blood bag OCR detection method, the traditional manual blood bag classification is solved, and efficient and accurate blood bag classification is achieved, reducing manual errors and operating costs.
Patent Information
- Application Number
- CN202311661743.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-05
- Publication Date
- 2025-06-06
Smart Images

Figure CN120107944A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of IVD image recognition, and in particular to a blood bag OCR detection method and device based on a neural network, and a model training method. Background Art
[0002] In vitro diagnosis, or IVD (In Vitro Diagnosis), refers to a diagnostic method that obtains clinical diagnostic information by testing samples such as human body fluids, cells and tissues in vitro, and then determines the disease or body function. It plays an important role in disease prevention, diagnosis, and treatment. Currently, more than 80% of clinical disease diagnosis can be completed by IVD. It includes sample pre-treatment, multi-row rapid sample injection, multi-turn turntable sample barcode high-speed reading, etc., which are applied to automated test lines, test tube sorting, blood bag management, coagulation, immunity, urine, biochemistry, luminescence platforms, etc.
[0003] The IVD vision industry plays an important role in the field of medical diagnosis, especially in the processing and classification of blood types. The traditional manual blood bag blood type classification method is labor-intensive, time-consuming, and prone to human errors. The existing OCR recognition is not very accurate in the special scenario of IVD. Some machine vision-based solutions have more interference information and less feature information when performing full-image classification, and the model size is large and time-consuming. Summary of the invention
[0004] The purpose of the present invention is to provide a blood bag OCR detection method and device based on a neural network, and a model training method.
[0005] To achieve the above object, the present invention provides the following technical solutions:
[0006] The blood bag OCR detection method based on neural network includes the following steps:
[0007] S1: Load the blood bag OCR detection model and parameters based on neural network;
[0008] S2: Acquire an image to be detected, and perform decoding processing on the image to be detected, which contains known barcode coordinate information;
[0009] S3: preprocessing the image;
[0010] S4: cutting the image according to the known barcode coordinate information to obtain the ROI area image;
[0011] S5: inputting the ROI area image into the blood bag OCR detection model to identify the blood bag category in the current image;
[0012] S6: Output the blood bag classification result.
[0013] In step S2, the barcode has been positioned and marked in the image to be detected, and the mark is recognized and processed by a neural network.
[0014] In step S3: the preprocessing includes image alignment and correction.
[0015] The blood bag OCR detection device comprises an image acquisition device, a processor and a memory, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.
[0016] The blood bag OCR detection model training method based on neural network includes the following steps:
[0017] A1: Collect blood bag sample image;
[0018] A2: Label different types of blood bags in sample images;
[0019] A3: Build the original detection model;
[0020] A4: Input the sample image into the original detection model, compare the detection result with the annotation of the sample image, calculate the loss function, adjust the parameters of the original detection model and continue the cyclic training until the training is completed to obtain the blood bag OCR detection model based on the neural network.
[0021] Compared with the prior art, the beneficial effect of the present invention is that through deep network inference classification, the system can efficiently and accurately distinguish different types of blood bags. By extracting ROI, the size of the classification input image is significantly reduced, thereby speeding up the deep network inference time and overall system performance. Automation eliminates human errors that may occur in traditional manual classification. Automatic blood bag classification reduces the need for manual labor, thereby reducing operating costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 A blood bag OCR detection flow chart of an embodiment of the present invention;
[0023] Figure 2 An image to be detected having barcode positioning coordinates according to an embodiment of the present invention;
[0024] Figure 3 An image to be detected that has been preprocessed and corrected according to an embodiment of the present invention;
[0025] Figure 4 An ROI segmented image according to an embodiment of the present invention. DETAILED DESCRIPTION
[0026] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0027] Example 1
[0028] like Figure 1 As shown, the blood bag OCR detection method based on neural network is characterized by comprising the following steps:
[0029] S1: Load the blood bag OCR detection model and parameters based on neural network;
[0030] S2: Obtain the image to be detected, the image to be detected is decoded and processed, and contains known barcode coordinate information, such as Figure 2 shown.
[0031] S3: Preprocess the image, such as Figure 3 shown.
[0032] S4: According to the known barcode coordinate information, the image is cut to obtain the ROI area image, such as Figure 4 shown.
[0033] S5: inputting the ROI area image into the blood bag OCR detection model to identify the blood bag category in the current image;
[0034] S6: Output the blood bag classification result. In this embodiment, the output result is B.
[0035] In step S2, the barcode has been positioned and marked in the image to be detected, and the mark is recognized and processed by a neural network.
[0036] In step S3: the preprocessing includes image alignment and correction.
[0037] Example 2
[0038] The blood bag OCR detection device includes an image acquisition device, a processor and a memory, wherein the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0039] S1: Load the blood bag OCR detection model and parameters based on neural network;
[0040] S2: Acquire an image to be detected, and perform decoding processing on the image to be detected, which contains known barcode coordinate information;
[0041] S3: preprocessing the image;
[0042] S4: cutting the image according to the known barcode coordinate information to obtain the ROI area image;
[0043] S5: inputting the ROI area image into the blood bag OCR detection model to identify the blood bag category in the current image;
[0044] S6: Output the blood bag classification result.
[0045] In step S2, the barcode has been positioned and marked in the image to be detected, and the mark is recognized and processed by a neural network.
[0046] In step S3: the preprocessing includes image alignment and correction.
[0047] Example 3
[0048] The blood bag OCR detection model training method based on neural network includes the following steps:
[0049] A1: Collect blood bag sample image;
[0050] A2: Label different types of blood bags in sample images;
[0051] A3: Build the original detection model;
[0052] A4: Input the sample image into the original detection model, compare the detection result with the annotation of the sample image, calculate the loss function, adjust the parameters of the original detection model and continue the cyclic training until the training is completed to obtain the blood bag OCR detection model based on the neural network.
[0053] Example 4
[0054] 1. Input the whole image:
[0055] Using an image acquisition device, the blood bag image to be identified is taken as input.
[0056] 2. Image preprocessing, correction, and cutting of ROI areas:
[0057] Preprocess the input image, including image correction and noise removal. According to the known decoded coordinate information, accurately cut out the ROI (Region of Interest) area to obtain the effective feature area for subsequent effective processing.
[0058] 3. Deep network positioning:
[0059] The deep neural network model after sample learning is used to identify and locate the ROI area.
[0060] 4. Post-processing output conclusion:
[0061] Example 5
[0062] 1. Input the whole image and decoded coordinates:
[0063] The system receives as input an image of the entire blood bag and simultaneously obtains known decoded coordinates that identify the location of the ROI in the image.
[0064] 2. Image preprocessing and ROI extraction:
[0065] The system first preprocesses the input image to ensure image alignment and correction. Then, the ROI area is cut out according to the decoded coordinates. This step focuses on extracting relevant and useful areas from the original image and excluding unnecessary background and interference information.
[0066] 3. Network classification:
[0067] The extracted ROI region is passed to the deep neural network model. Since the deep neural network model has been pre-trained with a diverse set of labeled blood bag data, it can recognize different types of blood bags and classify them according to their unique features. The classification process focuses on detecting significant difference features to achieve accurate and reliable classification results.
[0068] 4. Output results:
[0069] After deep network reasoning, the system generates a final classification conclusion, indicating the category the blood bag belongs to. This conclusion is based on the analysis of the ROI and its features.
[0070] Post-process the results of neural network positioning, filter the data results through elimination method and threshold setting, and return the results and confidence levels.
[0071] It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above and that the invention can be implemented in other specific forms without departing from the spirit or essential features of the invention in the form of a ring-shaped light source. Therefore, the embodiments should be considered exemplary and non-restrictive in every sense, and the scope of the invention is defined by the appended claims rather than the above description, and it is intended that all changes within the meaning and range of equivalent elements of the claims be included in the invention. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.
[0072] In addition, it should be understood that although the present specification is described according to implementation modes, not every implementation mode contains only one independent technical solution. This description of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment may also be appropriately combined to form other implementation modes that can be understood by those skilled in the art.
Claims
1. Blood bag OCR detection method based on neural network, It is characterized in that The following steps are involved: S1: Load the blood bag OCR detection model and parameters based on neural network; S2: Acquire an image to be detected, and perform decoding processing on the image to be detected, which contains known barcode coordinate information; S3: preprocessing the image; S4: cutting the image according to the known barcode coordinate information to obtain the ROI area image; S5: inputting the ROI area image into the blood bag OCR detection model to identify the blood bag category in the current image; S6: Output the blood bag classification result.
2. The blood bag OCR detection method based on neural network according to claim 1, It is characterized in that In step S2, the barcode has been positioned and marked in the image to be detected, and the mark is recognized and processed by a neural network.
3. The blood bag OCR detection method based on neural network according to claim 1, It is characterized in that In step S3: the preprocessing includes image alignment and correction.
4. Blood bag OCR detection device, including image acquisition equipment, processor and memory, It is characterized in that The memory stores a computer program, and the processor implements the steps of the method according to any one of claims 1 to 3 when executing the computer program.
5. Blood bag OCR detection model training method based on neural network, It is characterized in that The following steps are involved: A1: Collect blood bag sample image; A2: Label different types of blood bags in sample images; A3: Build the original detection model; A4: Input the sample image into the original detection model, compare the detection result with the annotation of the sample image, calculate the loss function, adjust the parameters of the original detection model and continue the cyclic training until the training is completed to obtain the blood bag OCR detection model based on the neural network.