Medical picture automatic classification method and device, electronic equipment and storage medium
By extracting text information in medical pictures and using a language model guided by prompt word for classification, the problem of small and medium-sized models relying on labeled data in the existing technology is solved, the efficiency and accuracy of medical picture classification is improved, and the generalization of the model is enhanced. ability.
Patent Information
- Application Number
- CN202411312010.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-20
- Publication Date
- 2025-01-03
AI Technical Summary
The existing automatic classification method of medical pictures relies on small-scale models and requires a large amount of annotated data training, which is time-consuming and labor-intensive and lacks generalization capabilities, and its performance decreases when facing new image categories.
By obtaining medical pictures, extracting text information, selecting prompt words and using trained language models for classification, reducing dependence on labeled data and improving model generalization capabilities.
It significantly reduces labor and time costs, improves the efficiency and accuracy of medical image classification tasks, and enhances the generalization ability and scalability of the model.
Smart Images

Figure CN119251566A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of image processing technology, and specifically relates to a method, device, electronic device and storage medium for automatic classification of medical images. Background Art
[0002] In the digital age, pictures, as an important medium for information transmission, are growing exponentially in number and variety.
[0003] There are many categories of images in the real world. Existing automatic classification methods for medical images, especially those that rely on small-scale models, usually require a large amount of labeled data to train, which is not only time-consuming and labor-intensive, but also costly. In addition, small models often lack sufficient generalization capabilities, and their performance drops sharply when faced with new or unseen image categories. Summary of the invention
[0004] The purpose of this application is to provide a method, device, electronic device and storage medium for automatic classification of medical images to improve the generalization ability of image classification models.
[0005] According to a first aspect of an embodiment of the present application, a method for automatic classification of medical images is provided, and the method may include:
[0006] Get medical images;
[0007] Extract text information from medical images;
[0008] Select prompt words based on text information;
[0009] Use prompt words to guide the trained language model to classify medical images according to text information.
[0010] In some optional embodiments of the present application, extracting text information from a medical image includes:
[0011] Perform image quality assessment on medical images;
[0012] Medical images that meet the image quality standards are converted into text to obtain text information.
[0013] In some optional embodiments of the present application, image quality assessment is performed on a medical image, including:
[0014] Perform resolution detection and contrast analysis on medical images;
[0015] Medical images with a resolution greater than or equal to 300 DPI and a contrast greater than or equal to 0.5 were selected.
[0016] In some optional embodiments of the present application, text conversion processing is performed on medical images whose image quality meets the standard to obtain text information, including:
[0017] Perform OCR processing on medical images that meet the image quality standards to obtain text data;
[0018] The text data is standardized to obtain text information.
[0019] In some optional embodiments of the present application, OCR processing is performed on medical images with image quality that meets the standard to obtain text data, including:
[0020] Perform image denoising, contrast adjustment and binarization processing on medical images that meet the image quality standards to obtain pre-processed images;
[0021] Use the trained text recognition model to perform text recognition on the preprocessed images to obtain text data.
[0022] In some optional embodiments of the present application, using prompt words to guide the trained language model to classify medical images according to text information includes:
[0023] Use the trained language model to perform deep semantic understanding of text information;
[0024] Use prompt words to guide the trained language model to focus on the key parts of the text information;
[0025] Classification of medical images based on key parts.
[0026] In some optional embodiments of the present application, the prompt word is obtained by the following method:
[0027] Analyze the domain categories of text information;
[0028] According to the field category, the text information is input into the prompt word template corresponding to the field category to obtain the complete prompt word information;
[0029] The prompt word templates are carefully selected and manually organized.
[0030] According to a second aspect of an embodiment of the present application, a picture classification device is provided, which may include:
[0031] An acquisition module, used to acquire medical images;
[0032] Extraction module, used to extract text information from medical images;
[0033] A prompt word selection module, used for selecting prompt words according to text information;
[0034] The classification module is used to use prompt words to guide the trained language model to classify medical images according to text information.
[0035] According to a third aspect of an embodiment of the present application, an electronic device is provided, which may include:
[0036] processor;
[0037] a memory for storing processor-executable instructions;
[0038] The processor is configured to execute instructions to implement the method for automatic classification of medical images as shown in any one of the embodiments of the first aspect.
[0039] According to a fourth aspect of an embodiment of the present application, a storage medium is provided. When instructions in the storage medium are executed by a processor of an information processing device or a server, the information processing device or the server implements a method for automatic classification of medical images as shown in any one of the embodiments of the first aspect.
[0040] The above technical solution of the present application has the following beneficial technical effects:
[0041] The method of the embodiment of the present application determines prompt words and uses the prompt words to guide the trained language model to classify medical images according to text information, which significantly reduces the dependence on labeled data and improves the generalization and scalability of the model. This method not only reduces manpower and time costs, but also improves the efficiency and accuracy of medical image classification tasks. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 is a flow chart of a method for automatic classification of medical images in an exemplary embodiment of the present application;
[0043] Figure 2 is a structural schematic diagram of a picture classification device in an exemplary embodiment of the present application;
[0044] Figure 3 is a schematic structural diagram of an electronic device in an exemplary embodiment of the present application;
[0045] Figure 4 It is a schematic diagram of the hardware structure of an electronic device in an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0046] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below in conjunction with specific implementations and with reference to the accompanying drawings. It should be understood that these descriptions are only exemplary and are not intended to limit the scope of the present application. In addition, in the following description, the description of known structures and technologies is omitted to avoid unnecessary confusion of the concepts of the present application.
[0047] The accompanying drawings show schematic diagrams of layer structures according to embodiments of the present application. These figures are not drawn to scale, and some details are magnified and some details may be omitted for the purpose of clarity. The shapes of various regions and layers shown in the figures and the relative sizes and positional relationships therebetween are only exemplary, and may deviate in practice due to manufacturing tolerances or technical limitations, and those skilled in the art may additionally design regions / layers with different shapes, sizes, and relative positions according to actual needs.
[0048] Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0049] In the description of the present application, it should be noted that the terms "first", "second" and "third" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.
[0050] In addition, the technical features involved in the different embodiments of the present application described below can be combined with each other as long as they do not conflict with each other.
[0051] The following, in conjunction with the accompanying drawings, describes in detail the medical image automatic classification method, device, electronic device and storage medium provided in the embodiments of the present application through specific embodiments and their application scenarios.
[0052] like Figure 1 As shown, in a first aspect of an embodiment of the present application, a method for automatic classification of medical images is provided, and the method may include:
[0053] S110: Obtain medical images;
[0054] S120: extracting text information from the medical image;
[0055] S130: Select prompt words according to text information;
[0056] S140: Use prompt words to guide the trained language model to classify medical images according to text information.
[0057] The method of this embodiment determines prompt words and uses the prompt words to guide the trained language model to classify medical images according to text information, which significantly reduces the dependence on labeled data and improves the generalization and scalability of the model. This method not only reduces manpower and time costs, but also improves the efficiency and accuracy of medical image classification tasks.
[0058] In some embodiments, extracting text information from a medical image includes:
[0059] Perform image quality assessment on medical images;
[0060] Medical images that meet the image quality standards are converted into text to obtain text information.
[0061] In this embodiment, the medical image can also be cropped, color corrected, etc. to ensure the quality of the image. In addition, the image quality assessment in this embodiment is to ensure the subsequent text information recognition and analysis requirements.
[0062] In some embodiments, performing image quality assessment on a medical image includes:
[0063] Perform resolution detection and contrast analysis on medical images;
[0064] Medical images with a resolution greater than or equal to 300 DPI and a contrast greater than or equal to 0.5 were selected.
[0065] When the resolution is greater than or equal to 300 DPI and the contrast is greater than or equal to 0.5, it can be determined that the image has sufficient resolution and contrast to support text information recognition.
[0066] The resolution calculation formula is:
[0067] Resolution (DPI) = number of pixels / image size (inches)
[0068] The contrast ratio is calculated as:
[0069] Contrast Ratio (CR) = x = (L max -L min ) / (L max +L min )
[0070] Among them, L max is the maximum brightness value in the image, L min is the minimum brightness value in the image.
[0071] In some embodiments, text conversion is performed on medical images that meet the image quality standards to obtain text information, including:
[0072] Perform OCR processing on medical images that meet the image quality standards to obtain text data;
[0073] The text data is standardized to obtain text information.
[0074] The standardization process in this embodiment can remove meaningless symbols, unify punctuation formats, and correct erroneous recognition information by cleaning. Specifically, regular expressions are used to match and delete non-printing characters, extra spaces, vertically misaligned punctuation marks, etc. in the text, and character set filtering rules are used to remove or replace erroneous or uncommon characters that may be generated during the text recognition process. Common text recognition errors (such as mistaking "0" (zero) for "O" (letter O)) are corrected.
[0075] In some embodiments, performing OCR processing on a medical image with image quality that meets the standard to obtain text data includes:
[0076] Perform image denoising, contrast adjustment and binarization processing on medical images that meet the image quality standards to obtain pre-processed images;
[0077] Use the trained text recognition model to perform text recognition on the preprocessed images to obtain text data.
[0078] In this embodiment, the accuracy of text recognition is improved by image denoising, contrast adjustment, binarization, etc. Then, a deep learning algorithm is applied in combination with a CNN+RNN model to recognize text in the image.
[0079] Specifically, a large number of labeled image datasets can be used for supervised learning to train CNN and RNN models to recognize different types of text. Then, transfer learning can be applied to use CNN models pre-trained on large datasets (such as ImageNet) as feature extractors to accelerate model training and improve accuracy.
[0080] In some embodiments, using prompt words to guide the trained language model to classify medical images according to text information includes:
[0081] Use the trained language model to perform deep semantic understanding of text information;
[0082] Use prompt words to guide the trained language model to focus on the key parts of the text information;
[0083] Classification of medical images based on key parts.
[0084] For example, the pre-trained ChatGLM-6B language model can be used in combination with training strategies and optimization techniques designed for specific tasks to perform text classification tasks. The ChatGLM-6B language model is not only suitable for conventional text classification scenarios, but can also be customized and fine-tuned to adapt to complex tasks with special requirements for accuracy.
[0085] In some embodiments, the prompt word is obtained by the following method:
[0086] Analyze the domain categories of text information;
[0087] According to the field category, the text information is input into the prompt word template corresponding to the field category to obtain the complete prompt word information;
[0088] The prompt word templates are carefully selected and manually organized.
[0089] The prompt words are guiding texts provided when interacting with the trained language model, which can help communicate with the language model better. By writing clear and unambiguous prompt words, it is possible to accurately express one's intentions and questions, thereby obtaining more accurate answers from the system. The prompt words in the present embodiment are derived from the prompt word library, which is carefully selected and manually organized to cover professional terms and commonly used expressions in each field. These prompt words are used to guide the classification model to more accurately identify and classify image content.
[0090] This embodiment has pre-organized the prompt word template, recognized the medical image as a large paragraph of text, and filled the large paragraph of text into the input part corresponding to the prompt word template. In this way, the complete prompt word can be obtained, and then the prompt word is given to the trained language model, and the trained language model will return the corresponding category.
[0091] Exemplary ones are as follows:
[0092] 1.Upload medical-related pictures.
[0093] 2. Pre-process the uploaded medical images, remove noise, enhance contrast, etc., and then perform OCR recognition to obtain large texts. For example, the medical text obtained is:
[0094] White blood cell count (WBC) 5.5 10^9 / L 4.0-11.0
[0095] Red blood cell count (RBC) 4.7 10^12 / L 4.30-5.80
[0096] 3. Fill the text into the corresponding prompt word template.
[0097] Task Description
[0098] Based on the content of the text provided, please categorize it into one of the predefined categories below. Make sure your categorization is accurate and follows the guidelines given.
[0099] Classification Guide
[0100] Laboratory test images: [Describe the characteristics and typical examples of Category A]
[0101] Medical history picture: [Describe the characteristics and typical examples of category B]
[0102] Radiology pictures: [Describe the characteristics and typical examples of category C]
[0103] Procedure
[0104] 1) Carefully read the text provided.
[0105] 2) Based on the subject and content of the text, determine the category that best suits it.
[0106] 3) If the text is ambiguous or contains multiple topics, please categorize it according to the dominant theme.
[0107] 4) Avoid subjective assumptions and classify only based on the actual content of the text.
[0108] Enter text
[0109] White blood cell count (WBC) 5.5 10^9 / L 4.0-11.0
[0110] Red blood cell count (RBC) 4.7 10^12 / L 4.30-5.80
[0111] Output requirements
[0112] -Each text entry should output a category label.
[0113] - If a text entry belongs to more than one category, select the most relevant category.
[0114] - The output format should be: `[category label]`.
[0115] Example
[0116] Input text: "This is a description of technological progress..."
[0117] Output: `[Category C]`
[0118] Precautions
[0119] Maintain consistency and apply the same classification criteria to similar texts.
[0120] If the text content does not match any of the predefined categories, it can be classified as "other" or "unclassified".
[0121] Avoid over-interpreting the text and stick to the information it provides.
[0122] Additional guidance
[0123] If the text contains specialized terms or abbreviations, please refer to the Glossary.
[0124] For text that is ambiguous or has double meanings, refer to the classification rules or consult a subject matter expert.
[0125] Please strictly follow the above guidelines during the classification process to ensure the accuracy and consistency of the classification. Thank you for your participation and contribution.
[0126] 4. Give the above spliced content to the big model. The big model will directly output the category of this text according to the prompt word: laboratory examination picture
[0127] The prompt word library in this embodiment is not only static, but also has the ability to be dynamically updated. Regular maintenance and expansion of the prompt word library ensures the accuracy and efficiency of the system when processing texts in different fields, and provides users with highly professional and customized services.
[0128] In addition to the above embodiments, a model fine-tuning process is also provided in some embodiments. Select a suitable optimization algorithm, for example, AdamW. AdamW performs well in processing large-scale language models and can better control weight decay. AdamW is an optimization algorithm based on the Adam optimizer with weight decay (Weight Decay), and its formula is as follows:
[0129]
[0130] Among them, θ is the model parameter, is the learning rate, m t and v t are the first-order and second-order moment estimates of the gradient, ε is a small constant, and λ is the weight decay coefficient.
[0131] You can use the learning rate cosine annealing strategy. Use a larger learning rate in the initial stage and gradually reduce it to avoid oscillation in the early stage of training and premature convergence in the later stage. The learning rate adjustment formula of cosine annealing is as follows:
[0132]
[0133] Among them, η min and η max is the minimum and maximum value of the learning rate, T cur is the current iteration number, T max is the total number of iterations.
[0134] In addition, when fine-tuning the model, you can use DataLoader to load training data and perform batch processing to improve training efficiency. DataLoader supports multi-threaded data loading, which can parallelize data preprocessing and loading to improve efficiency.
[0135] Specifically, the pre-trained ChatGLM-6B model is loaded onto the GPU and fine-tuned using medical text classification data. During the fine-tuning process, the gradient accumulation technique is used to deal with the problem of insufficient video memory when training large batches of data. In addition, the validation set can be used to evaluate the model performance, and the evaluation indicators include accuracy, recall, and F1 score. During the evaluation process, the prediction results of each category are recorded, and the confusion matrix is calculated to analyze the performance of the model on different categories. According to the evaluation results, the model's hyperparameters (such as learning rate, weight decay coefficient, etc.) and training strategies are adjusted to further optimize the model performance.
[0136] During the output process, the classification results can be converted into user-readable and operable formats, such as JSON, Markdown, CSV, etc., to meet the needs of different users. To ensure the accuracy and consistency of the output information, data verification and cleaning processes can be performed.
[0137] In order to form a closed-loop feedback mechanism. Users can evaluate the classification results and provide feedback through the interface. Collect this feedback and analyze common error types and changes in user needs. Then, based on user feedback and system performance monitoring data, adjust the system configuration automatically or under the guidance of experts. This may include updating the optimization prompt word set, adjusting the fine-tuning parameters of the classification model, etc. The system optimization module ensures that the technical solution can adapt to new challenges and continue to provide high-quality services.
[0138] It should be noted that the execution subject of the method for automatic classification of medical images provided in the embodiment of the present application may be a medical image automatic classification device, or a control module in the medical image automatic classification device for executing the method for automatic classification of medical images. In the embodiment of the present application, the method for automatic classification of medical images performed by the medical image automatic classification device is taken as an example to illustrate the device for automatic classification of medical images provided in the embodiment of the present application.
[0139] like Figure 2 As shown, in a second aspect of an embodiment of the present application, a medical image automatic classification device is provided, and the device may include:
[0140] An acquisition module 210 is used to acquire medical images;
[0141] An extraction module 220, for extracting text information from medical images;
[0142] A prompt word selection module 230, used to select a prompt word according to text information;
[0143] The classification module 240 is used to use the prompt words to guide the trained language model to classify the medical images according to the text information.
[0144] The medical image automatic classification device in the embodiment of the present application can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc. The non-mobile electronic device can be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0145] The image classification device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0146] The automatic classification device for medical images provided in the embodiment of the present application can achieve Figure 1 To avoid repetition, the various processes implemented by the method embodiment are not described here.
[0147] Alternatively, if Figure 3 As shown, an embodiment of the present application also provides an electronic device 300, including a first processor 301, a first memory 302, and a program or instruction stored in the first memory 302 and executable on the first processor 301. When the program or instruction is executed by the first processor 301, each process of the above-mentioned medical image automatic classification method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0148] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0149] Figure 4 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.
[0150] The hardware structure 400 of the electronic device includes but is not limited to: a radio frequency unit 401, a network module 402, an audio output unit 403, an input unit 404, a sensor 405, a display unit 406, a user input unit 407, an interface unit 408, a second memory 409, and a second processor 410 and other components.
[0151] Those skilled in the art will appreciate that the hardware structure 400 of the electronic device may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the second processor 410 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Figure 4 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0152] It should be understood that in the embodiment of the present application, the input unit 404 may include a graphics processor (Graphics Processing Unit, GPU) 4041 and a microphone 4042, and the graphics processor 4041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 406 may include a display panel 4061, and the display panel 4061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 407 includes a touch panel 4071 and other input devices 4072. The touch panel 4071 is also called a touch screen. The touch panel 4071 may include two parts, a touch detection device and a touch controller. Other input devices 4072 may include but are not limited to a physical keyboard, a function key (such as a volume control button, a switch button, etc.), a trackball, a mouse, and a joystick, which will not be repeated here. The second memory 409 can be used to store software programs and various data, including but not limited to applications and operating systems. The second processor 410 can integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and applications, etc., and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the second processor 410 .
[0153] The embodiment of the present application also provides a storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned embodiment of the automatic classification method of medical images is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0154] The processor is the processor in the electronic device described in the above embodiment. The storage medium includes computer storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, etc.
[0155] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned embodiment of the automatic classification method of medical images, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0156] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0157] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0158] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0159] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A method for automatic classification of medical images, characterized in that: include: Get medical images; Extracting text information from the medical image; Selecting a prompt word according to the text information; The prompt words are used to guide the trained language model to classify the medical images according to the text information.
2. The method for automatic classification of medical images according to claim 1, characterized in that: The extracting text information from the medical image includes: Performing image quality assessment on the medical image; Medical images that meet the image quality standards are converted into text to obtain text information.
3. The method for automatic classification of medical images according to claim 2, characterized in that: The performing image quality assessment on the medical image comprises: Performing resolution detection and contrast analysis on the medical image; Medical images with a resolution greater than or equal to 300 DPI and a contrast greater than or equal to 0.5 were selected.
4. The method for automatic classification of medical images according to claim 2, characterized in that: The text conversion process is performed on the medical image whose image quality meets the standard to obtain text information, including: Perform OCR processing on medical images that meet the image quality standards to obtain text data; The text data is standardized to obtain text information.
5. The method for automatic classification of medical images according to claim 4, characterized in that: The OCR processing is performed on the medical image whose image quality meets the standard to obtain text data, including: Perform image denoising, contrast adjustment and binarization processing on medical images that meet the image quality standards to obtain pre-processed images; The trained text recognition model is used to perform text recognition on the pre-processed image to obtain text data.
6. The method for automatic classification of medical images according to claim 1, characterized in that: The step of using the prompt words to guide the trained language model to classify the medical images according to the text information includes: Using the trained language model to perform deep semantic understanding on the text information; Using the prompt words to guide the trained language model to focus on the key parts of the text information; The medical image is classified based on the key parts.
7. The method for automatic classification of medical images according to claim 6, characterized in that: The prompt word is obtained by the following method: Analyzing the domain category of the text information; According to the field category, the text information is input into a prompt word template corresponding to the field category to obtain complete prompt word information; The prompt word template is carefully selected and manually arranged.
8. A picture classification device, characterized in that: include: An acquisition module, used to acquire medical images; An extraction module, used to extract text information from the medical image; A prompt word selection module, used for selecting a prompt word according to the text information; The classification module is used to use the prompt words to guide the trained language model to classify the medical images according to the text information.
9. An electronic device, characterized in that: include: A processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method for automatic classification of medical images as described in any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of the method for automatic classification of medical images as described in any one of claims 1 to 7 are implemented.
