Method and system for extracting test result information from medical test based on image recognition
The YOLOv5s network and convolutional neural network are used to identify the table area of medical test orders, combined with wavelet transform and OCR technology, to solve the problem of insufficient format adaptability in medical test order image and text recognition, improve the recognition accuracy and applicability, and achieve Accurate extraction of medical test order information and abnormal judgment.
Patent Information
- Application Number
- CN202410879247.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-02
- Publication Date
- 2024-10-29
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing technology has insufficient format adaptability in image and text recognition of medical test orders, resulting in low recognition accuracy, and general OCR tools are difficult to meet the specialized needs of medical test orders, affecting the exchange of medical Internet data and the establishment of medical records. .
The YOLOv5s network is used to identify the bounding box of the table area of the medical test form, combined with wavelet transformation and linear stretching for image preprocessing, and the convolutional neural network is used to build a mapping relationship extraction model to separate and identify the name, value and reference range data of the test indicators. , convert text blocks into editable format through OCR method, and determine abnormal conditions of laboratory indicators.
It has significantly improved the applicability and recognition accuracy of test order formats in different hospitals, solved the problem of insufficient format adaptability, and improved the accuracy of image and text recognition and its applicability in the medical Internet.
Smart Images

Figure CN118865404A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of character recognition, and in particular to a method and system for extracting test result information from medical tests based on image recognition. Background Art
[0002] With the continuous development of the Internet, the medical industry and the Internet are becoming more closely integrated. With the continuous opening of policies, many medical-related Internet companies have emerged. In the medical Internet industry, data transmission is the basis for online communication. The data in the medical industry is mainly medical documents. However, most hospitals often do not provide electronic data for medical documents, which brings great difficulties to the data exchange on the medical Internet.
[0003] In the hierarchical diagnosis and treatment plan, it is basic work to establish medical records of patients in multiple hospitals. Generally speaking, the medical records of patients mainly include: test reports, medical records, test images, etc. However, most primary hospitals currently do not have a complete electronic medical record database. In the scenario of remote diagnosis and treatment, most patients take photos of the printed test reports and send them to the remote doctor in the form of pictures. Such test report image data is unstructured data. From the perspective of establishing patient medical records, how to extract and structure the information in the test report image is an urgent need. Therefore, it is necessary to take the medical test report, one of the most common medical documents, as the research object and explore the relevant technologies of medical document image and text recognition.
[0004] In the prior art, the publication number CN106446881A discloses a method for extracting test result information from a medical test form image. Based on the table characteristics of the medical test form, the table area of the medical test form is extracted from the original image of the medical test form; the columns in the table area of the medical test form are separated by a vertical projection method to extract the required information column; the text line is segmented from the information column; the text line is segmented by a vertical projection method to obtain a character block, and the test character information is extracted from the character block. The present invention can effectively identify the test information of the medical test form image by segmenting the table area from the digital image of the medical test form and then extracting useful test character information from the table area. The method of this invention is simple, effective and highly operable, but the formats of the test forms of different hospitals are basically different, which also affects the versatility of the test form image and text recognition system. At the same time, the general OCR tool is not sufficient to meet the special needs of the medical test form. In the overall process of the medical test form image and text recognition system, the image and text recognition accuracy may be low.
[0005] The above information disclosed in this Background section is only for enhancement of understanding of the background of the present disclosure and therefore it may contain information that does not constitute the prior art that is already known to one of ordinary skill in the art. Summary of the invention
[0006] The purpose of the present invention is to provide a method and system for extracting test result information from medical tests based on image recognition, so as to solve the problems raised in the above background technology.
[0007] To achieve the above object, the present invention provides the following technical solutions:
[0008] A method for extracting test result information from medical tests based on image recognition, the specific steps comprising:
[0009] Collect image information of historical medical test reports, extract the table area of the medical test report from the original image of the medical test report according to the table characteristics of the medical test report, and pre-process the table area image, wherein the pre-processing includes image denoising and enhancement processing to obtain the pre-processed table area image of the medical test report;
[0010] Segmenting the preprocessed table area image of the medical test form, separating the test indicator name, test indicator value and reference range data columns in the table area of the medical test form, extracting the test indicator name text block, test indicator value text block and reference range data text block, and generating a test indicator name text block data set, a test indicator value text block data set and a reference range data text block data set according to different text blocks;
[0011] A mapping relationship extraction model was established, and the text images in the three data sets were used as the input of the mapping relationship extraction model. The mapping relationship between the manually labeled test indicator name text blocks, test indicator value text blocks, and reference range data text blocks was used as the label to train the mapping relationship extraction model.
[0012] Collect image information of the medical test sheet to be identified, extract the table area, and perform preprocessing and segmentation to obtain a test indicator name text tile data set, a test indicator value text tile data set, and a reference range data text tile data set, input the data in the three data sets into a mapping relationship extraction model obtained by the method of establishing a mapping relationship extraction model, and obtain several groups of test indicator names, test indicator values, and reference range data text tiles with mapping relationships;
[0013] The obtained groups of text blocks with mapping relationships are subjected to text recognition and text extraction to obtain table data with one-to-one correspondence between the test indicator name, the test indicator value and the reference range data. The test indicator value is compared with the reference range data to determine the abnormal situation of the test indicator.
[0014] Furthermore, according to the table characteristics of the medical test report, the table area of the medical test report is extracted from the original image of the medical test report. The method for obtaining the table area of the medical test report is as follows: using the YOLOv5s network to perform table area bounding box recognition on the table area image of the medical test report, sorting out medical test report images of different types and sizes containing table marks, and using the table area bounding box corresponding to the test indicator of each medical test report image as a label. The trained YOLOv5s network is used to identify the table area in the medical test report image and mark the table area, and extract the marked table area image.
[0015] Furthermore, according to the image information of the historical medical test orders, a total of n table areas of the medical test orders are extracted, and the table area images are preprocessed, wherein the logic of the preprocessing is: the medical test order image is denoised by a wavelet transform denoising method, and the specific steps of the wavelet transform denoising method include: decomposing the medical test order image by wavelet transform to obtain wavelet coefficients of the image at different scales and directions; thresholding the wavelet coefficients to set the low-amplitude wavelet coefficients to zero and retaining the high-amplitude wavelet coefficients; inversely transforming the wavelet coefficients after thresholding, reconstructing the processed coefficients into an image, and completing the denoising of the medical test order image;
[0016] The logic of the enhancement processing of the medical test report image is: using the linear stretching method, the grayscale dynamic range of the medical test report image is expanded to the specified range according to the linear mapping relationship. The formula for the linear stretching is:
[0017]
[0018] Where V j is the gray value of the jth pixel in the medical test order image. The first pixel in the upper left corner of the image to be preprocessed is the first pixel. The labels are arranged in order of row priority. V min Represents the minimum gray value in the medical test order image, V max It represents the maximum gray value in the medical test order image, D represents the dynamic range of the image after gray compression, and D1 represents the minimum gray value of the compressed image.
[0019] Furthermore, the obtained preprocessed table area image of the medical test report is segmented to obtain the test indicator name text block, the test indicator value text block and the reference range data text block. The logic is as follows: the text area image to be detected is segmented by page segmentation. The page segmentation first divides the image into columns and splits it into a series of pictures containing a line of text. Then the image is segmented to separate the results of different columns in the table, thereby obtaining the test indicator name text block, the test indicator value text block and the reference range data text block. The obtained text blocks are saved in the test indicator name text block data set, the test indicator value text block data set and the reference range data text block data set.
[0020] Furthermore, a mapping relationship extraction model is established, wherein the mapping relationship extraction model is constructed by using a convolutional neural network, the text images in the three data sets are used as input of the mapping relationship extraction model, and the mapping relationship between manually marked test indicator name text blocks, test indicator value text blocks and reference range data text blocks is used as a label to train the mapping relationship extraction model, so as to obtain the test indicator value and reference range data corresponding to each test indicator name.
[0021] Furthermore, the obtained groups of text blocks with mapping relationships are subjected to text recognition and text extraction, wherein the method for text recognition and text extraction is: using an OCR method to automatically recognize the text in the groups of text blocks with mapping relationships, and converting them into an editable and searchable text format.
[0022] Furthermore, based on the extracted text information, the test index value is compared with the reference range data, and the test index value is calibrated as S i The minimum and maximum values of the reference range data are marked as S mini and S maxi ,
[0023] When S mini ≤S i ≤S maxi When , it indicates that the indicator is within the normal range;
[0024] When S mini ≥S i Or S ≥ S maxi When , it indicates that the indicator is not within the normal range, and ∞ is marked after the indicator name, indicating that the indicator is abnormal.
[0025] The present invention also provides a system for extracting test result information from medical tests based on image recognition, wherein the system for extracting test result information from medical tests based on image recognition is used to execute the above-mentioned method for extracting test result information from medical tests based on image recognition, and comprises:
[0026] An image acquisition and processing module is used to acquire image information of historical medical test sheets, extract the table area of the medical test sheet from the original image of the medical test sheet according to the table characteristics of the medical test sheet, and pre-process the table area image, wherein the pre-processing includes image denoising and enhancement processing to obtain the pre-processed table area image of the medical test sheet;
[0027] An image segmentation module is used to segment the table area image of the preprocessed medical test form, separate the test index name, test index value and reference range data columns in the table area of the medical test form, extract the test index name text block, test index value text block and reference range data text block, and generate a test index name text block data set, a test index value text block data set and a reference range data text block data set according to different text blocks;
[0028] A mapping relationship extraction module is used to establish a mapping relationship extraction model, take the text images in the three data sets as the input of the mapping relationship extraction model, and use the mapping relationship between the manually labeled test indicator name text blocks, test indicator value text blocks and reference range data text blocks as labels to train the mapping relationship extraction model;
[0029] A real-time image analysis module is used to collect image information of a medical test sheet to be identified, extract a table area, and perform preprocessing and segmentation to obtain a test index name text tile data set, a test index value text tile data set, and a reference range data text tile data set, and input the data in the three data sets into a mapping relationship extraction model obtained by a method for establishing a mapping relationship extraction model to obtain a plurality of groups of test index names, test index values, and reference range data text tiles having mapping relationships;
[0030] The text extraction module is used to perform text recognition and text extraction on the obtained groups of text blocks with mapping relationships, obtain table data with one-to-one correspondence between the test indicator name, the test indicator value and the reference range data, compare the test indicator value with the reference range data, and judge the abnormal situation of the test indicator.
[0031] Compared with the prior art, the beneficial effects of the present invention are as follows: by collecting image information of historical medical test sheets, according to the table characteristics of the medical test sheets, the table area of the medical test sheets is extracted from the original image of the medical test sheets, the table area image is preprocessed, the preprocessed table area image of the medical test sheets is segmented, the test indicator name, test indicator value and reference range data columns in the table area of the medical test sheets are separated, and the test indicator name text block, test indicator value text block and reference range data text block are extracted; a mapping relationship extraction model is established, the text image is used as the input of the mapping relationship extraction model, and the mapping relationship between the manually marked test indicator name text block, test indicator value text block and reference range data text block is used as a label to train the mapping relationship extraction model; the image information of the medical test sheet to be identified is collected, the table area is extracted, and preprocessing and segmentation are performed to obtain the test indicator name text block data set, the test indicator value text block and the reference range data text block. A test indicator value text tile data set and a reference range data text tile data set are provided. The data in the three data sets are input into a mapping relationship extraction model obtained by a method for establishing a mapping relationship extraction model to obtain several groups of text tiles with mapping relationships of test indicator names, test indicator values and reference range data; the obtained several groups of text tiles with mapping relationships are subjected to text recognition and text extraction to obtain table data with one-to-one correspondence between the test indicator names, test indicator values and reference range data, the test indicator values are compared with the reference range data, and the abnormal situation of the test indicators is judged. In the present invention, a YOLOv5s network is used to identify different test sheet formats of different hospitals, and the table area of the medical test sheet is extracted, which significantly improves the applicability and accuracy in different medical institutions, solves the shortcomings in format adaptability, and uses a convolutional neural network to calculate the mapping relationship of text images, which can more accurately identify and extract the corresponding information in the test results, and improves the accuracy of image and text recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 It is a schematic diagram of the overall method flow of the present invention;
[0033] Figure 2 It is a schematic diagram of the overall system structure of the present invention. DETAILED DESCRIPTION
[0034] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with specific embodiments.
[0035] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the present invention should be understood by people with ordinary skills in the field to which the present invention belongs. The words "first", "second" and similar words used in the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0036] Example:
[0037] See also Figure 1 , the present invention provides a technical solution:
[0038] A method for extracting test result information from medical tests based on image recognition, the specific steps comprising:
[0039] Step 1: Collect image information of historical medical test reports, extract the table area of the medical test report from the original image of the medical test report according to the table characteristics of the medical test report, and pre-process the table area image, wherein the pre-processing includes image denoising and enhancement processing to obtain the pre-processed table area image of the medical test report;
[0040] According to the table characteristics of the medical test report, the table area of the medical test report is extracted from the original image of the medical test report. The method for obtaining the table area of the medical test report is as follows: using the YOLOv5s network to perform table area bounding box recognition on the table area image of the medical test report, sorting out medical test report images of different types and sizes containing table marks, and using the table area bounding box corresponding to the test index of each medical test report image as a label. The trained YOLOv5s network is used to identify the table area in the medical test report image and mark the table area, and extract the marked table area image.
[0041] Among them, the main function of the YOLOv5s network is to perform real-time target detection. Target detection is an important task in the field of computer vision. Its goal is to detect various objects of different categories from images or videos and accurately mark their locations. YOLOv5s is a model in the YOLO (You On ly Look Once) series. It strikes a balance between real-time and accuracy and is suitable for scenarios that require high speed and lightweight models.
[0042] Use medical test order images of different types and sizes with text area marks as input to train the YOLOv5s network, and use the text area bounding box corresponding to the test indicator of each medical test order image as a label to train the YOLOv5s network to obtain a YOLOv5s model for identifying the text area of the test indicator of the medical test order image; input the preprocessed medical test order image into the trained YOLOv5s model to extract the target in the test indicator table area;
[0043] According to the image information of the historical medical test sheets, a total of n table areas of the medical test sheets are extracted, and the table area images are preprocessed, wherein the logic of the preprocessing is: using a wavelet transform denoising method to denoise the medical test sheet images;
[0044] The denoising method of wavelet transform is used to denoise the table area of the medical test form. The specific steps of the wavelet transform denoising method include: converting the table area of the medical test form into a grayscale image, normalizing the image so that the grayscale value is between 0 and 1; selecting a suitable wavelet basis function and determining the wavelet function (such as Daubechies wavelet db4); selecting the number of layers of wavelet decomposition, generally 3 to 5 layers; thresholding the wavelet coefficients, selecting a threshold method, the threshold method includes a hard threshold or a soft threshold, and calculating the threshold; performing inverse wavelet transform on the wavelet coefficients after thresholding, and reconstructing the denoised image; wherein the threshold is calculated using the VisuShr ink method, and the specific calculation formula is:
[0045]
[0046] In the formula, lam is the threshold, sig is the standard deviation of the noise, and p is the total number of pixels in the image;
[0047] The logic of the enhancement processing of the table area of the medical test report is: using the linear stretching method. Linear stretching (Linear Map) is a simple and commonly used image enhancement technology, which is mainly used to adjust the contrast of the image and map the grayscale dynamic range (i.e. the range of pixel values) of the image to be processed to a specified range. According to the linear mapping relationship, the grayscale dynamic range of the table area of the medical test report is expanded to the specified range. The formula for linear stretching is:
[0048]
[0049] Where V j is the gray value of the jth pixel in the table area image of the medical test form. The first pixel in the upper left corner of the image to be preprocessed is the first pixel. The labels are arranged in order of row priority. Vmin Represents the minimum gray value in the medical test order image, V max It represents the maximum gray value in the medical test order image, D represents the dynamic range of the image after gray compression, and D1 represents the minimum gray value of the compressed image.
[0050] Step 2: segmenting the preprocessed table area image of the medical test form, separating the test index name, test index value and reference range data columns in the table area of the medical test form, extracting the test index name text block, test index value text block and reference range data text block, and generating a test index name text block data set, a test index value text block data set and a reference range data text block data set according to different text blocks;
[0051] The obtained pre-processed table area image of the medical test form is segmented to obtain the test index name text block, the test index value text block and the reference range data text block. The logic is as follows: the text area image to be detected is segmented by page segmentation. The page segmentation first divides the image into columns to split it into a series of pictures containing a row of text, and then the image is segmented to separate the results of different columns in the table, thereby obtaining the test index name text block, the test index value text block and the reference range data text block. The obtained text blocks are saved in the test index name text block data set, the test index value text block data set and the reference range data text block data set;
[0052] Among them, the commonly used row and column segmentation algorithms include the projection method. The basic steps of the image projection method are: first, the image needs to be binarized, and the grayscale image is converted into a binary image, in which the text is usually black and the background is white. Then, each row of the image is traversed, and the number of black pixels in the row is calculated, which is achieved through simple accumulation; a horizontal projection graph is generated, and the number of pixels in each row is plotted as a graph, with the horizontal axis representing the row number and the vertical axis representing the number of pixels; a vertical projection graph is calculated: each column of the image is traversed, and the number of black pixels in the column is calculated, and a vertical projection graph is generated: the number of pixels in each column is plotted as a graph, with the horizontal axis representing the column number and the vertical axis representing the number of pixels; based on the horizontal and vertical projection graphs, the peaks and troughs can be clearly seen, and then the threshold is set manually or some rules are used adaptively to set the threshold, and the trough position is found as the segmentation point of the image, so as to complete the function of detecting text in the image and segmenting the text blocks.
[0053] Step 3: Establish a mapping relationship extraction model, use the text images in the three data sets as the input of the mapping relationship extraction model, and use the mapping relationship between the manually labeled test indicator name text blocks, test indicator value text blocks, and reference range data text blocks as labels to train the mapping relationship extraction model;
[0054] A mapping relationship extraction model was established, wherein the mapping relationship extraction model was constructed by using a convolutional neural network. The text images in the three data sets were used as the input of the mapping relationship extraction model. The mapping relationship between the manually labeled test indicator name text blocks, test indicator value text blocks and reference range data text blocks was used as a label to train the mapping relationship extraction model, thereby obtaining the test indicator value and reference range data corresponding to each test indicator name.
[0055] Step 4: Collect image information of the medical test sheet to be identified, extract the table area, and perform preprocessing and segmentation to obtain a test indicator name text tile data set, a test indicator value text tile data set, and a reference range data text tile data set, and input the data in the three data sets into the mapping relationship extraction model obtained by the method of establishing a mapping relationship extraction model to obtain several groups of test indicator names, test indicator values, and reference range data text tiles with mapping relationships;
[0056] Each text tile of the test report image is input into the mapping relationship extraction model. The mapping relationship extraction model is a deep convolutional neural network, which contains multiple convolutional layers, pooling layers, and fully connected layers. The image passes through a series of convolutional layers, each of which is composed of multiple convolutional kernels. These convolutional kernels slide on the image and calculate local features to reduce the spatial dimension of the feature map while retaining important feature information. The commonly used pooling operation is maximum pooling, which selects the maximum value in the local area as the output; through the combination of multiple convolutional and pooling layers, the mapping relationship extraction model can extract multi-level features of the image, which gradually transition from low-level edge and texture information to more advanced shape features, and output a text image group with a mapping relationship.
[0057] Step 5: Perform text recognition and text extraction on the obtained groups of text blocks with mapping relationships, obtain table data with one-to-one correspondence between the test indicator name, test indicator value and reference range data, compare the test indicator value with the reference range data, and determine the abnormal situation of the test indicator.
[0058] The obtained groups of text blocks with mapping relationships are subjected to text recognition and text extraction, wherein the method of performing text recognition and text extraction is: using an OCR method to automatically recognize the text in the groups of text blocks with mapping relationships, and converting them into an editable and searchable text format,
[0059] Among them, OCR is optical character recognition, which is used to automatically recognize text in images and convert it into editable and searchable text format. OCR systems are widely used in document management, data entry, automated office and other fields. The specific steps include: taking text blocks with mapping relationships as input, converting color images into grayscale images, simplifying subsequent processing, and converting grayscale images into binary images, usually with text in black and background in white; using Canny or other edge detection algorithms to identify edges in the image and segment the detected text lines into individual words; extracting features such as character shape, size, and strokes, matching the extracted features with predefined character templates, and outputting the recognized text into editable text formats, such as TXT and DOCX;
[0060] According to the extracted text information, the test index value is compared with the reference range data, and the test index value is calibrated as S i The minimum and maximum values of the reference range data are marked as S mini and S maxi ,
[0061] When S mini ≤S i ≤S maxi When , it indicates that the indicator is within the normal range;
[0062] When S mini ≥S i Or S ≥ S maxi When , it indicates that the indicator is not within the normal range, and ∞ is marked after the indicator name, indicating that the indicator is abnormal.
[0063] See also Figure 2 The present invention also provides a system for extracting test result information from medical tests based on image recognition, wherein the system for extracting test result information from medical tests based on image recognition is used to execute the above-mentioned method for extracting test result information from medical tests based on image recognition, and comprises:
[0064] An image acquisition and processing module is used to acquire image information of historical medical test sheets, extract the table area of the medical test sheet from the original image of the medical test sheet according to the table characteristics of the medical test sheet, and pre-process the table area image, wherein the pre-processing includes image denoising and enhancement processing to obtain the pre-processed table area image of the medical test sheet;
[0065] An image segmentation module is used to segment the table area image of the preprocessed medical test form, separate the test index name, test index value and reference range data columns in the table area of the medical test form, extract the test index name text block, test index value text block and reference range data text block, and generate a test index name text block data set, a test index value text block data set and a reference range data text block data set according to different text blocks;
[0066] A mapping relationship extraction module is used to establish a mapping relationship extraction model, take the text images in the three data sets as the input of the mapping relationship extraction model, and use the mapping relationship between the manually labeled test indicator name text blocks, test indicator value text blocks and reference range data text blocks as labels to train the mapping relationship extraction model;
[0067] A real-time image analysis module is used to collect image information of a medical test sheet to be identified, extract a table area, and perform preprocessing and segmentation to obtain a test index name text tile data set, a test index value text tile data set, and a reference range data text tile data set, and input the data in the three data sets into a mapping relationship extraction model obtained by a method for establishing a mapping relationship extraction model to obtain a plurality of groups of test index names, test index values, and reference range data text tiles having mapping relationships;
[0068] The text extraction module is used to perform text recognition and text extraction on the obtained groups of text blocks with mapping relationships, obtain table data with one-to-one correspondence between the test indicator name, the test indicator value and the reference range data, compare the test indicator value with the reference range data, and judge the abnormal situation of the test indicator.
[0069] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters in the formula are set by technicians in this field according to actual conditions.
[0070] The above embodiments may be implemented in whole or in part by software, hardware, firmware or any other combination thereof. When implemented by software, the above embodiments may be implemented in whole or in part in the form of a computer program product. Those skilled in the art may appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein may be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed by hardware or software methods depends on the specific application and design constraints of the technical solution.
[0071] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, and may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0072] The above description is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.
Claims
1. A method for extracting test result information from medical tests based on image recognition, It is characterized in that The specific steps include: Collect image information of historical medical test reports, extract the table area of the medical test report from the original image of the medical test report according to the table characteristics of the medical test report, and pre-process the table area image, wherein the pre-processing includes image denoising and enhancement processing to obtain the pre-processed table area image of the medical test report; Segmenting the preprocessed table area image of the medical test form, separating the test indicator name, test indicator value and reference range data columns in the table area of the medical test form, extracting the test indicator name text block, test indicator value text block and reference range data text block, and generating a test indicator name text block data set, a test indicator value text block data set and a reference range data text block data set according to different text blocks; A mapping relationship extraction model was established, and the text images in the three data sets were used as the input of the mapping relationship extraction model. The mapping relationship between the manually labeled test indicator name text blocks, test indicator value text blocks, and reference range data text blocks was used as the label to train the mapping relationship extraction model. Collect image information of the medical test sheet to be identified, extract the table area, and perform preprocessing and segmentation to obtain a test indicator name text tile data set, a test indicator value text tile data set, and a reference range data text tile data set, input the data in the three data sets into a mapping relationship extraction model obtained by the method of establishing a mapping relationship extraction model, and obtain several groups of test indicator names, test indicator values, and reference range data text tiles with mapping relationships; The obtained groups of text blocks with mapping relationships are subjected to text recognition and text extraction to obtain table data with one-to-one correspondence between the test indicator name, the test indicator value and the reference range data. The test indicator value is compared with the reference range data to determine the abnormal situation of the test indicator.
2. A method for extracting test result information from medical tests based on image recognition according to claim 1, Features: According to the table characteristics of the medical test report, the table area of the medical test report is extracted from the original image of the medical test report. The method for obtaining the table area of the medical test report is as follows: using the YOLOv5s network to perform table area bounding box recognition on the table area image of the medical test report, sorting out medical test report images of different types and sizes containing table marks, and using the table area bounding box corresponding to the test index of each medical test report image as a label. The trained YOLOv5s network is used to identify the table area in the medical test report image and mark the table area, and extract the marked table area image.
3. A method for extracting test result information from medical tests based on image recognition according to claim 2, Features: According to the image information of the historical medical test sheets, a total of n table areas of the medical test sheets are extracted, and the table area images are preprocessed, wherein the logic of the preprocessing is: the medical test sheet images are denoised by using a wavelet transform denoising method, and the specific steps of the wavelet transform denoising method include: decomposing the medical test sheet images by wavelet transform to obtain wavelet coefficients of the images at different scales and directions; thresholding the wavelet coefficients to set the low-amplitude wavelet coefficients to zero and retaining the high-amplitude wavelet coefficients; inversely transforming the wavelet coefficients after the thresholding process, reconstructing the processed coefficients into an image, and completing the denoising process of the medical test sheet images; The logic of the enhancement processing of the medical test report image is: using the linear stretching method, the grayscale dynamic range of the medical test report image is expanded to the specified range according to the linear mapping relationship. The formula for the linear stretching is: Where V j is the gray value of the jth pixel in the medical test order image. The first pixel in the upper left corner of the image to be preprocessed is the first pixel. The labels are arranged in order of row priority. V min Represents the minimum gray value in the medical test order image, V max represents the maximum grayscale value in the medical test image, D represents the dynamic range of the image after the grayscale is compressed, and D 1 Indicates the minimum grayscale value of the compressed image.
4. A method for extracting test result information from medical tests based on image recognition according to claim 1, Features: The logic of segmenting the table area image of the preprocessed medical test report to obtain the test index name text block, the test index value text block and the reference range data text block is as follows: the text area image to be detected is segmented by page segmentation. The page segmentation first divides the image into columns and splits it into a series of pictures containing a row of text. Then the image is segmented to separate the results of different columns in the table, thereby obtaining the test index name text block, the test index value text block and the reference range data text block. The obtained text blocks are saved in the test index name text block data set, the test index value text block data set and the reference range data text block data set.
5. A method for extracting test result information from medical tests based on image recognition according to claim 4, Features: A mapping relationship extraction model was established, wherein the mapping relationship extraction model was constructed by using a convolutional neural network. The text images in the three data sets were used as the input of the mapping relationship extraction model. The mapping relationship between the manually labeled test indicator name text blocks, test indicator value text blocks and reference range data text blocks was used as a label to train the mapping relationship extraction model, thereby obtaining the test indicator value and reference range data corresponding to each test indicator name.
6. A method for extracting test result information from medical tests based on image recognition according to claim 1, Features: The obtained groups of text blocks with mapping relationships are subjected to text recognition and text extraction, wherein the method for performing text recognition and text extraction is: using an OCR method to automatically recognize the text in the groups of text blocks with mapping relationships, and converting them into an editable and searchable text format.
7. A method for extracting test result information from medical tests based on image recognition according to claim 6, Features: According to the extracted text information, the test index value is compared with the reference range data, and the test index value is calibrated as S i The minimum and maximum values of the reference range data are marked as S mini and S maxi , When S mini ≤S i ≤S maxi When , it indicates that the indicator is within the normal range; When S mini ≥S i Or S ≥ S maxi When , it indicates that the indicator is not within the normal range, and ∞ is marked after the indicator name, indicating that the indicator is abnormal.
8. A system for extracting test result information from medical tests based on image recognition, Features: The system for extracting test result information from medical tests based on image recognition is used to execute the method for extracting test result information from medical tests based on image recognition according to any one of claims 1 to 7, comprising: An image acquisition and processing module is used to acquire image information of historical medical test sheets, extract the table area of the medical test sheet from the original image of the medical test sheet according to the table characteristics of the medical test sheet, and pre-process the table area image, wherein the pre-processing includes image denoising and enhancement processing to obtain the pre-processed table area image of the medical test sheet; An image segmentation module is used to segment the table area image of the preprocessed medical test form, separate the test index name, test index value and reference range data columns in the table area of the medical test form, extract the test index name text block, test index value text block and reference range data text block, and generate a test index name text block data set, a test index value text block data set and a reference range data text block data set according to different text blocks; A mapping relationship extraction module is used to establish a mapping relationship extraction model, take the text images in the three data sets as the input of the mapping relationship extraction model, and use the mapping relationship between the manually labeled test indicator name text blocks, test indicator value text blocks and reference range data text blocks as labels to train the mapping relationship extraction model; A real-time image analysis module is used to collect image information of a medical test sheet to be identified, extract a table area, and perform preprocessing and segmentation to obtain a test index name text tile data set, a test index value text tile data set, and a reference range data text tile data set, and input the data in the three data sets into a mapping relationship extraction model obtained by a method for establishing a mapping relationship extraction model to obtain a plurality of groups of test index names, test index values, and reference range data text tiles having mapping relationships; The text extraction module is used to perform text recognition and text extraction on the obtained groups of text blocks with mapping relationships, obtain table data with one-to-one correspondence between the test indicator name, the test indicator value and the reference range data, compare the test indicator value with the reference range data, and judge the abnormal situation of the test indicator.
Citation Information
Patent Citations
Method for extracting lab test result from medical lab sheet image
CN106446881A
Cited By
Intelligent analysis method and system for medical laboratory sheet
CN120375407A
An intelligent parsing method and system for medical test reports
CN120375407B
