Medical image multi-threshold segmentation method based on deep learning technology
Patent Information
- Application Number
- CN202611108678.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-24
- Publication Date
- 2026-10-13
AI Technical Summary
[0004]针对现有技术的不足,本发明提出一种基于深度学习技术的医学图像多阈值分割方法,通过融合改进白鲸优化算法的全局探索能力与正余弦优化算法的局部细化优势,实现对复杂医学影像的高精度自动分割,解决传统方法计算量大、易早熟收敛、陷入局部最优的痛点
Smart Images

Figure CN122906377A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of computer-aided diagnosis and medical image processing technology, specifically relating to a high-precision multi-threshold segmentation method for medical images based on deep learning technology. Background Technology
[0002] Medical image segmentation is a core step in computer-aided diagnostic (CAD) systems. Its goal is to accurately extract regions of interest (ROIs) from medical images such as CT, MRI, dermatoscopes, and pathological sections, providing crucial information for disease diagnosis, treatment planning, and prognostic assessment. Multi-threshold segmentation, as a highly efficient unsupervised segmentation method, achieves region segmentation by dividing the image's grayscale histogram into intervals. It boasts advantages such as simple implementation logic and high computational efficiency, and is widely used in clinical settings.
[0003] However, existing traditional multi-threshold segmentation techniques still have significant drawbacks: for complex medical images with low contrast, high noise, and blurred boundaries, as the number of thresholds increases, the number of threshold combinations the algorithm needs to traverse grows exponentially, significantly increasing computational overhead. Furthermore, these techniques are prone to getting trapped in local optima, failing to consistently output segmentation results that meet clinical diagnostic needs. In recent years, the academic community has gradually introduced swarm intelligence optimization algorithms to address these issues. However, conventional genetic algorithms, basic bee colony optimization algorithms, and other algorithms still suffer from an imbalance between global search and local exploitation capabilities. Some improved solutions exhibit high algorithmic complexity, strong dependence on initial solutions, and insufficient robustness, making it difficult to meet the dual requirements of real-time performance and high accuracy in clinical practice. Summary of the Invention
[0004] To address the shortcomings of existing technologies, this invention proposes a multi-threshold segmentation method for medical images based on deep learning technology. By integrating the global exploration capability of the improved White Whale Optimization Algorithm with the local refinement advantages of the Sine and Cosine Optimization Algorithm, it achieves high-precision automatic segmentation of complex medical images, solving the pain points of traditional methods such as high computational cost, premature convergence, and getting trapped in local optima. The method includes the following steps:
[0005] S1: Acquire medical images to be processed, complete grayscale value normalization and noise pre-filtering preprocessing, statistically analyze the grayscale distribution of the images to generate a grayscale histogram, and map it to the search space value range of the optimization algorithm;
[0006] S2: Targeted improvements are made to the basic beluga optimization algorithm. The beluga population is divided into two cooperating subgroups. Subgroup 1 uses the beluga individual with the best fitness within the population as its leader, and follows the leader's guidance to quickly converge towards the potential optimal region, improving global search efficiency. In subgroup 2, beluga individuals swim to randomly selected individuals in the population to search, enriching the diversity of search paths and preventing the leader from misleading the entire population into local optima. At the same time, a dynamic beluga energy parameter is introduced to control the search step size of the subgroups, adapting to the search needs of different iteration stages. The original linear random balance factor in the basic beluga optimization algorithm is replaced with a nonlinear balance factor that dynamically adjusts with the number of iterations. This allows the algorithm to perform global search with a higher probability in the early stages of iteration, and retain a small probability of global exploration capability in the later stages of iteration while prioritizing local fine-grained search, achieving a dynamic balance between global exploration and local development.
[0007] S3: A hybrid optimization algorithm, PBWO-SCA, is constructed based on the improved Beluga Whale Optimization (PBWO) algorithm and the Sine-Cosine Optimization (SCA) algorithm. The population output by PBWO is used as the initial input solution of the Sine-Cosine algorithm. The periodic fluctuation characteristics of the Sine and Cosine functions are used to further refine the threshold candidate set obtained by PBWO. The position update logic of SCA is used to perform deep mining of the neighborhood of the solution space to select better threshold combinations. At the same time, the algorithm uses minimum cross-entropy as the core fitness function. During the iteration process, when the average fitness value of the population does not change in two consecutive iterations, a Cauchy-Gaussian hybrid mutation strategy with observation mechanism is triggered to perturb the population, break the population aggregation deadlock, and help the algorithm escape local optima.
[0008] S4: The search space of the PBWO-SCA algorithm is completely mapped to the value range of the gray-level histogram of the medical image. The globally optimal multi-threshold combination is obtained through iterative optimization and convergence. The multi-region segmentation of the medical image is completed directly based on this threshold combination.
[0009] In step S1 of this invention, this step serves as the preprocessing foundation for the entire process, completing the standardized adaptation of medical images: First, medical images of any modality, such as CT, MRI, dermatoscopy, and pathological sections, are acquired. Gray-level normalization is then performed to uniformly map the gray values of all images to the standard range of [0, 255], eliminating the differences in gray-level range between different imaging devices. Next, Gaussian filtering is used to pre-filter noise, removing random electronic noise and motion artifacts generated during the acquisition of medical images. Afterward, the gray-level distribution of all pixels in the preprocessed image is statistically analyzed to generate a complete image gray-level histogram. The gray-level value range of this histogram is directly mapped to the search space of the subsequent hybrid optimization algorithm, completing the input initialization of the optimization task.
[0010] In step S2 of this invention, the dual-subgroup leadership exploration mechanism divides the beluga whale population of total size N into two cooperative subgroups. In subgroup 1, all beluga whales follow the leader, which is currently the most fit individual in the population, to rapidly converge towards the potential optimal region, directly improving the directionality and computational efficiency of the global search. In subgroup 2, the beluga whales completely detach from their leader's guidance and freely swim towards randomly selected individuals in the population, maximizing the diversity of search paths and preventing premature convergence of the entire population when the leader gets trapped in a local optimum. Simultaneously, a dynamic beluga whale energy parameter E, decreasing with the number of iterations, controls the search step size of the two subgroups. In the early stages of iteration, a large step size is maintained to expand the exploration range, while in the later stages, the step size is gradually reduced to adapt to the needs of fine-grained search, perfectly adapting to the search characteristics of different iteration stages.
[0011] In step S2 of this invention, the nonlinear balance factor optimization completely replaces the original linear random balance factor in the basic BWO algorithm. A nonlinear update strategy that dynamically adjusts with the number of iterations is designed. In the early stage of iteration, the algorithm performs global exploration with a higher probability, covering a wider range of candidate solution spaces. In the later stage of iteration, it switches to a mode that prioritizes local fine-tuning, while still retaining a small probability of global exploration capability. This completely solves the defect of the original algorithm that is completely biased towards local search in the later stage of iteration and is prone to getting trapped in local optima, thus achieving a dynamic balance between global exploration and local development capabilities.
[0012] In step S3 of this invention, the complementary capabilities of the two algorithms are integrated to construct a PBWO-SCA hybrid optimization framework with better performance: First, the output of the PBWO population improved by step S2 is directly used as the initial input solution set of the sine and cosine optimization algorithm SCA. With the help of the periodic fluctuation characteristics of the sine and cosine functions unique to the SCA algorithm, a further fine neighborhood search is performed on the threshold candidate set initially screened by PBWO. The position update logic of SCA is used to deeply mine the solution space region around the candidate solution to obtain a higher precision threshold combination.
[0013] In step S4 of this invention, the final implementation of medical image segmentation is directly achieved: the entire search space of the PBWO-SCA hybrid optimization algorithm is completely mapped to the gray value range of the gray-level histogram of the medical image generated in the preprocessing stage. After the algorithm iterates to the preset maximum number of iterations and terminates, it directly outputs the optimal multi-threshold combination obtained by global convergence. Based on this set of optimal thresholds, the gray-level range of the medical image is automatically divided into multiple corresponding regions. Without additional model training or post-processing steps, high-precision multi-region segmentation of complex medical images can be directly achieved, and regions of interest such as lesions and normal tissues can be completely extracted. Attached Figure Description
[0014] Figure 1This is an overall flowchart of a medical image multi-threshold segmentation method based on deep learning technology provided in one embodiment of the present disclosure;
[0015] Figure 2 This is a flowchart of grayscale value normalization provided in one embodiment of this disclosure;
[0016] Figure 3 This is a flowchart of the twin-group leader exploration mechanism in the beluga optimization algorithm provided in one embodiment of this disclosure.
[0017] Figure 4 This is a flowchart of the improved nonlinear balance factor in the beluga optimization algorithm provided in one embodiment of the present disclosure.
[0018] Figure 5 This is a flowchart of the sine and cosine SCA algorithm provided in one embodiment of this disclosure.
[0019] Figure 6 This is a flowchart of a multi-threshold segmentation algorithm provided in one embodiment of the present disclosure.
[0020] Figure 7 This is a flowchart of a PBWO-SCA multi-threshold segmentation method provided in one embodiment of this disclosure.
[0021] Figure 8 This is a comparison chart of the results of multi-threshold segmentation provided in one embodiment of this disclosure. Detailed Implementation
[0022] In current clinical computer-aided diagnosis scenarios, various medical images such as CT, MRI, dermatoscopes, and pathological sections have become the core basis for disease diagnosis. However, these images generally suffer from high noise, low contrast, and blurred boundaries. Traditional multi-threshold segmentation methods experience exponential growth in computational complexity as the number of thresholds increases, and are prone to getting trapped in local optima, failing to accurately extract lesion areas. Various swarm intelligence optimization algorithms introduced in recent years generally suffer from parameter sensitivity, high dependence on initial solutions, and an imbalance between global search and local exploitation capabilities, making it difficult to balance segmentation accuracy and operational efficiency, and unable to meet the real-time deployment needs of primary healthcare. This method addresses these industry pain points by constructing a hybrid optimization framework that integrates the advantages of two algorithms. It enables high-precision and rapid segmentation of complex medical images on ordinary consumer-grade hardware, providing a reliable image analysis foundation for clinical auxiliary diagnosis. The method includes the following steps:
[0023] S1: Acquire medical images to be processed, and complete grayscale normalization and noise pre-filtering;
[0024] S2: The global search and local exploitation capabilities of the beluga optimization algorithm are optimized through the twin-group leadership exploration mechanism and nonlinear balance factor;
[0025] S3: The improved beluga optimization algorithm is fused with the sine-cosine optimization algorithm (SCA) to construct the PBWO-SCA hybrid optimization algorithm;
[0026] S4: Map the search space of the PBWO-SCA algorithm to the value range of the gray-level histogram of the medical image, and directly complete the multi-threshold segmentation of the medical image by iteratively optimizing the search for the globally optimal multi-threshold combination.
[0027] The specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.
[0028] Reference Figure 2 The gray-level normalization step can unify the gray-level distribution of different modal medical images, avoid the problem of inconsistent gray-level ranges caused by differences in imaging parameters in images such as CT and MRI, and enable the subsequent gray-level histogram generation and search space mapping steps of the hybrid optimization algorithm to run stably, greatly improving the robustness of the algorithm.
[0029] The core principle of grayscale normalization is to linearly map the grayscale values of the original medical image to a specified standard range, eliminating the differences in grayscale range between different imaging devices and providing standardized input for subsequent optimization algorithms. The specific grayscale normalization formula is:
[0030] (1)
[0031] in: The original image coordinates The pixel grayscale value at that location; It is the minimum grayscale value of the original image; It is the maximum grayscale value of the original image; This is the normalized pixel grayscale value, ranging from [0, 1]. If you need to map the normalized result to the standard range of [0, 255] for an 8-bit image, simply multiply the above formula by 255. The formula is:
[0032] (2)
[0033] Reference Figure 3 The aforementioned twin-group leader exploration mechanism exhibits richer random behavior in the search path, effectively avoiding algorithm stagnation caused by the beluga whale leader misleading all individuals in the population to search for local optima when trapped in a local optimum.
[0034] The specific principle is as follows: This mechanism includes the white whale leader. Individual beluga whales that follow their leader to hunt prey Individual beluga whales responsible for reconnaissance, sentry duty, and patrol. , The search method for individuals in the subgroup is shown in equation (18). The search method for individuals in the subgroup is shown in equation (19).
[0035] (3)
[0036] (4)
[0037] In the formula, The leader of the beluga whales The position vector is the position of the individual with the best fitness in the population; and The random number in the interval (0,1) is used to enhance the function of the exploration phase; E is the energy of the individual beluga whale, and the calculation formula is shown in equation (5):
[0038] (5)
[0039] In the formula, This indicates the decreasing energy state of the beluga whale. The initial energy state of the beluga whale is represented by the following calculation method:
[0040] (6)
[0041] (7)
[0042] In the formula, and is a random number within the interval (0,1); t is the current iteration number; T is the maximum iteration number. In the twin-subgroup leadership cooperation mechanism, the beluga whale population is divided into two subgroups for division of labor and cooperation, with individuals in each subgroup following the beluga whale leader. By rapidly approaching the optimal value guided by historical best values, the effectiveness of the global search is enhanced, thereby improving the computational efficiency of the algorithm. Individuals in the subgroup swim towards randomly selected beluga whale individuals to find the best match.
[0043] Reference Figure 4 The improved nonlinear balance factor allows the BWO algorithm to retain the possibility of global search while performing local search in its later stages, achieving a better balance between the algorithm's exploration and development capabilities. In the basic BWO algorithm, this balance factor is utilized... The control algorithm has transitioned from the exploration phase to the development phase. However... By linearly decreasing parameters Random numbers between (0, 1) The composition of the algorithm leads to local searches in the later stages of iteration, making it prone to getting trapped in local optima. To overcome this shortcoming, a new nonlinear balance factor update strategy is introduced, as shown in equations (8) and (9):
[0044] (8)
[0045] (9)
[0046] In the formula, t is the current iteration number, and T is the maximum iteration number. A random number between (-1.5, 1.5). When the algorithm executes the search phase, During the development phase, this is introduced. This allows the algorithm to perform a global search with a higher probability in the early stages and accelerate the local search in the later stages.
[0047] Reference Figure 5 The Sine Cosine Algorithm (SCA) is a novel intelligent optimization algorithm that utilizes the volatility and periodicity of sine and cosine functions to explore the optimal solution globally and gradually converge. Its optimization process is similar to other intelligent optimization algorithms, consisting of two phases: exploration and development. The position update formula for the Sine Cosine Algorithm is denoted as:
[0048] (10)
[0049] Equation (10) is the core formula of the sine and cosine algorithm. This mathematical expression defines the position of the updated solution. It is the position of particle i in the k-th iteration; The target point is the historical optimal solution for the current particle. , , and It is a random number; where " "" indicates absolute value.
[0050] The role of equation (11) is to balance the range of variation of sine and cosine, and to control the algorithm's gradual shift from global to local search. It can improve the algorithm's global search capability, conversely, smaller... This facilitates the local development of the algorithm. This random number helps balance the exploration and development process of the SCA, helps the algorithm find more feasible solutions within the search space, and ultimately converges to the global optimum. Its calculation method is as follows:
[0051] (11)
[0052] Equation (11) is a random number The calculation formula is such that the phase change of the sine and cosine functions gradually changes with the iteration, indicating the direction of movement of the next solution and adjusting the position of the solution. The value of 'a' determines the distance the particle moves in the search space and is used to control the phase change of the sine and cosine functions. The value affects the change in amplitude. As the number of iterations increases, the amplitude of the phase change gradually decreases, further controlling the search process and reducing the exploration range of the solution, so that it gradually converges to the global optimum, thereby balancing the algorithm's global search and local search capabilities.
[0053] Reference Figure 6 The multi-level threshold segmentation method divides an image into different categories based on the intensity values of pixels in a grayscale or color image. The size of a grayscale image is set to... The grayscale range is Assuming This indicates the position in the grayscale image. The grayscale value. Single-threshold image segmentation is the process of dividing an image into two regions, setting a threshold T. One region contains pixels greater than or equal to the threshold T, while the other region contains pixels less than the threshold T. The segmented image can be represented as:
[0054] (12)
[0055] When an image contains multiple targets or features with overlapping or similar grayscale ranges, single-threshold image segmentation may not meet the needs for fine-grained image segmentation. Multi-threshold image segmentation is an effective method that can segment an image into multiple regions by selecting multiple thresholds, thereby enabling more precise identification of different targets or features within the image. Assuming m thresholds are used... Segment the image into The specific expression for each region is as follows:
[0056] (13)
[0057] In the formula, This represents the i-th class, and m is the number of thresholds. It is the i-th threshold.
[0058] Reference Figure 7The PBWO-SCA multi-threshold segmentation method described herein uses the candidate solution set output by PBWO as the initial input to the SCA algorithm. Utilizing the periodic fluctuation characteristics of sine and cosine functions, the SCA position update logic performs depth mining on the neighborhood space of the candidate solutions, further filtering to obtain threshold combinations with better accuracy. After iterating to a preset maximum number of iterations, the globally optimal multi-threshold combination is output. Based directly on this set of thresholds, the grayscale range of the medical image is divided, completing automatic multi-region segmentation and outputting the final medical image segmentation result.
[0059] Reference Figure 8 The comparison chart of the PBWO-SCA multi-threshold segmentation method presents a comparison of the segmentation performance of six optimized algorithms—GSRGSRPSO, GA, ABC, GWO, CS, and PWBO-SCA—on five different tumor images. Among these algorithms, the CS algorithm performed particularly poorly, exhibiting significant missegmentation during tumor image segmentation. The ABC algorithm also struggled with complex image segmentation tasks, showing relatively poor performance. In contrast, the GA and GWO algorithms performed at a moderate level in tumor image segmentation; both algorithms could identify tumor regions to a certain extent, but there was still room for improvement in detail processing. The GSRPSO algorithm showed good performance in tumor image segmentation; however, it also carries the risk of getting trapped in local optima, so in some complex cases, it may still need to be combined with other strategies to improve segmentation accuracy. The PWBO-SCA algorithm performed best, more accurately identifying tumor regions and providing more refined detail processing, offering a new and effective method for automatic tumor image segmentation.
Claims
1. A multi-threshold segmentation method for medical images based on deep learning technology, combined with a swarm intelligence optimization strategy to achieve high-precision automatic segmentation of medical images, comprising: S1: Acquire medical images to be processed, and complete grayscale normalization and noise pre-filtering; S2: The global search and local exploitation capabilities of the beluga optimization algorithm are optimized through the twin-group leadership exploration mechanism and nonlinear balance factor; S3: The improved beluga optimization algorithm is fused with the sine and cosine optimization algorithm (SCA) to construct the PBWO-SCA hybrid optimization algorithm; S4: The search space of the PBWO-SCA algorithm is mapped to the value range of the gray-level histogram of the medical image, and the multi-threshold segmentation of the medical image is directly completed by iteratively optimizing and searching for the globally optimal multi-threshold combination.
2. The medical image multi-threshold segmentation method based on deep learning technology according to claim 1, characterized in that: In step S1, after completing grayscale value normalization and noise pre-filtering, the grayscale distribution of the preprocessed medical image is further statistically analyzed to generate a corresponding grayscale histogram. The grayscale value range of this histogram is directly mapped to the initial search space of the subsequent optimization algorithm, eliminating the grayscale range deviation caused by different imaging devices and providing a standardized input basis for subsequent threshold optimization.
3. The medical image multi-threshold segmentation method based on deep learning technology according to claim 1, characterized in that: The dual-subgroup leadership exploration mechanism in step S2 is as follows: the beluga whale population is divided into two cooperating subgroups. Subgroup 1 is led by the beluga whale with the best fitness within the population. All members of subgroup 1 follow the leader's position to search in a directional manner towards the potential optimal region, greatly improving the global search efficiency. The beluga whales in subgroup 2 do not rely on the leader's guidance and swim freely to other randomly selected beluga whales within the population to seek optimization, enriching the diversity of search paths and avoiding premature convergence of the entire population when the leader itself gets stuck in a local optimum. At the same time, a dynamic beluga whale energy parameter that decreases with the number of iterations is introduced to control the search step size of the two subgroups. In the early stage of iteration, a large step size is maintained to cover a larger search range, and in the later stage of iteration, the step size is gradually reduced to adapt to the needs of refined search.
4. The medical image multi-threshold segmentation method based on deep learning technology according to claim 1, characterized in that: The specific replacement logic of the nonlinear balance factor in step S2 is as follows: completely replace the original linear random balance factor in the basic white whale optimization algorithm, design a nonlinear update strategy that dynamically adjusts with the number of iterations, so that the algorithm performs global exploration actions with a much higher probability than the basic algorithm in the early stage of iteration, maximizing the coverage of the candidate solution space; in the later stage of iteration, prioritize switching to the local fine development mode, while retaining the low probability of global exploration capability, completely solving the defect of the original algorithm being completely biased towards local search in the later stage of iteration and easily getting trapped in local optima, and achieving a dynamic balance between global exploration and local development capabilities.
5. The medical image multi-threshold segmentation method based on deep learning technology according to claim 1, characterized in that: After improving the beluga whale optimization algorithm in step S2, an additional Cauchy-Gaussian hybrid mutation strategy with an observation triggering mechanism is added: real-time monitoring of the average fitness change of the population, and when the average fitness of the population does not change for two consecutive iterations, the mutation operation is automatically triggered to perform random perturbation on the clustered beluga whale population, breaking the population clustering deadlock, effectively helping the algorithm to escape the local optimum trap, and further improving the optimization robustness of the algorithm.
6. The medical image multi-threshold segmentation method based on deep learning technology according to claim 1, characterized in that: The fusion logic of step S3 is as follows: the candidate population output by the improved PBWO algorithm is directly used as the initial input solution set of the Sine and Cosine Optimization Algorithm (SCA). By leveraging the periodic fluctuation characteristics of the sine and cosine functions unique to the SCA algorithm, the neighborhood refinement mining is performed on the threshold candidate set obtained by PBWO. The unexplored area around the candidate solution is traversed through the position update logic of SCA to obtain a threshold combination with better accuracy, thereby achieving the complementary synergy between the global search advantage of PBWO and the local development advantage of SCA.
7. The medical image multi-threshold segmentation method based on deep learning technology according to claim 1, characterized in that: The S3 step also retains the whale fall mechanism of the basic beluga optimization algorithm. The whale fall probability decreases linearly from 0.1 in the early stage of the iteration to 0.05 in the late stage of the iteration. By simulating the natural apoptosis behavior of beluga whales, the population position is updated, which further enriches the population diversity and avoids excessive population aggregation in the later stage of the iteration.
8. The medical image multi-threshold segmentation method based on deep learning technology according to claim 1, characterized in that: In step S4, after the algorithm iterates to the preset maximum number of iterations and terminates, it directly outputs the optimal multi-threshold combination obtained by global convergence. Without additional deep learning model training or complex post-processing, it can directly divide the gray range of the medical image into multiple corresponding regions based on the set of thresholds, accurately distinguish different target regions such as lesion areas, normal tissues, and backgrounds, and complete the fully automatic multi-threshold segmentation of complex medical images end-to-end.