CN118135333A - Medical picture intelligent sorting method and device, electronic equipment and readable storage medium - Google Patents
Medical picture intelligent sorting method and device, electronic equipment and readable storage medium Download PDFInfo
- Publication number
- CN118135333A CN118135333A CN202410524568.7A CN202410524568A CN118135333A CN 118135333 A CN118135333 A CN 118135333A CN 202410524568 A CN202410524568 A CN 202410524568A CN 118135333 A CN118135333 A CN 118135333A
- Authority
- CN
- China
- Prior art keywords
- medical
- text
- picture
- sorting
- category
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 45
- 238000012545 processing Methods 0.000 claims description 7
- 238000001914 filtration Methods 0.000 claims description 3
- 238000012549 training Methods 0.000 description 34
- 238000001514 detection method Methods 0.000 description 18
- 238000012360 testing method Methods 0.000 description 16
- 230000008569 process Effects 0.000 description 13
- 238000004422 calculation algorithm Methods 0.000 description 12
- 238000007689 inspection Methods 0.000 description 12
- 238000013527 convolutional neural network Methods 0.000 description 10
- 238000003745 diagnosis Methods 0.000 description 9
- 238000013135 deep learning Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 5
- 238000013528 artificial neural network Methods 0.000 description 4
- 238000002372 labelling Methods 0.000 description 4
- 238000012986 modification Methods 0.000 description 4
- 230000004048 modification Effects 0.000 description 4
- 238000012795 verification Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 3
- ORILYTVJVMAKLC-UHFFFAOYSA-N Adamantane Natural products C1C(C2)CC3CC1CC2C3 ORILYTVJVMAKLC-UHFFFAOYSA-N 0.000 description 2
- 102000017011 Glycated Hemoglobin A Human genes 0.000 description 2
- 108010014663 Glycated Hemoglobin A Proteins 0.000 description 2
- 230000006399 behavior Effects 0.000 description 2
- 238000007635 classification algorithm Methods 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 125000004122 cyclic group Chemical group 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 238000005457 optimization Methods 0.000 description 2
- 230000007170 pathology Effects 0.000 description 2
- 238000011176 pooling Methods 0.000 description 2
- 238000007781 pre-processing Methods 0.000 description 2
- 230000005855 radiation Effects 0.000 description 2
- 230000000306 recurrent effect Effects 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 238000002604 ultrasonography Methods 0.000 description 2
- 238000010200 validation analysis Methods 0.000 description 2
- 230000000007 visual effect Effects 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 230000004075 alteration Effects 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 239000008280 blood Substances 0.000 description 1
- 210000004369 blood Anatomy 0.000 description 1
- 239000011365 complex material Substances 0.000 description 1
- 238000009472 formulation Methods 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000012216 screening Methods 0.000 description 1
- 238000012163 sequencing technique Methods 0.000 description 1
- 230000007723 transport mechanism Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/764—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q40/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/08—Insurance
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V30/00—Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
- G06V30/10—Character recognition
- G06V30/19—Recognition using electronic means
- G06V30/19007—Matching; Proximity measures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V30/00—Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
- G06V30/10—Character recognition
- G06V30/19—Recognition using electronic means
- G06V30/191—Design or setup of recognition systems or techniques; Extraction of features in feature space; Clustering techniques; Blind source separation
- G06V30/19173—Classification techniques
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Business, Economics & Management (AREA)
- Accounting & Taxation (AREA)
- Finance (AREA)
- Marketing (AREA)
- Artificial Intelligence (AREA)
- Technology Law (AREA)
- Strategic Management (AREA)
- Economics (AREA)
- Development Economics (AREA)
- Health & Medical Sciences (AREA)
- General Business, Economics & Management (AREA)
- Computing Systems (AREA)
- Databases & Information Systems (AREA)
- Evolutionary Computation (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Software Systems (AREA)
- Medical Treatment And Welfare Office Work (AREA)
Abstract
The invention provides an intelligent medical picture sorting method, an intelligent medical picture sorting device, electronic equipment and a readable storage medium, which can accurately, efficiently and conveniently sort medical pictures, solve the problems of complicated operation, time consumption, low efficiency and high error rate caused by manually sorting the medical pictures in the prior art, and enable intelligent insurance claim settlement to be possible.
Description
Technical Field
The invention belongs to the technical field of intelligent insurance claims, and particularly relates to an intelligent medical picture sorting method, an intelligent medical picture sorting device, electronic equipment and a readable storage medium.
Background
In the past, for many insurance institutions, because of multiple medical picture patterns, complex materials and large quantity, sorting, auditing and inputting are often needed by relying on manpower in the past, which not only results in long consumption of the claim settlement process, poor user service experience, but also causes huge manpower investment and high operation cost of the institutions. Insurance claims are rapidly evolving in an intelligent manner. In an actual business scene, a user uploads various kinds of medical pictures, which has high requirements on the accuracy of medical picture identification, because the accuracy of medical picture identification determines the effect of subsequent layout analysis and compensation rule formulation, and in addition, intelligent insurance claims have different settlement modes on bills of clinic, hospitalization, diagnosis and the like, and the compensation rules in different areas are also different. Therefore, how to classify notes (medical pictures) has become a problem to be solved in the field of intelligent insurance claims.
Disclosure of Invention
Based on the above, the technical problems, an intelligent medical picture sorting method, an intelligent medical picture sorting device, electronic equipment and a readable storage medium are provided.
The technical scheme adopted by the invention is as follows:
as a first aspect of the present invention, there is provided an intelligent sorting method of medical pictures, including:
S101, acquiring a medical picture;
s102, inputting the medical pictures into a pre-trained sorting model to obtain a first sorting result corresponding to the medical pictures: a category and a first confidence level corresponding to the category;
s103, if the first confidence coefficient is higher than a first threshold value, determining the category of the medical picture according to the first sorting result, and if not, executing the next step;
S104, locating text areas in the medical picture and identifying text information in each text area;
S105, matching text information in each text area with dictionary data to obtain a second sorting result corresponding to the medical picture: a category and a second confidence level corresponding to the category;
and S106, if the second confidence coefficient is higher than a second threshold value, determining the category of the medical picture according to the second sorting result.
As a second aspect of the present invention, there is provided an intelligent medical picture sorting apparatus comprising:
The image acquisition module is used for acquiring medical images;
the first sorting result determining module is used for inputting the medical pictures into a pre-trained sorting model to obtain first sorting results corresponding to the medical pictures: a category and a first confidence level corresponding to the category;
a first sorting result judging module, configured to determine a category of the medical picture according to the first sorting result if the first confidence coefficient is higher than a first threshold value, and otherwise, execute the next step;
the text positioning and identifying module is used for positioning text areas in the medical picture and identifying text information in each text area;
the second sorting result determining module is used for matching the text information in each text area with dictionary data to obtain a second sorting result corresponding to the medical picture: a category and a second confidence level corresponding to the category;
And the second sorting result judging module is used for determining the category of the medical picture according to the second sorting result if the second confidence coefficient is higher than a second threshold value.
As a third aspect of the present invention, there is provided an electronic device comprising a memory module including instructions loaded and executed by a processor, which when executed, cause the processor to perform a medical picture intelligent sorting method of the first aspect described above.
As a fourth aspect of the present invention, there is provided a computer-readable storage medium storing one or more programs which, when executed by a processor, implement a medical picture intelligent sorting method of the first aspect described above.
The invention can accurately, efficiently and conveniently sort the medical pictures, solves the problems of complicated operation, time consumption, low efficiency and high error rate caused by manually sorting the medical pictures in the prior art, and makes intelligent insurance claim settlement possible.
Drawings
The invention is described in detail below with reference to the attached drawings and detailed description:
fig. 1 is a flowchart of an intelligent sorting method for medical pictures according to an embodiment of the present invention;
Fig. 2 is a schematic diagram of an intelligent medical picture sorting device according to an embodiment of the present invention;
Fig. 3 is a schematic diagram of an electronic device according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of each line of data in a label. Txt file according to an embodiment of the present invention;
Fig. 5 is a schematic diagram of a medical picture according to an embodiment of the invention.
Detailed Description
Embodiments of the present invention will be described below with reference to the drawings. The embodiments described in the present specification are not intended to be exhaustive or to represent the only embodiments of the present invention. The following examples are presented for clarity of illustration of the invention of the present patent and are not intended to limit the embodiments thereof. It will be apparent to those skilled in the art that various changes and modifications can be made in the embodiment described, and that all the obvious changes or modifications which come within the spirit and scope of the invention are deemed to be within the scope of the invention.
As shown in fig. 1, an embodiment of the present application provides an intelligent sorting method for medical pictures, which is used for sorting physical examination reports, inspection reports, medical record reports, emergency medical records, bills, clinic invoices, hospitalization invoices, and hospitalization medical records, and the hospitalization medical records are composed of admission records, discharge nodules, diagnosis certificates, operation records, and first pages of medical records, that is, sorting categories of the method of the embodiment of the present application include physical examination reports, inspection reports, medical record reports, emergency medical records, bills, clinic invoices, hospitalization invoices, admission records, discharge nodules, diagnosis certificates, operation records, and first pages of medical records, and the specific procedures of the method are as follows:
S101, acquiring medical pictures.
In practical applications, the medical picture may have an angle inclination problem, so the medical picture needs to be corrected first. In the present embodiment, the inclination angle is divided into clockwiseThe specific processes of the four types of forward treatment are as follows:
101a) Determining the angle of a picture: based on the direction of the characters in the picture, if the direction is upward, the picture is If the direction is right, the picture is/>If the direction is downward, the picture is/>If the direction is left, the picture is/>。
The angle is identified here using a direction detection model, which is trained as follows:
(1) Sample data are prepared, and sample data with different inclination angles are generated by adopting a manual and automatic labeling mode: Sample data is generated at 1:1.
(2) Preprocessing sample data: sample data at 0 degrees are named: sample data of 0_entityname, 90 degrees is named as 90_entityname, sample data of 180 degrees is named as 180_entityname, sample data of 270 degrees is named as 270_entityname, and a label. Txt file is generated, wherein each line of data in the label. Txt file contains a picture path and a tag value, as shown in fig. 4. And respectively extracting data from the label. Txt file according to the ratio of 2:8 to generate a test. Txt file and a train. Txt file.
(3) By using an Adam optimization algorithm as an optimizer of a direction detection model, a training script presets a batch_size of 10, an epoch of 20, an eval_batch_step of 1500, and num_works of 4, and in the model training and training process, train. Txt and test. Txt are read, and the accuracy of the model is improved by continuously adjusting parameters.
101B) Since the subsequent operations are all based onThe pictures are processed so that/>、/>And/>Is rotated to/>. Here the rotation algorithm in cv2 is used to operate on the picture.
S102, inputting medical pictures into a pre-trained sorting model to obtain a first sorting result of the corresponding medical pictures: a category and a first confidence level corresponding to the category.
In this embodiment, the sorting model is implemented using a PADDLECLAS image classification tool library constructed based on PADDLEPADDLE deep learning framework. The classification algorithm used at the PADDLECLAS level is mainly a convolutional neural network (Convolutional Neural Networks, CNN). CNN is a class of deep learning algorithms that perform well in image recognition and computer vision tasks. The basic idea is to simulate the working principle of the human visual system, gradually extract the characteristics in the image through multi-layer convolution operation and pooling operation, and finally classify or regress through a full connection layer.
Sorting model training prepares a training set, a validation set and a test set in a fixed ratio (7:2:1). The training set is used for training the model, so that the model can identify different types of characteristics. The verification set is a test set in the training process, so that the model training degree can be checked conveniently in the training process. And the test set is used for evaluating the model result after the training model is finished. The configuration file is modified to respectively set parameters such as a network structure, a classification number, a training and verification path, an image size, a learning rate, iteration times and the like. After model training is finished, the model effect is tested through a testing set, and Precision, recall, hmean is mainly used for evaluating the model quality. And continuously adjusting the parameter training model until an optimal result is reached. The training steps of the sorting model are as follows:
(1) Sample data are prepared, different types of sample data are generated by adopting a manual and automatic labeling mode, and 6000 pieces of sample data are prepared by a training set. The medical records of the medical records, the examination report, the medical record report, the emergency medical record, the bill of charge, the invoice of the clinic, the invoice of the hospitalization and the medical record of the hospitalization are respectively prepared into 750 pictures, and the admission record, the discharge nub, the diagnosis evidence, the operation record and the first page of the medical record are respectively prepared into 125 pictures. The samples were preprocessed and the physical examination report class sample data was named TJBG _ ENTITYNAME, the test report was named JYBG _ ENTITYNAME, the medical record was named BLBG _ ENTITYNAME, the emergency medical record was named mjz_ ENTITYNAME, the bill of charge was named FYQD _ ENTITYNAME, the hospitalization invoice was named zyfp_ ENTITYNAME and the hospitalization class medical record was named ZYBL _ ENTITYNAME.
(2) The train and test. Txt are also prepared according to the training mode of the direction detection model, and sorting labels corresponding to the physical examination report, the inspection report, the medical record report, the emergency medical record, the expense list, the outpatient invoice, the inpatient invoice and the inpatient medical record are TJBG, JYBG, BLBG, MJZ, FYQD, ZYFP and ZYBL respectively. Wherein, the labels corresponding to the subdivision type admission record, discharge nodule, diagnosis evidence, operation record and medical records first page are RYJL, CYJL, CYXJ, ZDZM, SSJL and BASY respectively. And the accuracy of the sorting model is improved by continuously adjusting the parameters.
And S103, if the first confidence coefficient is higher than a first threshold value, determining the category of the medical picture according to the first sorting result, and if not, executing the next step.
S104, locating text areas in the medical picture, and identifying text information in each text area.
When the text areas in the medical picture are positioned, the text areas in the medical picture are positioned through the text boxes, and the coordinates of the text boxes are output. The present embodiment employs an OCR tool PaddleOCR based on PADDLEPADDLE deep learning framework to handle text detection and text recognition tasks. Text detection algorithms are mainly EAST (EFFICIENT AND Accurate Scene Text Detection) and DB (DeepText Detection Benchmark), and the like, and can efficiently and accurately locate a text region and output coordinate information of the text region. The text recognition algorithms mainly comprise CRNN (Convolutional Recurrent Neural Network), rosetta and the like, and the algorithms are combined with a convolutional neural network and a cyclic neural network, so that the characters can be accurately recognized, and the characters with different fonts, sizes, angles and arrangement modes can be included. PaddleOCR includes a text detection and file identification calling method, which can rapidly and accurately output coordinate information rect and text information text of characters included in the identification result set resList. The text box position rect is expressed in the forms of [ [ x1, y1], [ x2, y2], [ x3, y3], [ x4, y4] ] and respectively represents four points of upper left, upper right, lower right and lower left. The output format is shown below :{ "text": "xxxx", "score": 0.9942019581794739,"rect":[[915.0,26.0],[1184.0,11.0],[1185.0, 30.0],[916.0,46.0]]}, where score represents the confidence level.
S105, matching the text information in each text area with dictionary data to obtain a second sorting result of the corresponding medical pictures: a category and a second confidence level corresponding to the category.
In order to improve the sorting efficiency, the keyword area of the medical picture can be determined first, and then sorting is performed based on the keyword area, and the specific process is as follows:
105a) Determining a keyword area of the medical picture according to the coordinates of each text box:
a1. and respectively determining the center coordinates of each text box according to the coordinates of each text box.
A2. taking the median value of the central ordinate of each text box as a line height threshold value.
A3. traversing each text box, and determining the row and total row number of each text box: if the difference value of the central longitudinal coordinates of the two text boxes is smaller than the high threshold value, the two text boxes belong to the same row, so that the text boxes can be determined to which row respectively belongs, and the total row number is further obtained.
In this embodiment, the text boxes are first sorted from small to large according to the ordinate and the abscissa of the center point, see table 1, and then traversed.
text | rect |
Shanxi province people's hospital | [388.0, 43.0], [809.0, 41.0], [810.0, 73.0],[388.0, 75.0] |
Center free glycosylated hemoglobin report | [411.0, 83.0], [782.0, 82.0], [782.0, 106.0],[411.0, 107.0] |
Sample number: often 20 | [909.0, 74.0], [1081.0, 76.0], [1081.0, 97.0],[908.0, 95.0] |
The inspection method comprises the following steps: | [875.0, 114.0], [965.0, 116.0], [965.0, 137.0],[874.0, 135.0] |
Name: xxx | [121.0, 117.0], [243.0, 117.0], [243.0, 142.0],[121.0, 142.0] |
Patient ID 0019099699 | [386.0, 119.0], [520.0, 117.0], [520.0, 134.0],[387.0, 136.0] |
Specimen type: whole blood | [605.0, 115.0], [745.0, 115.0], [745.0, 136.0],[605.0, 136.0] |
...... | ...... |
TABLE 1
A4. from top to bottom, taking the region composed of text boxes in 1/k rows of the total number of rows as a keyword region, k being an integer of 2-5, and rounding down the result when the result of dividing the total number of rows by k is not an integer, in this embodiment, for most medical pictures at present, the region composed of text boxes in 1/3 rows of the total number of rows can accurately obtain the keyword region, so k is 3.
The content of the medical picture mainly comprises a title, basic information and a text. The title often contains keyword information such as regional, hospital names, document aliases, etc., common medical document aliases such as XX inspection report sheets, XX inspection reports, bills of fees, bill of fees details, XX operation records, daytime operation admission records, etc.; the basic information includes name, gender, age, diagnosis, etc.; the text then contains detailed information descriptions.
Keyword data is generally extracted from the title or the basic information, keywords are used for representing the category of the medical picture, and the area formed by the title and the basic information is called a keyword area.
105B) And traversing the text information in each text box of the keyword area, and filtering information except the keywords in the text information through the blacklist dictionary data, wherein the blacklist dictionary data comprises basic information such as names, sexes, ages, treatment dates and the like.
105C) And matching the filtered text information with the classification dictionary data to obtain a second classification result. The classification dictionary data is composed of regions, hospital names, document aliases, and sort types, for example, description report document aliases include ultrasound report sheets, radiation reports, pathology reports, inspection reports, and the like, and admission record document aliases include admission records, admission certificates, and the like.
When matching with the classified dictionary data, the similarity between the text information and the classified dictionary data is calculated by adopting Levin Stent distance, and matching is carried out according to the similarity.
And S106, if the second confidence coefficient is higher than a second threshold value, determining the category of the medical picture according to a second sorting result, otherwise, marking the medical picture as to-be-rechecked, transferring to manual processing, and after the manual processing is finished, re-marking the medical picture, sending the medical picture to a sorting model for retraining and correspondingly updating dictionary database data.
Taking the medical picture shown in fig. 5 as an example, the sorting process will be described:
1. Determining that the direction detection result of the medical picture is that by the direction detection model Therefore, the transfer process is not required.
2. Inputting the medical pictures into a sorting model to obtain a first sorting result of the corresponding medical pictures: a category (JYBG) and a first confidence level (0.89) corresponding to the category.
3. The first threshold is set to 0.9 and the first confidence level is less than 0.9, so further sorting is required.
4. A text box for locating text areas in a medical picture, see fig. 5.
5. Sorting all the text boxes from small to large according to the ordinate and the abscissa of the central point, referring to table 1, traversing, taking the median value (21) of the ordinate of the center of each text box as a high threshold, and performing traversing to put the center-free glycosylated hemoglobin report and sample number in the first behavior Shaanxi people-saving hospital and the second behavior: often 20, third action name, and so on, the result of each row ordering and the total number of rows are obtained.
6. The area composed of text boxes in the first three rows finally is a keyword area.
7. And matching the data in the keyword area with the blacklist dictionary data from top to bottom in sequence, and eliminating the name, the sample type and the text data of the inspection method.
8. Traversing the rest keyword data to query classification dictionary data, calculating the similarity between the keyword text and the document alias by using Levin-Style distance, and sequencing according to the similarity from big to small.
9. Setting a second threshold b as 0.9, screening dictionary library values with the similarity larger than 0.9, and acquiring a sorting type corresponding to the maximum similarity and returning.
From the above, the method of the embodiment can accurately, efficiently and conveniently sort the medical pictures, overcomes the problems of complicated operation, time consumption, low efficiency and high error rate caused by manually sorting the medical pictures in the prior art, and makes intelligent insurance claim settlement possible.
The medical picture intelligent sorting apparatus of one or more embodiments of the present invention will be described in detail below. Those skilled in the art will appreciate that these sorting devices may be configured by the steps taught by the present solution using commercially available hardware components. Fig. 2 shows an intelligent medical picture sorting apparatus according to an embodiment of the present invention, as shown in fig. 2, the sorting apparatus includes a picture acquisition module 11, a first sorting result determination module 12, a first sorting result judgment module 13, a text positioning identification module 14, a second sorting result determination module 15, and a second sorting result judgment module 16.
The image acquisition module 11 is used for acquiring medical images.
In practical applications, the medical picture may have an angle inclination problem, so the medical picture needs to be corrected first. In the present embodiment, the inclination angle is divided into clockwiseThe specific processes of the four types of forward treatment are as follows:
101a) Determining the angle of a picture: based on the direction of the characters in the picture, if the direction is upward, the picture is If the direction is right, the picture is/>If the direction is downward, the picture is/>If the direction is left, the picture is/>。
The angle is identified here using a direction detection model, which is trained as follows:
(1) Sample data are prepared, and sample data with different inclination angles are generated by adopting a manual and automatic labeling mode: Sample data is generated at 1:1.
(2) Preprocessing sample data: sample data at 0 degrees are named: sample data of 0_entityname, 90 degrees is named as 90_entityname, sample data of 180 degrees is named as 180_entityname, sample data of 270 degrees is named as 270_entityname, and a label. Txt file is generated, wherein each line of data in the label. Txt file contains a picture path and a tag value, as shown in fig. 4. And respectively extracting data from the label. Txt file according to the ratio of 2:8 to generate a test. Txt file and a train. Txt file.
(3) By using an Adam optimization algorithm as an optimizer of a direction detection model, a training script presets a batch_size of 10, an epoch of 20, an eval_batch_step of 1500, and num_works of 4, and in the model training and training process, train. Txt and test. Txt are read, and the accuracy of the model is improved by continuously adjusting parameters.
101B) Since the subsequent operations are all based onThe pictures are processed so that/>、/>And/>Is rotated to/>. Here the rotation algorithm in cv2 is used to operate on the picture.
The first sorting result determining module 12 is configured to input the medical picture into a pre-trained sorting model, and obtain a first sorting result of the corresponding medical picture: a category and a first confidence level corresponding to the category.
In this embodiment, the sorting model is implemented using a PADDLECLAS image classification tool library constructed based on PADDLEPADDLE deep learning framework. The classification algorithm used at the PADDLECLAS level is mainly a convolutional neural network (Convolutional Neural Networks, CNN). CNN is a class of deep learning algorithms that perform well in image recognition and computer vision tasks. The basic idea is to simulate the working principle of the human visual system, gradually extract the characteristics in the image through multi-layer convolution operation and pooling operation, and finally classify or regress through a full connection layer.
Sorting model training prepares a training set, a validation set and a test set in a fixed ratio (7:2:1). The training set is used for training the model, so that the model can identify different types of characteristics. The verification set is a test set in the training process, so that the model training degree can be checked conveniently in the training process. And the test set is used for evaluating the model result after the training model is finished. The configuration file is modified to respectively set parameters such as a network structure, a classification number, a training and verification path, an image size, a learning rate, iteration times and the like. After model training is finished, the model effect is tested through a testing set, and Precision, recall, hmean is mainly used for evaluating the model quality. And continuously adjusting the parameter training model until an optimal result is reached. The training steps of the sorting model are as follows:
(1) Sample data are prepared, different types of sample data are generated by adopting a manual and automatic labeling mode, and 6000 pieces of sample data are prepared by a training set. The medical records of the medical records, the examination report, the medical record report, the emergency medical record, the bill of charge, the invoice of the clinic, the invoice of the hospitalization and the medical record of the hospitalization are respectively prepared into 750 pictures, and the admission record, the discharge nub, the diagnosis evidence, the operation record and the first page of the medical record are respectively prepared into 125 pictures. The samples were preprocessed and the physical examination report class sample data was named TJBG _ ENTITYNAME, the test report was named JYBG _ ENTITYNAME, the medical record was named BLBG _ ENTITYNAME, the emergency medical record was named mjz_ ENTITYNAME, the bill of charge was named FYQD _ ENTITYNAME, the hospitalization invoice was named zyfp_ ENTITYNAME and the hospitalization class medical record was named ZYBL _ ENTITYNAME.
(2) The train and test. Txt are also prepared according to the training mode of the direction detection model, and sorting labels corresponding to the physical examination report, the inspection report, the medical record report, the emergency medical record, the expense list, the outpatient invoice, the inpatient invoice and the inpatient medical record are TJBG, JYBG, BLBG, MJZ, FYQD, ZYFP and ZYBL respectively. Wherein, the labels corresponding to the subdivision type admission record, discharge nodule, diagnosis evidence, operation record and medical records first page are RYJL, CYJL, CYXJ, ZDZM, SSJL and BASY respectively. And the accuracy of the sorting model is improved by continuously adjusting the parameters.
The first sorting result judging module 13 is configured to determine the category of the medical picture according to the first sorting result if the first confidence coefficient is higher than the first threshold value, and otherwise, execute the next step.
The text positioning and identifying module 14 is used for positioning text areas in the medical picture and identifying text information in each text area.
When the text areas in the medical picture are positioned, the text areas in the medical picture are positioned through the text boxes, and the coordinates of the text boxes are output. The present embodiment employs an OCR tool PaddleOCR based on PADDLEPADDLE deep learning framework to handle text detection and text recognition tasks. Text detection algorithms are mainly EAST (EFFICIENT AND Accurate Scene Text Detection) and DB (DeepText Detection Benchmark), and the like, and can efficiently and accurately locate a text region and output coordinate information of the text region. The text recognition algorithms mainly comprise CRNN (Convolutional Recurrent Neural Network), rosetta and the like, and the algorithms are combined with a convolutional neural network and a cyclic neural network, so that the characters can be accurately recognized, and the characters with different fonts, sizes, angles and arrangement modes can be included. PaddleOCR includes a text detection and file identification calling method, which can rapidly and accurately output coordinate information rect and text information text of characters included in the identification result set resList. The text box position rect is expressed in the forms of [ [ x1, y1], [ x2, y2], [ x3, y3], [ x4, y4] ] and respectively represents four points of upper left, upper right, lower right and lower left. The output format is shown below :{ "text": "xxxx", "score": 0.9942019581794739,"rect":[[915.0,26.0],[1184.0,11.0],[1185.0, 30.0],[916.0,46.0]]}, where score represents the confidence level.
The second sorting result determining module 15 is configured to match text information in each text area with dictionary data, and obtain a second sorting result of the corresponding medical picture: a category and a second confidence level corresponding to the category.
In order to improve the sorting efficiency, the keyword area of the medical picture can be determined first, and then sorting is performed based on the keyword area, and the specific process is as follows:
105a) Determining a keyword area of the medical picture according to the coordinates of each text box:
a1. and respectively determining the center coordinates of each text box according to the coordinates of each text box.
A2. taking the median value of the central ordinate of each text box as a line height threshold value.
A3. traversing each text box, and determining the row and total row number of each text box: if the difference value of the central longitudinal coordinates of the two text boxes is smaller than the high threshold value, the two text boxes belong to the same row, so that the text boxes can be determined to which row respectively belongs, and the total row number is further obtained.
In this embodiment, the text boxes are first sorted from small to large according to the ordinate and the abscissa of the center point, see table 1, and then traversed.
A4. from top to bottom, taking the region composed of text boxes in 1/k rows of the total number of rows as a keyword region, k being an integer of 2-5, and rounding down the result when the result of dividing the total number of rows by k is not an integer, in this embodiment, for most medical pictures at present, the region composed of text boxes in 1/3 rows of the total number of rows can accurately obtain the keyword region, so k is 3.
The content of the medical picture mainly comprises a title, basic information and a text. The title often contains keyword information such as regional, hospital names, document aliases, etc., common medical document aliases such as XX inspection report sheets, XX inspection reports, bills of fees, bill of fees details, XX operation records, daytime operation admission records, etc.; the basic information includes name, gender, age, diagnosis, etc.; the text then contains detailed information descriptions.
Keyword data is generally extracted from the title or the basic information, keywords are used for representing the category of the medical picture, and the area formed by the title and the basic information is called a keyword area.
105B) And traversing the text information in each text box of the keyword area, and filtering information except the keywords in the text information through the blacklist dictionary data, wherein the blacklist dictionary data comprises basic information such as names, sexes, ages, treatment dates and the like.
105C) And matching the filtered text information with the classification dictionary data to obtain a second classification result. The classification dictionary data is composed of regions, hospital names, document aliases, and sort types, for example, description report document aliases include ultrasound report sheets, radiation reports, pathology reports, inspection reports, and the like, and admission record document aliases include admission records, admission certificates, and the like.
When matching with the classified dictionary data, the similarity between the text information and the classified dictionary data is calculated by adopting Levin Stent distance, and matching is carried out according to the similarity.
And the second sorting result judging module 16 is configured to determine the category of the medical picture according to the second sorting result if the second confidence coefficient is higher than the second threshold value, otherwise, mark the medical picture as to-be-rechecked, transfer to manual processing, and re-mark the medical picture after the manual processing is completed, send the medical picture to the sorting model for retraining and update the dictionary database data accordingly.
In summary, the medical picture intelligent sorting device provided in the above embodiments may execute the medical picture intelligent sorting method provided in the above embodiments.
The same concept as that described above, the structure of the intelligent medical picture sorting apparatus shown in fig. 2 may be implemented as an electronic device, and fig. 3 is a schematic block diagram of the structure of the electronic device according to an embodiment of the present invention.
Illustratively, the electronic device includes a memory module 21 and a processor 22, the memory module 21 including instructions loaded and executed by the processor 22, which when executed, cause the processor 22 to perform the steps according to various exemplary embodiments of the present invention described in the foregoing description of an intelligent sorting method of medical pictures.
It should be appreciated that the processor 22 may be a central processing unit (CentralProcessingUnit, CPU), and that the processor 22 may also be other general purpose processors, digital signal processors (DigitalSignalProcessor, DSP), application specific integrated circuits (ApplicationSpecificIntegratedCircuit, ASIC), field programmable gate arrays (Field-ProgrammableGateArray, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. Wherein the general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Embodiments of the present invention also provide a computer-readable storage medium storing one or more programs that, when executed by a processor, implement the steps described in the foregoing description of an intelligent medical picture sorting method section according to various exemplary embodiments of the present invention.
Those of ordinary skill in the art will appreciate that all or some of the steps, systems, functional modules/units in the apparatus, and methods disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between the functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed cooperatively by several physical components. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer-readable storage media, which may include computer-readable storage media (or non-transitory media) and communication media (or transitory media).
The term computer-readable storage medium includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information, such as computer-readable instructions, data structures, program modules or other data, as known to those skilled in the art. Computer-readable storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer. Furthermore, as is well known to those of ordinary skill in the art, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media.
By way of example, the computer readable storage medium may be an internal storage module of the electronic device of the foregoing embodiments, such as a hard disk or a memory of the electronic device. The computer readable storage medium may also be an external storage device of the electronic device, such as a plug-in hard disk provided on the electronic device, a smart memory card (SMARTMEDIACARD, SMC), a secure digital (SecureDigital, SD) card, a flash memory card (FLASHCARD), or the like.
The electronic equipment and the computer readable storage medium provided by the embodiments can accurately, efficiently and conveniently sort the medical pictures, solve the problems of complex operation, time consumption, low efficiency and high error rate caused by manually sorting the medical pictures in the prior art, and enable intelligent insurance claim settlement to be possible.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present application without departing from the scope of the application. Thus, it is intended that the present application also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.
Claims (10)
1. An intelligent sorting method for medical pictures is characterized by comprising the following steps:
S101, acquiring a medical picture;
s102, inputting the medical pictures into a pre-trained sorting model to obtain a first sorting result corresponding to the medical pictures: a category and a first confidence level corresponding to the category;
s103, if the first confidence coefficient is higher than a first threshold value, determining the category of the medical picture according to the first sorting result, and if not, executing the next step;
S104, locating text areas in the medical picture and identifying text information in each text area;
S105, matching text information in each text area with dictionary data to obtain a second sorting result corresponding to the medical picture: a category and a second confidence level corresponding to the category;
and S106, if the second confidence coefficient is higher than a second threshold value, determining the category of the medical picture according to the second sorting result.
2. The intelligent sorting method of medical pictures according to claim 1, wherein the step S101 further comprises:
and carrying out correction processing on the medical picture.
3. The intelligent sorting method of medical pictures according to claim 2, wherein the forwarding of the medical pictures further comprises:
determining the angle of a picture: identifying the direction of the characters in the picture, and if the direction is upward, the picture is If the direction is right, the picture is/>If the direction is downward, the picture is/>If the direction is left, the picture is/>;
Will be、/>And/>Is rotated to/>。
4. The intelligent sorting method of medical pictures according to claim 1, wherein the step S104 further comprises:
and positioning each text area in the medical picture through the text box, and outputting the coordinates of each text box.
5. The intelligent sorting method of medical pictures according to claim 4, wherein said S105 further comprises:
Determining a keyword area of the medical picture according to the coordinates of each text box, wherein the keyword area is an area formed by a title and basic information in the medical picture, and keywords used for representing the category of the medical picture are arranged in the title and basic information;
Traversing text information in each text box of the keyword area, and filtering information except keywords in the text information through blacklist dictionary data;
and matching the filtered text information with the classification dictionary data to obtain the second sorting result.
6. The intelligent sorting method of medical pictures according to claim 5, wherein the determining the keyword area of the medical picture according to the coordinates of each text box further comprises:
Respectively determining the center coordinates of each text box according to the coordinates of each text box;
Taking the median value of the central ordinate of each text box as a high threshold value;
traversing each text box, and determining the row and total row number of each text box: if the difference value of the central longitudinal coordinates of the two text boxes is smaller than the high threshold value, the two text boxes belong to the same row;
Taking a region formed by text boxes in 1/k rows of the total row number as a keyword region from top to bottom;
Wherein k is an integer of 2 to 5.
7. The intelligent sorting method of medical pictures according to claim 5, wherein the matching of the filtered text information with the classification dictionary data further comprises:
and calculating the similarity between the text information and the classification dictionary data by adopting Levin Stent distance, and matching according to the similarity.
8. An intelligent medical picture sorting device, which is characterized by comprising:
The image acquisition module is used for acquiring medical images;
the first sorting result determining module is used for inputting the medical pictures into a pre-trained sorting model to obtain first sorting results corresponding to the medical pictures: a category and a first confidence level corresponding to the category;
a first sorting result judging module, configured to determine a category of the medical picture according to the first sorting result if the first confidence coefficient is higher than a first threshold value, and otherwise, execute the next step;
the text positioning and identifying module is used for positioning text areas in the medical picture and identifying text information in each text area;
the second sorting result determining module is used for matching the text information in each text area with dictionary data to obtain a second sorting result corresponding to the medical picture: a category and a second confidence level corresponding to the category;
And the second sorting result judging module is used for determining the category of the medical picture according to the second sorting result if the second confidence coefficient is higher than a second threshold value.
9. An electronic device comprising a memory module including instructions loaded and executed by a processor, which when executed, cause the processor to perform a medical picture intelligent sorting method according to any of claims 1-7.
10. A computer readable storage medium storing one or more programs, which when executed by a processor, implement a method of intelligent sorting of medical pictures according to any of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410524568.7A CN118135333B (en) | 2024-04-29 | 2024-04-29 | Medical picture intelligent sorting method and device, electronic equipment and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410524568.7A CN118135333B (en) | 2024-04-29 | 2024-04-29 | Medical picture intelligent sorting method and device, electronic equipment and readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN118135333A true CN118135333A (en) | 2024-06-04 |
CN118135333B CN118135333B (en) | 2024-07-26 |
Family
ID=91242868
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410524568.7A Active CN118135333B (en) | 2024-04-29 | 2024-04-29 | Medical picture intelligent sorting method and device, electronic equipment and readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN118135333B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019071661A1 (en) * | 2017-10-09 | 2019-04-18 | 平安科技(深圳)有限公司 | Electronic apparatus, medical text entity name identification method, system, and storage medium |
CN113255642A (en) * | 2021-05-07 | 2021-08-13 | 北京精友时代信息技术发展有限公司 | Medical bill information integration method for injury claims |
EP3923185A2 (en) * | 2021-03-03 | 2021-12-15 | Beijing Baidu Netcom Science And Technology Co., Ltd. | Image classification method and apparatus, electronic device and storage medium |
CN116935130A (en) * | 2023-07-26 | 2023-10-24 | 中国工商银行股份有限公司 | ResNet and OCR-based picture joint classification method and device, electronic equipment and medium |
-
2024
- 2024-04-29 CN CN202410524568.7A patent/CN118135333B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019071661A1 (en) * | 2017-10-09 | 2019-04-18 | 平安科技(深圳)有限公司 | Electronic apparatus, medical text entity name identification method, system, and storage medium |
EP3923185A2 (en) * | 2021-03-03 | 2021-12-15 | Beijing Baidu Netcom Science And Technology Co., Ltd. | Image classification method and apparatus, electronic device and storage medium |
CN113255642A (en) * | 2021-05-07 | 2021-08-13 | 北京精友时代信息技术发展有限公司 | Medical bill information integration method for injury claims |
CN116935130A (en) * | 2023-07-26 | 2023-10-24 | 中国工商银行股份有限公司 | ResNet and OCR-based picture joint classification method and device, electronic equipment and medium |
Also Published As
Publication number | Publication date |
---|---|
CN118135333B (en) | 2024-07-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11816165B2 (en) | Identification of fields in documents with neural networks without templates | |
CN109800761A (en) | Method and terminal based on deep learning model creation paper document structural data | |
CN110245657B (en) | Pathological image similarity detection method and detection device | |
CN109816118A (en) | A kind of method and terminal of the creation structured document based on deep learning model | |
US20200134382A1 (en) | Neural network training utilizing specialized loss functions | |
CN108597565B (en) | Clinical queue data collaborative verification method based on OCR and named entity extraction technology | |
WO2021232670A1 (en) | Pcb component identification method and device | |
US11715288B2 (en) | Optical character recognition using specialized confidence functions | |
CN113158895A (en) | Bill identification method and device, electronic equipment and storage medium | |
CN113837151A (en) | Table image processing method and device, computer equipment and readable storage medium | |
CN113626591A (en) | Electronic medical record data quality evaluation method based on text classification | |
CN111414930B (en) | Deep learning model training method and device, electronic equipment and storage medium | |
CN115082659A (en) | Image annotation method and device, electronic equipment and storage medium | |
CN115311216A (en) | Method, device, equipment and storage medium for interpreting fluorescent picture of antinuclear antibody | |
CN112232288B (en) | Deep learning-based satellite map target recognition method and system | |
CN109241869A (en) | The recognition methods of answering card score, device and terminal device | |
CN118135333B (en) | Medical picture intelligent sorting method and device, electronic equipment and readable storage medium | |
CN113642562A (en) | Data interpretation method, device and equipment based on image recognition and storage medium | |
CN116052848B (en) | Data coding method and system for medical imaging quality control | |
CN112613367A (en) | Bill information text box acquisition method, system, equipment and storage medium | |
CN112418204A (en) | Text recognition method, system and computer medium based on paper document | |
CN112464892B (en) | Bill area identification method and device, electronic equipment and readable storage medium | |
CN116469505A (en) | Data processing method, device, computer equipment and readable storage medium | |
CN114612919A (en) | Bill information processing system, method and device | |
CN113807256A (en) | Bill data processing method and device, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |