Pancreatic tumor risk prediction method and system based on image processing
By acquiring and processing multiple ultrasound and contrast images, extracting static and dynamic features, and inputting them into the pancreatic tumor risk prediction scoring model, it solves the problem of insufficient pancreatic tumor risk prediction accuracy in the existing technology and achieves higher prediction accuracy. and reliability.
Patent Information
- Application Number
- CN202410830508.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-25
- Publication Date
- 2024-10-22
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the current technology of pancreatic tumor risk prediction, the accuracy of ultrasound examination results is closely related to the subjective experience of the examiner, making it difficult to comprehensively assess the structural details of pancreatic tumors, and contrast-enhanced ultrasound imaging technology is not as clear as conventional ultrasound imaging in structural details. Limits the accuracy of pancreatic tumor risk prediction.
By acquiring multiple ultrasound images and contrast images of the pancreatic area, extracting static and dynamic images, using the high-resolution characteristics of ultrasound imaging and the dynamic characteristics of contrast images, input them into the preset pancreatic tumor risk prediction scoring model to comprehensively evaluate the risk of pancreatic cancer. Structural and functional status to improve prediction accuracy.
It improves the accuracy of pancreatic region tumor risk prediction, ensures the reliability and accuracy of image processing and analysis, provides a more comprehensive assessment basis, and improves the accuracy and reliability of the prediction model.
Smart Images

Figure CN118822971A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of image processing, and in particular to a method and system for predicting pancreatic tumor risk based on image processing. Background Art
[0002] Pancreatic cancer is one of the common malignant tumors of the digestive tract, and its early prediction is of great significance for improving the survival rate of patients. At present, the commonly used prediction method is to identify structural abnormalities of the pancreas through ultrasound examination, and predict the risk of pancreatic tumors based on the results of ultrasound examination. Ultrasound examination includes conventional ultrasound imaging technology and ultrasound contrast imaging technology. In the existing technology, it is difficult to comprehensively evaluate the structural details of pancreatic tumors by relying solely on conventional ultrasound imaging technology. Although ultrasound contrast imaging technology can reflect the microcirculation perfusion of pancreatic masses, thereby obtaining the structural details of pancreatic tumors, ultrasound contrast imaging technology is not as clear as conventional ultrasound imaging technology in the expression of structural details. In addition, the accuracy of ultrasound examination results is closely related to the subjective experience of the examiner, which limits the accuracy of pancreatic tumor risk prediction.
[0003] Therefore, how to improve the accuracy of tumor risk prediction in the pancreatic region has become a technical problem that needs to be solved urgently. Summary of the invention
[0004] The present application provides a pancreatic tumor risk prediction method and system based on image processing, which can improve the accuracy of tumor risk prediction in the pancreatic region.
[0005] In a first aspect, the present application provides a pancreatic tumor risk prediction method based on image processing, the method comprising: acquiring multiple ultrasound images and multiple contrast images corresponding to the pancreatic region; obtaining a static image based on the multiple ultrasound images; obtaining a dynamic image based on the multiple contrast images; inputting the static image and the dynamic image into a preset pancreatic tumor risk prediction scoring model to obtain a predicted total score; determining whether the predicted total score is greater than or equal to a preset threshold; when the predicted total score is greater than or equal to the preset threshold, determining that there is a pancreatic tumor risk in the pancreatic region.
[0006] By adopting the above technical solution, by acquiring multiple ultrasound images and multiple contrast images of the pancreatic region, comprehensive pancreatic region imaging data is provided, which helps to accurately reflect the actual situation of the pancreas and ensure the reliability and accuracy of subsequent image processing and analysis. By extracting static images based on multiple ultrasound images, the high-resolution characteristics of ultrasound imaging are utilized to generate clear static images, which helps to identify and analyze the morphology and structure of pancreatic tissue. By extracting dynamic images based on multiple contrast images, the dynamic characteristics of contrast images are utilized to display the blood flow and functional changes in the pancreatic region, which helps to evaluate the functional state of the pancreas and find abnormalities. By inputting static images and dynamic images into a preset pancreatic tumor risk prediction scoring model, the static and dynamic image data are integrated to provide a more comprehensive evaluation basis and improve the accuracy and reliability of the prediction model. By determining that there is a risk of pancreatic tumor in the pancreatic region when the predicted total score reaches or exceeds the preset threshold, the accuracy of tumor risk prediction in the pancreatic region is improved.
[0007] Optionally, obtaining a static image based on the multiple ultrasound images specifically includes: calculating the grayscale difference of each of the ultrasound images to obtain a first contrast corresponding to each of the ultrasound images; performing clarity recognition on each of the ultrasound images based on a Laplace transform method to obtain a first clarity corresponding to each of the ultrasound images; calculating a first signal-to-noise ratio corresponding to each of the ultrasound images; acquiring a calibration image; and determining a second contrast, a second clarity and a second signal-to-noise ratio corresponding to the calibration image; and obtaining the static image from the multiple ultrasound images based on each of the first contrasts, each of the first clarity, each of the first signal-to-noise ratios, the second contrast, the second clarity and the second signal-to-noise ratio.
[0008] By adopting the above technical solution, by calculating the grayscale difference of each ultrasonic image, the first contrast corresponding to each ultrasonic image is obtained, so that the grayscale difference of the image can be quantified and the accuracy of image contrast analysis can be improved. By performing clarity recognition on each ultrasonic image based on the Laplace transform method, the first clarity corresponding to each ultrasonic image is obtained, so that the edge information of the image can be effectively identified and the accuracy of image clarity evaluation can be improved. By calculating the first signal-to-noise ratio corresponding to each ultrasonic image, the noise level and signal strength of the image can be evaluated, and the comprehensiveness of image quality evaluation can be improved. By obtaining a calibration image and determining the second contrast, second clarity and second signal-to-noise ratio corresponding to the calibration image, a benchmark reference can be provided to improve the reliability of contrast and clarity evaluation. By obtaining a static image from multiple ultrasonic images based on each first contrast, each first clarity, each first signal-to-noise ratio, second contrast, second clarity and second signal-to-noise ratio, various image quality indicators can be comprehensively selected to select the optimal static image and improve the accuracy and availability of the image.
[0009] Optionally, the static image is obtained from the multiple ultrasonic images based on each of the first contrasts, each of the first clarity, each of the first signal-to-noise ratios, the second contrast, the second clarity and the second signal-to-noise ratio, specifically including: comparing each of the first contrasts with the second contrasts to obtain a first contrast error corresponding to each of the ultrasonic images; comparing each of the first clarity with the second clarity to obtain a first clarity error corresponding to each of the ultrasonic images; comparing each of the first signal-to-noise ratios with the second signal-to-noise ratios to obtain a first signal-to-noise ratio error corresponding to each of the ultrasonic images; weighted summing each of the first contrast errors, each of the first clarity errors and each of the first signal-to-noise ratio errors to obtain a first comprehensive accuracy error corresponding to each of the ultrasonic images; determining a second comprehensive accuracy error from multiple of the first comprehensive accuracy errors, wherein the second comprehensive accuracy error is greater than the remaining first comprehensive accuracy errors; and taking the ultrasonic image corresponding to the second comprehensive accuracy error as the static image.
[0010] By adopting the above technical solution, by comparing each first contrast with the second contrast, the first contrast error corresponding to each ultrasonic image is obtained, so that the deviation of the ultrasonic image in contrast relative to the calibration image can be quantified, and the accuracy of image contrast evaluation is improved. By comparing each first clarity with the second clarity, the first clarity error corresponding to each ultrasonic image is obtained, so that the deviation of the ultrasonic image in clarity relative to the calibration image can be quantified, and the accuracy of image clarity evaluation is improved. By comparing each first signal-to-noise ratio with the second signal-to-noise ratio, the first signal-to-noise ratio error corresponding to each ultrasonic image is obtained, so that the deviation of the ultrasonic image in signal-to-noise ratio relative to the calibration image can be quantified, and the accuracy of image signal-to-noise ratio evaluation is improved. By weighted summing each first contrast error, each first clarity error and each first signal-to-noise ratio error, the first comprehensive accuracy error corresponding to each ultrasonic image is obtained, so that multiple image quality indicators can be integrated to provide an overall image quality evaluation result. By determining the second comprehensive accuracy error from multiple first comprehensive accuracy errors, wherein the second comprehensive accuracy error is greater than the remaining first comprehensive accuracy errors, the ultrasonic image with the best quality can be identified, and the accuracy of static image selection can be improved. By using the ultrasound image corresponding to the second comprehensive accuracy error as a static image, it is ensured that the selected static image reaches the optimal state in terms of contrast, clarity and signal-to-noise ratio, thereby improving the quality and reliability of the image.
[0011] Optionally, the dynamic image is obtained based on the multiple contrast images, specifically including: spatially aligning the multiple contrast images to obtain a multiple aligned contrast images; normalizing the grayscale values of the multiple aligned contrast images to a unified preset range to obtain a normalized contrast image; stacking the multiple normalized contrast images in chronological order to obtain a three-dimensional array, wherein the three-dimensional array is a sequence comprising multiple frames, each frame being a normalized contrast image; setting the time interval between every two frames in the three-dimensional array, and generating the dynamic image based on the time interval.
[0012] By adopting the above technical solution, multiple contrast images are spatially aligned to obtain multiple aligned contrast images, thereby eliminating the spatial deviation between images, improving the spatial consistency of contrast images, and ensuring the accuracy of subsequent processing. By normalizing the grayscale values of multiple aligned contrast images within a unified preset range, a normalized contrast image is obtained, thereby eliminating the grayscale value differences between images, improving the contrast and consistency of the images, and ensuring the reliability of the analysis results. By stacking multiple normalized contrast images in chronological order, a three-dimensional array is obtained, wherein the three-dimensional array is a sequence containing multiple frames, and each frame is a normalized contrast image, so that the contrast images at multiple time points can be integrated into a continuous time series, which is convenient for dynamic analysis. By setting the time interval between every two frames in the three-dimensional array and generating a dynamic image based on the time interval, the distribution and changes of the contrast agent in time can be accurately described, providing high-quality dynamic images.
[0013] Optionally, the spatially aligning the multiple contrast images to obtain a plurality of aligned contrast images specifically includes: taking the first frame image among the multiple contrast images as a reference image; extracting a plurality of first feature points from the reference image, and extracting a plurality of second feature points from the remaining contrast images; using a feature matching algorithm to match the plurality of second feature points with the plurality of first feature points to obtain matching feature point pairs; based on the matching feature point pairs, calculating a transformation matrix, wherein the transformation matrix is used to convert the coordinate system of the remaining contrast images to the coordinate system of the reference image; applying the transformation matrix to the remaining contrast images to obtain a plurality of aligned contrast images.
[0014] By adopting the above technical solution, by taking the first frame of multiple contrast images as the reference image, a stable reference point can be provided to ensure the consistency and reliability of the subsequent image alignment process. By extracting multiple first feature points from the reference image and extracting multiple second feature points from the remaining contrast images, key feature information can be identified in each frame of the image to provide basic data for image alignment. By using a feature matching algorithm to match multiple second feature points with multiple first feature points, a matching feature point pair is obtained, so that the corresponding relationship between each image can be accurately identified to ensure the accuracy of image alignment. By calculating the transformation matrix based on the matching feature point pair, wherein the transformation matrix is used to convert the coordinate system of the remaining contrast images to the coordinate system of the reference image, a mathematical tool can be provided to achieve accurate transformation and alignment between images. By applying the transformation matrix to the remaining contrast images, multiple aligned contrast images are obtained, so that all contrast images can be aligned in the same coordinate system, improving the spatial consistency of the image, and thus improving the accuracy of subsequent analysis.
[0015] Optionally, the preset pancreatic tumor risk prediction scoring model includes a convolutional neural network layer, a 3D convolutional neural network layer and a fully connected layer; the static image and the dynamic image are input into the preset pancreatic tumor risk prediction scoring model to obtain the predicted total score, specifically including: using the convolutional neural network layer to process the static image, extracting the spatial features in the static image, and obtaining static image features; using the 3D convolutional neural network layer to process the dynamic image, extracting the spatiotemporal features in the dynamic image, and obtaining dynamic image features; fusing the static image features with the dynamic image features to obtain fused features; inputting the fused features into the fully connected layer, processing through a multi-layer neural network, and obtaining the predicted total score.
[0016] By adopting the above technical solution, by using the convolutional neural network layer to process the static image, the spatial features in the static image are extracted to obtain the static image features, so that the details and structural information of the static image can be effectively captured, and the accuracy of the spatial feature extraction is improved. By using the 3D convolutional neural network layer to process the dynamic image, the spatiotemporal features in the dynamic image are extracted to obtain the dynamic image features, so that the temporal and spatial change information in the dynamic image can be fully captured, and the effect of spatiotemporal feature extraction can be improved. By fusing the static image features with the dynamic image features, the fused features are obtained, so that the information of the static and dynamic images can be integrated to improve the richness and accuracy of the feature representation. By inputting the fused features into the fully connected layer and processing them through the multi-layer neural network, the predicted total score is obtained, so that the powerful learning ability of deep learning can be fully utilized to improve the accuracy and reliability of pancreatic tumor risk prediction.
[0017] Optionally, the fully connected layer includes an initial hidden layer, a subsequent hidden layer and an output layer; the step of inputting the fused features into the fully connected layer and processing them through a multi-layer neural network to obtain the predicted total score specifically includes: inputting the fused features into the initial hidden layer, processing them through linear transformation of multiple neurons, and performing nonlinear transformation through a ReLU activation function to obtain initial layer output features; inputting the initial layer output features into the subsequent hidden layer, repeatedly performing linear transformation of multiple neurons, and performing nonlinear transformation through a ReLU activation function to obtain subsequent layer output features; inputting the subsequent layer output features into the output layer, performing linear transformation of one or more neurons, and converting the subsequent layer output features into probability values between 0 and 1 through a Sigmoid activation function to obtain the predicted total score.
[0018] In a second aspect of the present application, a pancreatic tumor risk prediction system based on image processing is provided, the system comprising: an acquisition module, a processing module and a risk assessment module; the acquisition module is used to acquire multiple ultrasound images and multiple contrast images corresponding to the pancreatic area; the processing module is used to obtain a static image based on the multiple ultrasound images; the processing module is also used to obtain a dynamic image based on the multiple contrast images; the processing module is also used to input the static image and the dynamic image into a preset pancreatic tumor risk prediction scoring model to obtain a predicted total score; the processing module is also used to determine whether the predicted total score is greater than or equal to a preset threshold; the risk assessment module is used to determine that there is a pancreatic tumor risk in the pancreatic area when the predicted total score is greater than or equal to the preset threshold.
[0019] In the third aspect of the present application, an electronic device is provided, including a processor, a memory, a user interface and a network interface, the memory is used to store instructions, the user interface and the network interface are used to communicate with other devices, and the processor is used to execute the instructions stored in the memory so that the electronic device executes any method as described in the first aspect of the present application.
[0020] In a fourth aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program that can be loaded by a processor and execute the method as described in any one of the first aspects of the present application.
[0021] In summary, one or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages: By acquiring multiple ultrasound images and multiple contrast images of the pancreatic region, comprehensive pancreatic regional imaging data is provided, which helps to accurately reflect the actual situation of the pancreas and ensure the reliability and accuracy of subsequent image processing and analysis. By extracting static images based on multiple ultrasound images, the high-resolution characteristics of ultrasound imaging are utilized to generate clear static images, which helps to identify and analyze the morphology and structure of pancreatic tissue. By extracting dynamic images based on multiple contrast images, the dynamic characteristics of contrast images can be utilized to display the blood flow and functional changes in the pancreatic region, which helps to evaluate the functional status of the pancreas and find abnormalities. By inputting static images and dynamic images into the preset pancreatic tumor risk prediction scoring model, the static and dynamic image data are integrated to provide a more comprehensive evaluation basis and improve the accuracy and reliability of the prediction model. By determining that there is a risk of pancreatic tumor in the pancreatic region when the predicted total score reaches or exceeds the preset threshold, the accuracy of tumor risk prediction in the pancreatic region is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1This is one of the flow charts of a pancreatic tumor risk prediction method based on image processing provided in an embodiment of the present application; Figure 2 This is the second flow chart of a pancreatic tumor risk prediction method based on image processing provided in an embodiment of the present application; Figure 3 This is a third flow chart of a pancreatic tumor risk prediction method based on image processing provided in an embodiment of the present application; Figure 4 This is a fourth flow chart of a pancreatic tumor risk prediction method based on image processing provided in an embodiment of the present application; Figure 5 is a schematic diagram of the structure of a pancreatic tumor risk prediction system based on image processing provided in an embodiment of the present application; Figure 6 It is a structural schematic diagram of an electronic device disclosed in an embodiment of the present application.
[0023] Explanation of the reference numerals: 1. Acquisition module; 2. Processing module; 3. Risk assessment module; 600. Electronic device; 601. Processor; 602. Communication bus; 603. User interface; 604. Network interface; 605. Memory. DETAILED DESCRIPTION
[0024] In order to enable technicians in this field to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments.
[0025] In the description of the embodiments of the present application, words such as "for example" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "for example" or "for example" is intended to present related concepts in a specific way.
[0026] In the description of the embodiments of the present application, the meaning of the term "multiple" refers to two or more. For example, multiple systems refer to two or more systems, and multiple screen terminals refer to two or more screen terminals. In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the indicated technical features. Thus, the features defined as "first" and "second" can explicitly or implicitly include one or more of the features. The terms "include", "comprise", "have" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.
[0027] The present application provides a pancreatic tumor risk prediction method based on image processing, referring to Figure 1 , which shows one of the flow charts of a pancreatic tumor risk prediction method based on image processing provided in an embodiment of the present application. The method includes steps S1-S6, which are as follows: Step S1: Acquire multiple ultrasound images and multiple contrast images corresponding to the pancreatic region.
[0028] Specifically, accurate imaging data is key to predicting the risk of pancreatic tumors, and obtaining multiple ultrasound images and multiple contrast images corresponding to the pancreatic region is a very important step. The purpose of this is to comprehensively utilize the advantages of different imaging technologies to improve the accuracy and reliability of predictions.
[0029] In the specific implementation, ultrasound imaging technology is first used to obtain images of multiple pancreatic regions. Ultrasound imaging is widely used in pancreatic examinations due to its non-invasiveness and real-time nature. Ultrasound images can provide structural information of the pancreas and help doctors observe the morphology and potential lesion areas of the pancreas. In order to ensure the comprehensiveness and reliability of the data, multiple ultrasound images are usually collected from different angles and at different time points. These images will provide basic data for extracting static image features in subsequent steps.
[0030] Next, contrast images of multiple pancreatic regions are obtained using contrast imaging techniques (such as enhanced CT or MRI). Contrast images can show the blood flow and enhancement characteristics of the pancreas, which is very important for determining the blood supply and malignancy of the tumor. Compared with ultrasound images, contrast images can provide more detailed tissue contrast and lesion information. In order to capture the dynamic changes of the contrast agent in the pancreas, multiple images are usually taken continuously at different time points after the contrast agent is injected. These images will provide the necessary data support for generating dynamic images in subsequent steps.
[0031] The ultrasound images and contrast images acquired in this way complement each other and can provide detailed information about the pancreas from different dimensions. In subsequent steps, these image data will be further processed to extract static and dynamic features, and ultimately used for a comprehensive assessment of pancreatic tumor risk. This approach not only increases the diversity and amount of information in the data, but also improves the accuracy of tumor risk prediction through the comprehensive application of different imaging technologies.
[0032] Step S2: Obtain a static image based on multiple ultrasound images.
[0033] Specifically, obtaining a static image from multiple ultrasound images is a crucial step in the image processing and analysis process. The purpose of this is to extract high-quality images that best represent the pancreatic morphology and lesion characteristics, providing a reliable data basis for subsequent pancreatic tumor risk prediction.
[0034] In one possible implementation, refer to Figure 2 , which shows a second flow chart of a pancreatic tumor risk prediction method based on image processing provided in an embodiment of the present application. Step S2 specifically includes steps S21-S25: Step S21: Calculate the grayscale difference of each ultrasonic image to obtain a first contrast corresponding to each ultrasonic image.
[0035] Specifically, we first need to obtain a set of ultrasound images of the pancreatic region. The grayscale differences in each image reflect the changes in the grayscale values of each pixel in the image, which can reveal the contrast characteristics of the image. Images with high contrast can usually better show the structural details and potential features of the pancreas, which is crucial for accurate analysis.
[0036] In order to calculate the grayscale difference of each ultrasound image, the standard deviation of the image can be used as a quantitative indicator of contrast. The standard deviation of the image can reflect the degree of dispersion of the grayscale value distribution. The larger the standard deviation, the greater the change in the grayscale value of the image and the higher the contrast. The specific method is to first convert each ultrasound image into a grayscale image, and then calculate the standard deviation of the grayscale values of all pixels in the image. This standard deviation is the first contrast of the image.
[0037] This method can quantitatively evaluate the contrast characteristics of each ultrasound image and use this as a basis for selecting high-quality images. This step can not only effectively identify images with insufficient contrast and unclear details and eliminate unqualified data, but also ensure that the images used in subsequent steps have good contrast, thereby improving the visibility of pancreatic structures and features.
[0038] Step S22: performing clarity recognition on each ultrasonic image based on the Laplace transform method to obtain a first clarity corresponding to each ultrasonic image.
[0039] Specifically, we first need to obtain a set of ultrasound images of the pancreatic area. The clarity of each image directly affects the visibility of the pancreatic structure and the accuracy of feature recognition. In order to quantify the clarity of each ultrasound image, the Laplace transform method is an effective technical means. The Laplace transform can highlight the edge information in the image. The more obvious the edge, the higher the clarity of the image.
[0040] In actual operation, each ultrasound image is first converted to a grayscale image. Next, the Laplace transform is applied to process the image. The Laplace transform generates an edge-enhanced image by calculating the grayscale difference between each pixel in the image and its neighboring pixels. Then, the clarity is quantified by calculating the variance of the Laplace transformed image. The larger the variance value, the more edges and details in the image, and the higher the clarity. This variance value is the first clarity of the image.
[0041] This method enables quantitative evaluation of the clarity characteristics of each ultrasound image and serves as a basis for selecting high-quality images. This process not only identifies images with insufficient clarity and blurred edges and removes unqualified data, but also ensures that the images used in subsequent steps have good clarity, thereby improving the visibility of pancreatic structures and features.
[0042] Step S23: Calculate the first signal-to-noise ratio corresponding to each ultrasonic image.
[0043] Specifically, we first need to obtain a set of ultrasound images of the pancreatic area. The signal-to-noise ratio (SNR) is one of the important indicators for measuring image quality. A higher SNR means more useful information in the image and less noise interference, which is very important for ensuring the reliability and accuracy of the image.
[0044] In order to calculate the signal-to-noise ratio of each ultrasound image, each ultrasound image is first converted into a grayscale image. Then, the mean of the grayscale values of all pixels in the image is calculated, and this mean represents the signal strength of the image. Next, the standard deviation of the grayscale values of all pixels in the image is calculated, and this standard deviation represents the noise level in the image. The calculation formula for the signal-to-noise ratio is the mean of the grayscale values of the image divided by the standard deviation, and the value obtained is the first signal-to-noise ratio of the image.
[0045] This method can quantitatively evaluate the signal-to-noise ratio characteristics of each ultrasound image and use this as a basis for selecting high-quality images. This process can not only identify images with weak signals and high noise and eliminate unqualified data, but also ensure that the images used in subsequent steps have a high signal-to-noise ratio, thereby improving the visibility of pancreatic structures and features.
[0046] Step S24: acquiring a calibration image; and determining a second contrast, a second clarity, and a second signal-to-noise ratio corresponding to the calibration image.
[0047] Specifically, one or more high-quality calibration images need to be selected first. These calibration images are usually ultrasound images that have been confirmed by professionals and can clearly show the structure and characteristics of the pancreas. The selection of calibration images should take into account that their contrast, clarity, and signal-to-noise ratio are at a high level to ensure their reliability as a standard.
[0048] Next, the calibration image is analyzed to determine its corresponding second contrast, second clarity and second signal-to-noise ratio. The specific method is as follows: First, the grayscale difference of the calibration image is calculated to obtain the second contrast of the calibration image. The grayscale difference reflects the change in the grayscale value of each pixel in the image. The higher the contrast, the more obvious the details in the image. Secondly, the clarity of the calibration image is identified based on the Laplace transform method to obtain the second clarity of the calibration image. The Laplace transform can highlight the edge information in the image. The more obvious the edge, the higher the clarity of the image. Finally, the signal-to-noise ratio of the calibration image is calculated to obtain the second signal-to-noise ratio of the calibration image. The signal-to-noise ratio measures the ratio of the signal strength to the noise level in the image. A higher signal-to-noise ratio means more useful information in the image and less noise interference.
[0049] This method can quantitatively determine the contrast, clarity, and signal-to-noise ratio of the calibration image, providing an objective and reliable benchmark for the quality assessment of each ultrasound image in the subsequent steps. This process not only ensures the consistency of the evaluation criteria, but also provides a clear reference in the image selection process.
[0050] Step S25: Obtain a static image from the plurality of ultrasound images based on the first contrasts, the first sharpnesses, the first signal-to-noise ratios, the second contrasts, the second sharpnesses, and the second signal-to-noise ratios.
[0051] Specifically, in the image processing and analysis process, it is an important step to obtain a static image from a plurality of ultrasound images based on each first contrast, each first definition, each first signal-to-noise ratio, second contrast, second definition, and second signal-to-noise ratio. The purpose of this is to screen out high-quality images that best represent the details of the pancreas, thereby providing a reliable data basis for subsequent image processing and analysis.
[0052] In a possible implementation, step S25 specifically includes the following steps: Each first contrast is compared with the second contrast to obtain a first contrast error corresponding to each ultrasonic image.
[0053] Each first definition is compared with the second definition to obtain a first definition error corresponding to each ultrasonic image.
[0054] Each first signal-to-noise ratio is compared with the second signal-to-noise ratio to obtain a first signal-to-noise ratio error corresponding to each ultrasonic image.
[0055] A weighted sum is performed on each first contrast error, each first clarity error, and each first signal-to-noise ratio error to obtain a first comprehensive accuracy error corresponding to each ultrasonic image.
[0056] A second integrated accuracy error is determined from the plurality of first integrated accuracy errors, wherein the second integrated accuracy error is greater than the remaining first integrated accuracy errors.
[0057] The ultrasound image corresponding to the second comprehensive accuracy error is used as a static image.
[0058] Specifically, it is necessary to first obtain the first contrast, first clarity and first signal-to-noise ratio of each ultrasound image calculated previously, as well as the second contrast, second clarity and second signal-to-noise ratio of the calibration image. By comparing the first contrast of each ultrasound image with the second contrast of the calibration image, the first contrast error of each ultrasound image is calculated. The contrast error reflects the difference in grayscale changes of the image. The smaller this difference is, the closer the contrast of the image is to the calibration image.
[0059] Next, the first clarity of each ultrasound image is compared with the second clarity of the calibration image, and the first clarity error of each ultrasound image is calculated. The clarity error can measure the performance of the image in terms of edges and details. The closer it is to the calibration image, the higher the clarity of the image.
[0060] Then, the first signal-to-noise ratio of each ultrasound image is compared with the second signal-to-noise ratio of the calibration image, and the first signal-to-noise ratio error of each ultrasound image is calculated. The signal-to-noise ratio error reflects the difference in the signal-to-noise ratio of the image. The smaller the error, the higher the signal-to-noise ratio of the image.
[0061] The first comprehensive accuracy error of each ultrasound image is obtained by weighted summing the above three errors. The comprehensive accuracy error can comprehensively reflect the degree of closeness of the image to the calibration image in terms of contrast, clarity and signal-to-noise ratio. The weighted summation process needs to set the weights of different errors according to actual needs to ensure the scientificity and accuracy of the comprehensive evaluation.
[0062] Finally, from multiple ultrasound images, the image with the smallest error is selected according to the first comprehensive accuracy error, that is, the image with the smallest second comprehensive accuracy error. This image is the screened static image. Through this method, images with high contrast, good clarity, and excellent signal-to-noise ratio can be scientifically screened to ensure that the image quality used in subsequent image processing and analysis is optimal, thereby improving the accuracy and reliability of the overall analysis.
[0063] By obtaining a static image from a plurality of ultrasound images based on each first contrast, each first definition, each first signal-to-noise ratio, the second contrast, the second definition, and the second signal-to-noise ratio, a high-quality image that best represents the details of the pancreas can be effectively screened out. This process not only improves the quality control of the image, but also provides important data support for subsequent image processing and analysis, ensuring the reliability and accuracy of the analysis results.
[0064] Step S3: obtaining a dynamic image based on multiple contrast images.
[0065] Specifically, in the process of image processing and analysis, obtaining dynamic images based on multiple contrast images is a crucial step. The purpose of this is to comprehensively utilize the dynamic information of contrast images, so as to accurately reflect the dynamic changes of the pancreatic area under the action of contrast agents, and provide a rich data foundation for subsequent image processing and analysis.
[0066] In one possible implementation, refer to Figure 3 , which shows the third flow chart of a pancreatic tumor risk prediction method based on image processing provided in an embodiment of the present application. Step S3 specifically includes steps S31-S34: Step S31: spatially aligning a plurality of contrast images to obtain a plurality of aligned contrast images.
[0067] Specifically, in the process of image processing and analysis, it is an important step to spatially align multiple contrast images to obtain multiple aligned contrast images. The purpose of this is to eliminate image displacement caused by patient movement or breathing, ensure that all images are aligned in the same coordinate system, and thus provide a consistent and reliable data basis for subsequent dynamic image generation and analysis.
[0068] In a possible implementation, step S31 specifically includes the following steps: The first frame image among the plurality of contrast images is used as a reference image.
[0069] A plurality of first feature points are extracted from the reference image, and a plurality of second feature points are extracted from the remaining contrast images.
[0070] A feature matching algorithm is used to match the plurality of second feature points with the plurality of first feature points to obtain matching feature point pairs.
[0071] Based on the matching feature point pairs, a transformation matrix is calculated, wherein the transformation matrix is used to transform the coordinate system of the remaining contrast images into the coordinate system of the reference image.
[0072] The transformation matrix is applied to the remaining contrast images to obtain a plurality of aligned contrast images.
[0073] Specifically, the first frame of the multiple angiographic images needs to be used as a reference image. This is done to have a reference standard so that the remaining images can be aligned relative to this reference image.
[0074] Next, a plurality of first feature points are extracted from the reference image, and a plurality of second feature points are extracted from the remaining angiographic images. Feature point extraction may use, for example, an ORB (Oriented FAST and Rotated BRIEF) feature detection algorithm. The ORB algorithm can quickly and effectively detect key points in an image and calculate its feature descriptor.
[0075] Then, a feature matching algorithm is used to match the second feature points with the first feature points to obtain matching feature point pairs. Common feature matching algorithms include Brute-Force Matcher or FLANN-based Matcher. These algorithms can match the feature points in the reference image and the remaining images by comparing the similarity of feature descriptors.
[0076] Based on these matching feature point pairs, a transformation matrix is calculated. The transformation matrix is used to transform the coordinate system of the remaining contrast images to the coordinate system of the reference image. Common methods for calculating the transformation matrix include calculating an affine transformation matrix or a perspective transformation matrix. The affine transformation matrix can handle translation, rotation, and scaling, while the perspective transformation matrix can handle more complex perspective distortions.
[0077] Finally, the transformation matrix is applied to the remaining contrast images to obtain a plurality of aligned contrast images. By applying the transformation matrix to the images, all contrast images can be adjusted to the same coordinate system as the reference image, so that the images are spatially aligned.
[0078] Through the above steps, image deviation caused by patient movement or breathing can be effectively eliminated, ensuring that all angiographic images are aligned in the same coordinate system. This process not only improves the consistency of the image, but also provides a reliable data basis for subsequent dynamic image generation and analysis. The aligned angiographic images will be able to more accurately reflect the dynamic changes of the pancreatic region, which will help further extraction and analysis of spatiotemporal features, thereby improving the accuracy and reliability of the overall analysis.
[0079] Step S32: normalizing the grayscale values of the plurality of aligned angiography images into a unified preset range to obtain a normalized angiography image.
[0080] Specifically, we first need to obtain a set of spatially aligned contrast images. Although these images have been spatially aligned, there may be differences in the grayscale values between the images due to differences in imaging conditions, equipment performance, and contrast agent concentration. If normalization is not performed, these differences may affect subsequent analysis results.
[0081] In order to normalize the grayscale values of these images to a uniform preset range, it is necessary to perform a linear transformation of the grayscale values of each image. The specific method is as follows: First, the minimum and maximum grayscale values of each angiographic image are calculated. Then, each grayscale value in the image is linearly transformed so that the grayscale value distribution of the image is within a preset range. The common preset range is 0 to 255, which can make the grayscale value distribution of the image more uniform, which is conducive to subsequent processing and analysis.
[0082] The formula for linear transformation is: normalized_value=(original_value-min_value) / (max_value-min_value)×(new_max-new_min)+new_min.
[0083] Among them, original_value is the original grayscale value, min_value and max_value are the minimum and maximum grayscale values of the image respectively, and new_min and new_max are the minimum and maximum values of the preset range respectively.
[0084] Through the above linear transformation, the grayscale values of all images can be normalized to the same preset range. This step can not only eliminate the grayscale differences between different images, but also enhance the contrast of the image, making the details of the pancreatic area clearer and more consistent.
[0085] Step S33: stacking the multiple normalized angiography images in chronological order to obtain a three-dimensional array, wherein the three-dimensional array is a sequence including multiple frames, and each frame is a normalized angiography image.
[0086] Specifically, we first need to obtain a set of normalized contrast images. These images are not only spatially aligned, but also have their grayscale values normalized, ensuring consistency and comparability between images. In order to accurately capture the dynamic changes of the pancreatic region under the action of contrast agents, these images need to be stacked in the order in which they were taken.
[0087] The specific steps are as follows: First, make sure each image is arranged in the order of the time it was taken. Each image represents a time point, which can be obtained from the metadata of the image. Then, stack these images in chronological order to form a three-dimensional array.
[0088] The structure of the three-dimensional array is: Array(t,h,w); where t represents the time dimension (ie, the number of frames), h represents the height of the image, and w represents the width of the image.
[0089] In this way, each layer of the three-dimensional array represents a contrast image at a time point, and these layers are arranged in chronological order, fully recording the dynamic changes of the contrast agent in the pancreatic region. In this way, the three-dimensional array not only contains the spatial information of each image, but also integrates the temporal information, so that the subsequent dynamic image generation and analysis can more comprehensively reflect the dynamic characteristics of the pancreas.
[0090] By stacking multiple normalized contrast images in chronological order, the resulting three-dimensional array can effectively preserve and reflect the dynamic changes of the pancreatic region. This process ensures the integrity and consistency of the time series data, providing a reliable data basis for subsequent dynamic image generation and spatiotemporal feature extraction.
[0091] Step S34: setting the time interval between every two frames in the three-dimensional array, and generating a dynamic image based on the time interval.
[0092] Specifically, it is first necessary to obtain the time interval information between each two frames from the three-dimensional array. These time intervals are usually preset during the acquisition of contrast images, such as acquiring one frame of image per second. The time interval information can be obtained from the metadata of the image or the record file.
[0093] Next, the time interval between every two frames in the three-dimensional array is set according to the acquired time interval information. Ensuring that all image frames are arranged in the correct time sequence and time interval is crucial to generating accurate dynamic images.
[0094] Then, using the set time interval, a dynamic image is generated. The specific method is to write each frame of the three-dimensional array into a video file in turn, and use an appropriate frame rate (Frames Per Second, FPS) to control the playback speed of the video. The frame rate setting should be consistent with the time interval. For example, if the time interval is 0.5 seconds, the frame rate should be set to 2FPS to ensure that the video can accurately reproduce the dynamic changes during the imaging process.
[0095] Step S4: input the static image and the dynamic image into a preset pancreatic tumor risk prediction scoring model to obtain a predicted total score.
[0096] Specifically, during the image processing and analysis process, inputting static images and dynamic images into the preset pancreatic tumor risk prediction scoring model to obtain the predicted total score is a key step in the entire analysis process. The purpose of this is to comprehensively utilize the features of static images and dynamic images to accurately assess the tumor risk in the pancreatic area. The preset pancreatic tumor risk prediction scoring model includes a convolutional neural network layer, a 3D convolutional neural network layer, and a fully connected layer.
[0097] In one possible implementation, refer to Figure 4 , which shows a fourth flow chart of a pancreatic tumor risk prediction method based on image processing provided in an embodiment of the present application. Step S4 specifically includes steps S41-S44: Step S41: Use a convolutional neural network layer to process the static image, extract spatial features in the static image, and obtain static image features.
[0098] Specifically, we first need to obtain preprocessed static images. After preprocessing (such as denoising, contrast enhancement, etc.), the static images can show the structural details of the pancreatic region more clearly. These images will be used as input data and input into the convolutional neural network layer for processing.
[0099] Next, the static image is processed using a convolutional neural network layer. A convolutional neural network (CNN) is a deep learning model specifically used for image processing that can effectively extract spatial features in an image. The specific processing steps are as follows: First, the static image is input to the input layer of the convolutional neural network. The input layer receives the original image data and passes it to the subsequent convolutional layer for processing.
[0100] Then, the convolution layer performs convolution operations on the input image. The convolution layer consists of multiple convolution kernels (filters), each of which slides over the image to extract local features in the image, such as edges, textures, etc. The number and size of convolution kernels can be set according to specific needs. Through the layer-by-layer processing of multiple convolution layers, more complex and advanced image features can be gradually extracted.
[0101] Next, the output of the convolutional layer is passed to the pooling layer. The pooling layer performs dimensionality reduction on the output of the convolutional layer, reducing the size of the feature map while retaining important feature information. Commonly used pooling operations include max pooling and average pooling. The pooling layer can improve the computational efficiency of the model and reduce the risk of overfitting.
[0102] Next, the feature map processed by the pooling layer is passed to the fully connected layer. The fully connected layer integrates and comprehensively processes the local features extracted previously to generate a feature vector. These feature vectors represent the global information in the static image and provide basic data for subsequent feature fusion and risk prediction.
[0103] Finally, through the processing of the convolutional neural network layer, the spatial features in the static image can be extracted to obtain the static image features. These features include information such as the shape, boundary, and texture of the pancreas, which can effectively reflect the structural characteristics of the pancreatic region.
[0104] Step S42: Use the 3D convolutional neural network layer to process the dynamic image, extract the spatiotemporal features in the dynamic image, and obtain the dynamic image features.
[0105] Specifically, we first need to obtain dynamic images in the form of three-dimensional arrays that have been preprocessed and stacked in time sequence. These images have been aligned and grayscale normalized to ensure that each frame of the image is in the same coordinate system and grayscale range, and is consistent and comparable.
[0106] Next, the dynamic images are processed using a 3D convolutional neural network layer. 3D convolutional neural network (3D CNN) is a deep learning model that can process spatial and temporal information simultaneously, and can effectively extract spatiotemporal features in dynamic images. These spatiotemporal features include PEAK_INTENSITY (peak intensity), PEAK_ENHANCEMENT (peak enhancement), ARRIVAL_TIME (arrival time), TIME_TO_PEAK (peak time), MEAN_GRADIENT_TO_PEAK (mean peak enhancement rate), TIME_WIDTH_AT_HALF_MAXIMUM (half-peak width), WASH_IN_AUC (area under the wash-in curve), WASH_OUT_AUC (area under the wash-out curve), AUC (total area under the curve), MAX_GRADIENT_TIME (maximum gradient time), and MAX_GRADIENT (maximum gradient). Through these features, the dynamic changes of the pancreatic region are reflected.
[0107] Among them, PEAK_INTENSITY (peak intensity) refers to the maximum value in the time series data, reflecting the highest level of contrast agent concentration in the tissue. The peak intensity can be obtained by calculating the highest intensity value in each frame of the image.
[0108] PEAK_ENHANCEMENT is the difference between the peak intensity and the baseline intensity, reflecting the maximum increase in the contrast agent concentration in the tissue. The peak enhancement can be obtained by calculating the difference between the peak intensity and the baseline intensity.
[0109] ARRIVAL_TIME (arrival time) refers to the earliest time when the contrast agent reaches the set threshold intensity, reflecting the perfusion of the tissue. The arrival time can be obtained by detecting the time point when the intensity curve reaches the threshold.
[0110] TIME_TO_PEAK (peak time) represents the time from the microbubble entering the region of interest to the time when the region of interest reaches the maximum intensity. The peak time can be obtained by calculating the time interval from the baseline to the peak of the intensity curve.
[0111] MEAN_GRADIENT_TO_PEAK (mean peak enhancement ratio) refers to the ratio of peak enhancement to peak time, reflecting the average accumulation rate of contrast agent in tissue. By calculating the ratio of peak enhancement to peak time, the mean peak enhancement ratio can be obtained.
[0112] TIME_WIDTH_AT_HALF_MAXIMUM (half-peak width) refers to the length of the time interval when the intensity is greater than half of the peak intensity, reflecting the residence time of high-concentration contrast agents in the tissue. The half-peak width can be obtained by calculating the time interval when the intensity curve is greater than half of the peak intensity.
[0113] WASH_IN_AUC (Wash-in Area Under the Curve) refers to the area under the time-intensity curve from the start to the peak, reflecting the total amount of contrast agent accumulated in the tissue. The area under the wash-in curve can be obtained by integrating the intensity curve area from the start to the peak.
[0114] WASH_OUT_AUC (Wash-out Area Under the Curve) refers to the area under the time-intensity curve from the peak to the end time, reflecting the total amount of contrast agent removed from the tissue. The area under the wash-out curve can be obtained by integrating the intensity curve area from the peak to the end time.
[0115] AUC (total area under the curve) is the sum of the area under the wash-in curve and the area under the wash-out curve, reflecting the cumulative total amount of contrast agent in the tissue during the entire observation period. The total area under the curve can be obtained by adding the areas under the wash-in curve and the wash-out curve.
[0116] MAX_GRADIENT_TIME (maximum gradient time) refers to the time when the time-intensity curve changes the fastest, reflecting the peak time of the contrast agent accumulation rate in the tissue. The maximum gradient time can be obtained by detecting the time point of the maximum value of the intensity curve change rate.
[0117] MAX_GRADIENT (maximum gradient) refers to the maximum value of the rate of change of the time-intensity curve, reflecting the peak value of the contrast agent accumulation rate in the tissue. The maximum gradient can be obtained by calculating the maximum rate of change of the intensity curve.
[0118] The specific processing steps are as follows: First, the dynamic image is input to the input layer of the 3D convolutional neural network. The input layer receives the image data in the form of a three-dimensional array and passes it to the subsequent 3D convolutional layer for processing.
[0119] Then, the 3D convolution layer performs convolution operation on the input dynamic image. The 3D convolution layer is composed of multiple 3D convolution kernels (3D filters), each of which extracts local spatiotemporal features in the image by sliding on the three-dimensional image. The number and size of 3D convolution kernels can be set according to specific needs. Through the layer-by-layer processing of multiple 3D convolution layers, more complex and advanced spatiotemporal features can be gradually extracted.
[0120] Next, the output of the 3D convolutional layer is passed to the 3D pooling layer. The 3D pooling layer performs dimensionality reduction on the output of the 3D convolutional layer, reducing the size of the feature map while retaining important spatiotemporal feature information. Commonly used pooling operations include max pooling and average pooling. The 3D pooling layer can improve the computational efficiency of the model and reduce the risk of overfitting.
[0121] Subsequently, the feature map processed by the 3D pooling layer is passed to the fully connected layer. The fully connected layer integrates and comprehensively processes the previously extracted spatiotemporal features to generate a feature vector. These feature vectors represent the global spatiotemporal information in the dynamic image and provide basic data for subsequent feature fusion and risk prediction.
[0122] Finally, through the processing of the 3D convolutional neural network layer, the spatiotemporal features in the dynamic image can be extracted to obtain dynamic image features. These features include the dynamic change information of the pancreatic area under the action of contrast agents, such as blood flow distribution, enhancement mode, etc., which can fully reflect the dynamic characteristics of the pancreas.
[0123] Step S43: Fusing the static image features with the dynamic image features to obtain fused features.
[0124] Specifically, we first need to obtain the static image features extracted from the convolutional neural network layer and the dynamic image features extracted from the 3D convolutional neural network layer. The static image features mainly reflect the spatial structural information of the pancreatic region, while the dynamic image features contain the dynamic change information of the pancreatic region under the action of contrast agents. These two features complement each other and help provide a comprehensive feature representation.
[0125] Next, the static image features are fused with the dynamic image features. The purpose of feature fusion is to integrate these two different types of information for a more comprehensive analysis. The specific fusion method can be concatenation, that is, concatenating the static image feature vector and the dynamic image feature vector in the feature dimension to form a longer feature vector.
[0126] The specific steps for generating fused features are as follows: First, ensure that the dimensions of the static image features and the dynamic image features are consistent or can be concatenated. For example, assuming that the dimension of the static image feature vector is n and the dimension of the dynamic image feature vector is m, the dimension of the fused feature vector is n+m.
[0127] Then, a feature concatenation operation is performed. The static image feature vector and the dynamic image feature vector are concatenated according to the feature dimension to obtain a fused feature vector. This fused feature vector combines the information of the static image and the dynamic image, and contains the spatial and temporal dynamic features of the pancreatic region.
[0128] Through this feature fusion method, the spatial information in static images and the spatiotemporal information in dynamic images can be effectively integrated to form a unified feature representation. This comprehensive feature representation can not only improve the model's ability to capture pancreatic regional features, but also provide more comprehensive and accurate data support for subsequent risk prediction.
[0129] Finally, by fusing the static image features with the dynamic image features, the fused features obtained can fully reflect the structure and dynamic changes of the pancreatic region. This process ensures the richness and completeness of the feature information, providing a solid foundation for subsequent fully connected layer processing and risk prediction. This feature fusion method improves the feature representation ability of the model and enhances the accuracy and reliability of the prediction.
[0130] Step S44: Input the fused features into the fully connected layer and process them through a multi-layer neural network to obtain the predicted total score.
[0131] Specifically, during the image processing and analysis process, the fused features are input into the fully connected layer and processed through a multi-layer neural network to obtain the predicted total score, which is a key step in the entire pancreatic tumor risk prediction. The purpose of this is to comprehensively process the features extracted and fused from static and dynamic images, and output a predicted score representing the tumor risk, thereby providing a reliable basis for subsequent decision-making. The fully connected layer includes the starting hidden layer, subsequent hidden layers, and the output layer.
[0132] In a possible implementation, step S44 specifically includes the following steps: The fused features are input into the starting hidden layer, processed by linear transformation of multiple neurons, and nonlinearly transformed by ReLU activation function to obtain the output features of the starting layer.
[0133] Specifically, we first need to take the fused feature vectors obtained in the previous step as input. These fused feature vectors contain comprehensive information of static and dynamic images and have rich feature representation capabilities. In order to make full use of this information, it needs to be further processed through the starting hidden layer.
[0134] Next, the fused feature vector is input to the initial hidden layer. The initial hidden layer consists of multiple neurons, each of which is connected to each element in the input feature vector. The specific processing steps are as follows: First, a linear transformation is performed. Each neuron performs a linear transformation on the input feature vector, and the calculation formula is: z = ∑ i n =1 w i x i +b; where x i is the i-th element of the input feature vector, w i is the corresponding weight, b is the bias term, and z is the output of the linear transformation.
[0135] Then, a nonlinear transformation is performed. The output z of the linear transformation is transformed nonlinearly through the ReLU (Rectified Linear Unit) activation function. The calculation formula of the ReLU activation function is: a = ReLU (z) = max (0, z). The ReLU activation function can introduce nonlinearity, enabling the model to better fit complex feature distributions. Through the above linear and nonlinear transformations, each neuron can extract and activate important information in the input features. The outputs of all neurons constitute the output feature vectors of the starting layer, which will serve as the input of the next layer (subsequent hidden layer).
[0136] In this way, the initial hidden layer can perform preliminary feature extraction and nonlinear transformation on the fused features to generate feature vectors with stronger representation capabilities. This process can not only extract deep information from the input features, but also introduce nonlinearity through the ReLU activation function to improve the model's representation and generalization performance.
[0137] The output features of the starting layer are input to the subsequent hidden layer, repeatedly processed by linear transformation of multiple neurons, and nonlinearly transformed by ReLU activation function to obtain the output features of the subsequent layer.
[0138] Specifically, in this way, the subsequent hidden layers can further extract features and perform nonlinear transformations on the output features of the initial layer to generate higher-level feature vectors. This process can not only capture deeper information, but also introduce more nonlinearities through the ReLU activation function, thereby improving the model's expressiveness and generalization performance.
[0139] The output features of the subsequent layers are input to the output layer, processed by linear transformation of one or more neurons, and converted into probability values between 0 and 1 through the Sigmoid activation function to obtain the predicted total score.
[0140] Specifically, we first need to use the output feature vectors obtained from the subsequent hidden layers as input. These feature vectors have been processed by multiple layers of neural networks and contain rich high-level information. In order to convert these feature vectors into the final predicted probability values, they need to be input into the output layer for processing.
[0141] The output layer usually consists of one or more neurons, each of which is connected to each element in the input feature vector. The specific processing steps are as follows: First, a linear transformation is performed. Each neuron in the output layer performs a linear transformation on the input feature vector, and then a nonlinear transformation is performed. The output z of the linear transformation is transformed nonlinearly through the Sigmoid activation function. The calculation formula of the Sigmoid activation function is: σ(z) = 1 / (1+e -z ). The Sigmoid activation function can convert the output of the linear transformation into a probability value between 0 and 1, which represents the risk of pancreatic tumor.
[0142] Through the above linear and nonlinear transformations, the output layer can convert the high-level feature vector into an easily interpretable probability value. This probability value, as the final predicted total score, reflects the possibility of tumor risk in the pancreatic region.
[0143] Step S5: Determine whether the predicted total score is greater than or equal to a preset threshold.
[0144] Specifically, the preset threshold is determined based on clinical experience and the results of statistical analysis. Generally, the setting of the preset threshold needs to balance sensitivity and specificity to ensure that as many high-risk patients as possible are found while reducing the false positive rate. For example, the preset threshold can be set to 0.5, that is, if the predicted total score is greater than or equal to 0.5, it is considered that there is a higher tumor risk.
[0145] Step S6: When the predicted total score is greater than or equal to the preset threshold, it is determined that there is a risk of pancreatic tumor in the pancreatic region.
[0146] Specifically, when the predicted total score is greater than or equal to the preset threshold, it is determined that there is a risk of pancreatic tumor in the pancreatic area, and the assessment result is marked or recorded. This mark or record can be an entry in the electronic medical record, a part in the doctor's report, or a prompt in the clinical decision support system. It should be noted that the mark or record is only used to provide reference opinions to doctors, and doctors cannot directly determine the actual tumor situation of the patient based on the mark or record.
[0147] Reference Figure 5, which shows a structural schematic diagram of a pancreatic tumor risk prediction system based on image processing provided in an embodiment of the present application, the system includes: an acquisition module, a processing module and a risk assessment module; the acquisition module is used to acquire multiple ultrasound images and multiple contrast images corresponding to the pancreatic area; the processing module is used to obtain a static image based on multiple ultrasound images; the processing module is also used to obtain a dynamic image based on multiple contrast images; the processing module is also used to input the static image and the dynamic image into a preset pancreatic tumor risk prediction scoring model to obtain a predicted total score; the processing module is also used to determine whether the predicted total score is greater than or equal to a preset threshold; the risk assessment module is used to determine that there is a pancreatic tumor risk in the pancreatic area when the predicted total score is greater than or equal to the preset threshold.
[0148] In a possible implementation, the processing module is further used to calculate the grayscale difference of each ultrasonic image to obtain a first contrast corresponding to each ultrasonic image; the processing module is further used to perform clarity recognition on each ultrasonic image based on a Laplace transform method to obtain a first clarity corresponding to each ultrasonic image; the processing module is further used to calculate a first signal-to-noise ratio corresponding to each ultrasonic image; the acquisition module is further used to acquire a calibration image; and determine a second contrast, a second clarity, and a second signal-to-noise ratio corresponding to the calibration image; the processing module is further used to obtain a static image from multiple ultrasonic images based on each first contrast, each first clarity, each first signal-to-noise ratio, the second contrast, the second clarity, and the second signal-to-noise ratio.
[0149] In a possible implementation, the processing module is further used to compare each first contrast with the second contrast to obtain a first contrast error corresponding to each ultrasonic image; the processing module is further used to compare each first clarity with the second clarity to obtain a first clarity error corresponding to each ultrasonic image; the processing module is further used to compare each first signal-to-noise ratio with the second signal-to-noise ratio to obtain a first signal-to-noise ratio error corresponding to each ultrasonic image; the processing module is further used to perform weighted summation of each first contrast error, each first clarity error and each first signal-to-noise ratio error to obtain a first comprehensive accuracy error corresponding to each ultrasonic image; the processing module is further used to determine a second comprehensive accuracy error from multiple first comprehensive accuracy errors, wherein the second comprehensive accuracy error is greater than the remaining first comprehensive accuracy errors; the processing module is further used to use the ultrasonic image corresponding to the second comprehensive accuracy error as a static image.
[0150] In a possible implementation, the processing module is further used to spatially align multiple contrast images to obtain multiple aligned contrast images; the processing module is further used to normalize the grayscale values of the multiple aligned contrast images within a unified preset range to obtain normalized contrast images; the processing module is further used to stack the multiple normalized contrast images in chronological order to obtain a three-dimensional array, wherein the three-dimensional array is a sequence comprising multiple frames, and each frame is a normalized contrast image; the processing module is further used to set the time interval between every two frames in the three-dimensional array, and generate a dynamic image based on the time interval.
[0151] In a possible implementation, the processing module is further used to use the first frame image among the multiple contrast images as a reference image; the processing module is further used to extract multiple first feature points from the reference image, and to extract multiple second feature points from the remaining contrast images; the processing module is further used to use a feature matching algorithm to match the multiple second feature points with the multiple first feature points to obtain matching feature point pairs; the processing module is further used to calculate a transformation matrix based on the matching feature point pairs, wherein the transformation matrix is used to convert the coordinate system of the remaining contrast images to the coordinate system of the reference image; the processing module is further used to apply the transformation matrix to the remaining contrast images to obtain multiple aligned contrast images.
[0152] In one possible implementation, the processing module is further used to process static images using a convolutional neural network layer, extract spatial features in the static images, and obtain static image features; the processing module is further used to process dynamic images using a 3D convolutional neural network layer, extract spatiotemporal features in the dynamic images, and obtain dynamic image features; the processing module is further used to fuse the static image features with the dynamic image features to obtain fused features; the processing module is further used to input the fused features into a fully connected layer, process them through a multi-layer neural network, and obtain a predicted total score.
[0153] In one possible implementation, the processing module is further used to input the fused features into the starting hidden layer, perform linear transformation processing through multiple neurons, and perform nonlinear transformation through the ReLU activation function to obtain the output features of the starting layer; the processing module is further used to input the output features of the starting layer into the subsequent hidden layer, repeat the linear transformation processing through multiple neurons, and perform nonlinear transformation through the ReLU activation function to obtain the output features of the subsequent layer; the processing module is further used to input the output features of the subsequent layer into the output layer, perform linear transformation processing through one or more neurons, and convert the output features of the subsequent layer into probability values between 0 and 1 through the Sigmoid activation function to obtain the predicted total score.
[0154] It should be noted that: when the device provided in the above embodiment realizes its function, only the division of the above functional modules is used as an example. In actual application, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0155] The present application also discloses an electronic device. Figure 6 , Figure 6 The electronic device 600 may include: at least one processor 601 , at least one network interface 604 , a user interface 603 , a memory 605 , and at least one communication bus 602 .
[0156] The communication bus 602 is used to realize the connection and communication between these components.
[0157] The user interface 603 may include a display screen (Display) and a camera (Camera), and the optional user interface 603 may also include a standard wired interface and a wireless interface.
[0158] The network interface 604 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).
[0159] Among them, the processor 601 may include one or more processing cores. The processor 601 uses various interfaces and lines to connect various parts in the entire server, and executes various functions of the server and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 605, and calling data stored in the memory 605. Optionally, the processor 601 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 601 can integrate one or more combinations of a central processing unit (Central Processing Unit, CPU), a graphics processor (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 601, and it can be implemented by a single chip.
[0160] Among them, the memory 605 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). Optionally, the memory 605 includes a non-transitory computer-readable storage medium. The memory 605 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 605 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned method embodiments, etc.; the data storage area may store data involved in the above-mentioned method embodiments, etc. The memory 605 may optionally be at least one storage device located away from the aforementioned processor 601. Refer to Figure 6 , the memory 605 as a computer-readable storage medium may include an operating system, a network communication module, a user interface module and an application program.
[0161] exist Figure 6In the electronic device 600 shown, the user interface 603 is mainly used to provide an input interface for the user and obtain the data input by the user; and the processor 601 can be used to call an application stored in the memory 605, and when executed by one or more processors 601, the electronic device 600 executes one or more methods in the above-mentioned embodiments. It should be noted that for the aforementioned method embodiments, for the sake of simple description, they are all expressed as a series of action combinations, but those skilled in the art should know that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required for the present application.
[0162] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0163] In the several embodiments provided in this application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some service interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.
[0164] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0165] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0166] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a memory and includes several instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned memory includes: various media that can store program codes, such as USB flash drives, mobile hard drives, magnetic disks or optical disks.
[0167] The above are only exemplary embodiments of the present disclosure and cannot be used to limit the scope of the present disclosure. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the disclosure of the specification and the truth of practice, those skilled in the art will easily think of other embodiments of the present disclosure.
[0168] This application is intended to cover any variation, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the art not described in the present disclosure. The description and examples are to be regarded as exemplary only, and the scope and spirit of the present disclosure are defined by the claims.
Claims
1. A pancreatic tumor risk prediction method based on image processing, characterized in that: The method comprises: Acquiring a plurality of ultrasound images and a plurality of contrast images corresponding to the pancreatic region; Based on the plurality of ultrasound images, obtaining a static image; Based on the plurality of the angiographic images, a dynamic image is obtained; Inputting the static image and the dynamic image into a preset pancreatic tumor risk prediction scoring model to obtain a total prediction score; Determining whether the predicted total score is greater than or equal to a preset threshold; When the predicted total score is greater than or equal to the preset threshold, it is determined that there is a risk of pancreatic tumor in the pancreatic region.
2. The method according to claim 1, characterized in that The step of obtaining a static image based on the plurality of ultrasound images specifically includes: Calculating the grayscale difference of each of the ultrasonic images to obtain a first contrast corresponding to each of the ultrasonic images; Performing clarity recognition on each of the ultrasonic images based on a Laplace transform method to obtain a first clarity corresponding to each of the ultrasonic images; Calculating a first signal-to-noise ratio corresponding to each of the ultrasound images; Acquire a calibration image; and determine a second contrast, a second clarity, and a second signal-to-noise ratio corresponding to the calibration image; The static image is obtained from the plurality of ultrasound images based on the first contrasts, the first sharpnesses, the first signal-to-noise ratios, the second contrasts, the second sharpnesses, and the second signal-to-noise ratios.
3. The method according to claim 2, characterized in that The step of obtaining the static image from the plurality of ultrasound images based on each of the first contrasts, each of the first clarity, each of the first signal-to-noise ratios, the second contrast, the second clarity, and the second signal-to-noise ratio specifically includes: Comparing each of the first contrasts with the second contrast to obtain a first contrast error corresponding to each of the ultrasonic images; Comparing each of the first clarity with the second clarity to obtain a first clarity error corresponding to each of the ultrasonic images; Comparing each of the first signal-to-noise ratios with the second signal-to-noise ratio to obtain a first signal-to-noise ratio error corresponding to each of the ultrasonic images; Performing a weighted summation on each of the first contrast errors, each of the first clarity errors, and each of the first signal-to-noise ratio errors to obtain a first comprehensive accuracy error corresponding to each of the ultrasonic images; Determining a second integrated accuracy error from a plurality of the first integrated accuracy errors, wherein the second integrated accuracy error is greater than the remaining first integrated accuracy errors; The ultrasound image corresponding to the second comprehensive accuracy error is used as the static image.
4. The method according to claim 1, characterized in that The step of obtaining a dynamic image based on the plurality of angiographic images specifically includes: spatially aligning the plurality of contrast images to obtain a plurality of aligned contrast images; Normalizing the grayscale values of the plurality of aligned angiography images to a unified preset range to obtain a normalized angiography image; Stacking the plurality of normalized angiography images in time sequence to obtain a three-dimensional array, wherein the three-dimensional array is a sequence comprising a plurality of frames, and each frame is one of the normalized angiography images; The time interval between every two frames in the three-dimensional array is set, and the dynamic image is generated based on the time interval.
5. The method according to claim 4, characterized in that The step of spatially aligning the plurality of contrast images to obtain a plurality of aligned contrast images specifically includes: Using the first frame of the plurality of angiography images as a reference image; Extracting a plurality of first feature points from the reference image, and extracting a plurality of second feature points from the remaining angiography images; Using a feature matching algorithm to match the plurality of second feature points with the plurality of first feature points to obtain matching feature point pairs; Based on the matching feature point pairs, calculating a transformation matrix, wherein the transformation matrix is used to transform the coordinate system of the remaining angiography images into the coordinate system of the reference image; The transformation matrix is applied to the remaining angiography images to obtain a plurality of aligned angiography images.
6. The method according to claim 1, characterized in that The preset pancreatic tumor risk prediction scoring model includes a convolutional neural network layer, a 3D convolutional neural network layer and a fully connected layer; the static image and the dynamic image are input into the preset pancreatic tumor risk prediction scoring model to obtain a predicted total score, specifically including: Processing the static image using the convolutional neural network layer to extract spatial features in the static image to obtain static image features; Processing the dynamic image using the 3D convolutional neural network layer to extract spatiotemporal features in the dynamic image to obtain dynamic image features; Fusing the static image feature with the dynamic image feature to obtain a fused feature; The fused features are input into the fully connected layer and processed through a multi-layer neural network to obtain the predicted total score.
7. The method according to claim 6, characterized in that The fully connected layer includes an initial hidden layer, a subsequent hidden layer, and an output layer; the fusion feature is input into the fully connected layer, and processed by a multi-layer neural network to obtain the predicted total score, specifically including: The fusion feature is input into the initial hidden layer, processed by linear transformation of multiple neurons, and nonlinearly transformed by ReLU activation function to obtain the output feature of the initial layer; Input the output features of the initial layer to the subsequent hidden layer, repeat the linear transformation process through multiple neurons, and perform nonlinear transformation through the ReLU activation function to obtain the output features of the subsequent layer; The output features of the subsequent layer are input to the output layer, processed by linear transformation of one or more neurons, and converted into probability values between 0 and 1 by Sigmoid activation function to obtain the predicted total score.
8. A pancreatic tumor risk prediction system based on image processing, characterized in that: The system comprises: an acquisition module, a processing module and a risk assessment module; The acquisition module is used to acquire a plurality of ultrasound images and a plurality of contrast images corresponding to the pancreatic region; The processing module is used to obtain a static image based on the multiple ultrasound images; The processing module is further used to obtain a dynamic image based on the plurality of angiographic images; The processing module is further used to input the static image and the dynamic image into a preset pancreatic tumor risk prediction scoring model to obtain a predicted total score; The processing module is further used to determine whether the predicted total score is greater than or equal to a preset threshold; The risk assessment module is used to determine that there is a risk of pancreatic tumor in the pancreatic region when the predicted total score is greater than or equal to the preset threshold.
9. An electronic device, characterized in that: The electronic device (600) comprises a processor (601), a memory (605), a user interface (603) and a network interface (604), wherein the memory (605) is used to store instructions, the user interface (603) and the network interface (604) are used to communicate with other devices, and the processor (601) is used to execute the instructions stored in the memory (605) so that the electronic device (600) executes the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed, the method according to any one of claims 1 to 7 is executed.
Citation Information
Patent Citations
Colorectal cancer lifetime prediction method based on deep learning CT imaging omics
CN112309576A
Pancreatic cancer lymph node metastasis staging prediction method and device and storage medium
CN115116625A
Method and device for recognizing breast tumor through conventional ultrasound and ultrasound contrast images
CN115482229A
Breast cancer image classification system and method based on ultrasound contrast video
CN116342927A
Mammary gland minimal cancer analysis method based on multi-modal ultrasonic image self-supervised learning
CN116415649A
Cited By
Image enhancement method and device for ultrasound contrast and electronic equipment
CN119273593A
