Enhancing Medical Imaging with Swarm Intelligence Algorithms

: Medical imaging serves as an indispensable tool for the diagnosis and continuous monitoring of a diverse array of health conditions. A recent and exciting development in this ﬁeld is the integration of Swarm Intelligence (SI) algorithms, which draw inspiration from the collective behaviors observed in social insects. This collaborative e ﬀ ort between nature and technology is progressively transforming medical image analysis, elevating both its quality and e ﬃ ciency. In this book chapter we have presented various SI optimization algorithms like ACO, BCO, FA, FSA and WOA in detail. By exploring these algorithms, we aim to provide an in-depth understanding of their respective beneﬁts and limitations when applied to medical image analysis. This knowledge empowers practitioners to choose the most appropriate algorithm for speciﬁc tasks, ensuring optimal outcomes. Furthermore, we shed light on SI-Based Segmentation methodologies, elucidating the advantages and constraints associated with these approaches. The ability of SI algorithms to innovate in the realms of image segmentation, feature extraction, and classiﬁcation is emphasized, with a focus on their potential to enhance diagnostic accuracy and elevate the quality of patient care. One of the most exciting prospects on the horizon is the amalgamation of SI with cutting-edge technologies like deep learning and big data analytics. This union has the potential to revolutionize medical imaging by providing solutions that are not only more accurate and e ﬃ cient but also highly clinically relevant. As these developments continue to unfold, the synergy between SI and emerging technologies promises to reshape the medical imaging landscape, ultimately enhancing patient care and improving healthcare outcomes in unprecedented ways.


INTRODUCTION
Swarm intelligence (SI), a subset of AI, has received attention as a dynamic area.Gerardo and J. Wang first developed SI in 1989 in the aim of constructing cellular robotic systems [1].The amazing flexibility and versatility of SI-based algorithms can be ascribed to their growing popularity.These algorithms feature intrinsic self-learning skills as well as the capacity to adapt to external changes, which has attracted significant interest and identified various application sectors.SI has recently gained prominence because to its efficacy in handling NP-hard issues, where finding a global optimal solution in real-time becomes extremely difficult.These challenges frequently contain a plethora of alternative answers, making the discovery of a feasible solution under time restrictions critical.SI demonstrates its worth in handling nonlinear design issues in a variety of scientific, engineering, and industrial sectors.Its applications include business planning, data mining, AI, bioinformatics, and industrial applications [2].SI is fascinatingly used in complex applications such as navigation control, planetary motion sensing, malignant tumor diagnosis and control, and image processing techniques.SI algorithms' flexibility and problem-solving skills make them a significant tool in today's market, where complex issues and real-world circumstances need inventive solutions.SI is based on the coordinated behavior of social creatures such as ants, birds, and bees.It is the study of how individual agents with basic rules interact with one another to achieve complex collective behaviour.This concept has resulted in the creation of algorithms that replicate these natural processes in order to tackle a variety of complicated issues.Decentralized control, self-organization, and emergent behavior are key features of SI.SI, rather than depending on a central authority, focuses on interactions and feedback among agents to obtain desired results.SI is used in optimization, robotics, image analysis, telecommunications, traffic management, finance, and other fields.SI techniques provide unique answers to problems that may be difficult to address using standard methods by imitating the phenomena observed in nature [3].
A swarm is made up of many homogenous and simple agents that interact locally among themselves, with no central control.This absence of central control results in fascinating global behaviors.Modern algorithms based on swarm-based concepts have arisen as a varied family of algorithms that draw inspiration from natural patterns and processes.These algorithms provide extremely efficient, quick, and low-cost solutions to complex problems [4,5].SI (Swarm Intelligence), an emerging subject within Artificial Intelligence, simulates the collective behaviors found in nature swarms ranging from bird flocks to ant colonies and honey bees.Individual swarm members or agents have limited sophism, yet they interact based on specific behavioral patterns that fulfill their survival needs.Swarm members' social contacts might be direct or indirect [6].Honey bees, for example, communicate directly through the "waggle dance," whereas ants communicate indirectly through pheromone trails.Stigmergy is an example of indirect contact in which communication occurs through the environment [7].
SI is a domain that includes both natural and AI systems in which various individuals are structured through selforganization and decentralized control [8].It is made up of unsophisticated, self-governing creatures who materialize as emergent intelligence.As a result, an autonomous intelligent system interacts with its surroundings, engaging with numerous other independent agents.Such systems do not follow global plans or leaders' orders.The widespread use of such systems extends across various fields, providing SI its multidisciplinary nature.
SI approaches have been investigated and utilized in the context of medical imaging to solve a variety of difficulties and enhance picture processing and diagnosis.The use of SI methods in medical imaging adds a new level of complexity to picture interpretation and processing.Traditional methods for interpreting medical pictures frequently rely on human knowledge or pre-defined algorithms, which can be time-consuming, subjective, and overlook minor patterns or abnormalities [9].SI approaches provide a novel technique to automate and improve these operations.Medical imaging is essential in modern healthcare because it provides crucial insights into a patient's interior anatomy, detects anomalies, and aids in illness diagnosis and therapy planning [10].However, for healthcare practitioners, evaluating and interpreting enormous volumes of complicated medical picture data may be a difficult and time-consuming process.
Here are a few examples of how SI has been employed in medical imaging: a) Segmentation: Image segmentation tasks have been performed using SI techniques like as Ant Colony Optimization (ACO) or Particle Swarm Optimization (PSO).These algorithms can assist in the identification of regions of interest in medical pictures, such as tumors, organs, or other anatomical features.
b) Feature Selection: Identifying meaningful characteristics from a large quantity of data is critical in medical image analysis.SI approaches may be used to maximize the selection of useful features and minimize data dimensionality while maintaining critical information for diagnosis or classification.c) Image Registration: SI approaches have been used to handle image registration problems, such as aligning various medical pictures to produce a complete view or tracking changes over time.
d) Classification and Diagnosis: Classification models for medical imaging applications may be built using SI methods.Based on picture properties, they can help distinguish between healthy and unhealthy tissues or detect particular disorders.
e) Enhancement and Denoising: SI approaches may be used to improve the quality of medical pictures by removing noise, artifacts, and other flaws in the data.
f) Optimizing Imaging Parameters: In medical imaging, choosing optimal imaging parameters (e.g., exposure, contrast, etc.) is critical to obtaining high-quality pictures.SI methods can assist in optimizing these parameters for various imaging modalities.
g) Image Reconstruction: SI methods may be used to improve picture quality and eliminate artifacts in image reconstruction tasks such as CT or MRI.
Although SI and deep learning are independent approaches to solve complicated issues, academics have investigated ways to combine them for a variety of applications.The combination of SI with deep learning intends to capitalize on the characteristics of both approaches, resulting in more robust and efficient deep learning models [11].Here are some examples of how SI has been employed in deep learning: a) Hyperparameter Optimization: Deep learning models often include a large number of hyperparameters that must be tweaked for optimal performance.Grid search and random search are two examples of traditional methods that might be computationally expensive and wasteful.SI techniques like PSO and Genetic algorithm (GA) have been utilized to automatically seek and optimize hyperparameters, resulting in faster convergence and better-performing models.

OVERVIEW OF SI OPTIMIZATION ALGORITHMS
The SI bionic optimization algorithm is a unique technique in evolutionary computing that was inspired by the collaborative and competitive tendencies found in social creatures.This technique takes advantage of group synergy and has found applications in a variety of domains, including data classification, clustering, decision support, pattern recognition, multi-objective optimization, robot control, and system identification, among others.
The SI bionic optimization method is a potential step forward in the field of optimization computing.It tackles the difficulty of refining solutions for a given target by exploiting collective behaviors displayed inside a group as a heuristic search strategy [12].Figure 1 depicts the conceptual structure of the SI optimization method.
Exploration, also known as diversification, is a fundamental feature of all SI approaches.Exploration searches the search landscape for new solutions that vary from the existing solution.This assists us in discovering a solution that is superior to the existing one and in diversifying our solution.It also assists us in moving away from a local solution in order to locate new and better options.However, we must exercise caution since too much exploration would result in sluggish convergence, which is undesirable in any swarm intelligence method.Figure 2 depicts a general framework for how these swarm-based approaches function.These algorithms apply SI concepts to complicated medical imaging problems ranging from image processing and segmentation to registration and optimization.The algorithm of choice is determined by the specific task at hand as well as the peculiarities of the medical imaging data.

PARTICLE SWARM OPTIMIZATION (PSO
Within the realm of medical image analysis, particularly in the diagnosis and comprehension of brain abnormalities like tumors, Particle Swarm Optimization (PSO) has found diverse applications.PSO serves as an optimization technique to bolster the precision of algorithms employed in brain image segmentation [14].
PSO draws its inspiration from the exploration of avian foraging behaviors in the natural world.The inception of the particle swarm algorithm by Kennedy et al. stemmed from the examination of how bird flocks seek out sustenance.In this context, PSO characterizes the ultimate food source as the conclusive solution, with a solitary bird analogous to an inert particle.The sequence of the search process unfolds as follows: 1.At first, the solution space is filled with random particles that are constantly searching for the answer.
2. The particle's particular extreme value is simultaneously recorded as the distance from the final solution during the search and then broadcast to other particles in the swarm.
3. The global extremum for the whole particle swarm emerges as the most advantageous individual extreme value across all particle swarms.
4. The particles' trajectory and velocity are then adjusted through the utilization of their respective individual and global extreme values.
5. As iterations progress, a substantial portion of the particles converge around the final solution.
The constituents of PSO are defined as follows: ω represents the inertia factor, while C1 and C2 are learning factors, also referred to as acceleration constants.Notation-wise, X id denotes the position of the i-th particle in the d-dimensional solution space, P gd signifies the global extremum, and P id represents the individual extremum.The positional update equation for a particle is manifested in Formula (1), and the formula for updating velocity is presented in Formula (2).
The development and use of PSO in image processing a. Image segmentation The use of the particle swarm technique in picture segmentation may be divided into three types: 1. Original Image Segmentation Method: The PSO was first utilized in picture segmentation to improve on previous techniques.The technique was used with optimum entropy threshold segmentation methodology in one case [15].This fusion allowed the particle swarm algorithm to calculate and pick thresholds.Experiments using synthetic aperture radar (SAR) pictures revealed a decrease in segmentation time while maintaining accuracy.Another study [16] used the particle swarm approach to improve watershed picture segmentation by combining it with the region growth method.A related effort [17] addressed the issue of the fuzzy C-means algorithm's vulnerability to local optima in noisy picture segmentation.A unique strategy for enhanced segmentation was developed by translating the picture into a neuromorphic representation and merging the particle swarm algorithm with fuzzy C-means.
2. PSO Enhancement Strategies: An improvement strategy was developed to address the PSO's propensity to converge towards local optima and its decreased search capability in later phases.This solution [18] combined information entropy with the particle swarm algorithm, using maximal information entropy as a fitness function to compensate for population diversity declines during later search phases.
3. Hybrid picture Segmentation Approaches: In the current literature, one of the most successful methods is to enhance image segmentation by combining PSO with other algorithms.Notably, Zhang et al. [19] used PSO to complement an ensemble deep neural network, introducing diversity into the optic disc (OD) segmentation process for retinal pictures.Liang et al. [20] used the particle swarm technique with fuzzy C-means to achieve binary initial segmentation and improved supervised fuzzy C-means in oil extraction situations.Farshi et al. [21] improved color picture segmentation approaches by using a multi-modal particle swarm to optimize image segmentation algorithms.A recent study [22] integrated the PSO algorithm with the gray wolf method to provide multi-level threshold picture segmentation.While these fusion techniques effectively handle concerns of local optima and convergence accuracy, the addition of other algorithms always adds parameters, increasing algorithm complexity and runtime.

b. Image classification
The PSO algorithm's application in picture classification may be generally classified into two basic approaches: 1. Integration with Existing Image Classification Techniques: The first approach includes combining the particle swarm algorithm with existing picture categorization algorithms.In one study, for example, Ref. [23] used a quantum particle swarm technique to improve remote sensing picture categorization.This quantum particle swarm approach was used to sift through unique properties of various remote sensing photos, highlighting those that were critical to getting superior classification results.Finally, as a remote sensing image classifier, a least squares support vector machine was constructed, allowing picture classification and identification.Another paper, Ref. [24], described a method for optimizing FCM cluster centers using the PSO algorithm.This method successfully reduced the susceptibility of classic FCM to beginning values and noise.As a result, picture segmentation effectiveness increased and stability surpassed that of the traditional FCM approach.
2. Strategies for Dealing with PSO Limitations: Novel augmentation tactics have been devised in response to the particle swarm algorithm's vulnerability to local optima and tendency to slow down in later phases.A genetic particle optimization technique for image categorization was presented in ref. [25].This technique addressed the key issue of cluster center selection in the K-Means clustering algorithm, which has a considerable impact on the outcome.The genetic particle optimization approach was used to optimize cluster centers, avoiding the negative impacts of random center selection and, as a result, improving picture classification accuracy.
c. Image matching As image processing technology advances, the notion of image matching relies around retrieving similar or identical pictures from a database based on their distinguishing characteristics.Traditional picture retrieval techniques need a significant amount of processing while producing relatively low accuracy.Many academics have advocated using the particle swarm technique into picture matching to reduce processing demands while increasing accuracy.This integration is divided into three categories: 1. Integration with Existing Image Matching Techniques: A popular technique combines the PSO algorithm with well-established picture matching approaches.In one study, for example, Ref. [26] utilized the grayscale image matching approach to evaluate marks on molten iron tankers, allowing for exact localisation.The particle swarm method generally selects the ideal matching point in this procedure, followed by better use of the Harris corner identification algorithm and sub-pixel approaches for exact positioning.Another paper [27] presented GPSO, a fast image matching method based on gray theory and PSO, to solve concerns of sluggishness and poor noise resistance.Furthermore, Ref. [28] improved both classical and PCA-based image matching methods to correct mismatches.SIFT is used to build a 128-dimensional vector matrix, which is then dimensionally reduced using PCA.The PSO method discovers global optimum solutions for feature points of the reference graph by using each feature point vector from one graph as a reference.
2. Strategies for Overcoming PSO Difficulties: Given the particle swarm algorithm's inclination to meet local optima and sluggishness in later stages, strategies for improvement have been developed.To increase matching accuracy and computing efficiency in multi-source remote sensing pictures, a novel approach was proposed in an article [29].It includes the contourlet transform, the Hausdorff distance, and an enhanced PSO algorithm.For matching low-frequency edge pictures, a simplified PSO method with severe value perturbation is used, providing coarse matching points.Following that, the original picture is recalibrated using the position of these coarse matching points, resulting in accurate matching.This approach eventually results in full-resolution remote sensing image matching.
3. Hybrid image Matching Approaches: At the moment, one of the most effective tactics is optimizing picture matching by merging PSO with other algorithms.Notably, Ref. [30] used fuzzy neural networks (FNN) and PSO techniques to recognize license plate images in intelligent transportation.This hybrid strategy takes use of PSO's speed and the accuracy of FNNs, enhancing neural network weight learning and training to maximize performance.

d. Image edge identification
The use of the PSO technique in picture edge identification may be divided into three major categories: 1. Integration with Existing Image Edge Detection Techniques: The first approach includes combining the PSO algorithm with existing picture edge detection methods.In one research, for example, Ref. [31] proposed an image edge identification technique based on Quantum Behavioral PSO (QPSO).This method adds QPSO into the area of picture edge recognition, potentially improving edge identification precision.
2. Strategies for Dealing with PSO Limitations: Enhancement tactics have been developed in response to the PSO algorithm's propensity to slip into local optima and its gradual performance in later phases.By incorporating an enhanced PSO algorithm into image edge identification, ref. [32] aims to address the drawbacks of standard image edge detection approaches.This approach provides excellent results for color picture edge recognition by utilizing the vector rotation theory of quaternions.Similarly, Ref. [33] described an edge identification model that combined cellular neural networks and the PSO.This project aims to improve edge detail identification within existing grayscale picture edge detection methods, resulting in more pleasing results.
3. Hybrid Image Edge Detection Methods: Currently, enhancing picture edge detection frequently entails combining PSO with other techniques.To counteract premature convergence, ref. [34] provides an improvised PSO algorithm based on the layered notion.When used to identify picture edges, this technique optimizes the gradient operator to achieve the best image edge.It efficiently handles the issue of missing detail edges while also extracting edges in predetermined directions.In related research [35], an edge identification approach based on the GWO algorithm was developed.This method dynamically modifies the edge identification threshold based on the amount of the hidden information.After chaotic encryption, the PSO method optimizes the embedding of edge and non-edge pixel bits, followed by XOR coding for secret information embedding.
e. Feature extraction of an image The PSO algorithm's image feature extraction separated into three main techniques [36]: 1. Integration with Existing Image Feature Extraction Techniques: The first option includes combining the PSO algorithm with well-established picture feature extraction methods.In a work by Ref. [37], a method for visual feature extraction was presented that integrated PSO with Independent Component Analysis (ICA).To rapidly get the global optimum solution and maximize the objective function, the PSO algorithm was included into the conventional ICA technique.This method efficiently retrieved picture information while decreasing the computational complexity inherent in classic ICA approaches.
2. Strategies for Dealing with PSO Limitations: Recognizing the particle swarm algorithm's vulnerability to local optima and its tendency to slow down in later phases, several augmentation solutions have been created.A feature extraction method for hyperspectral images based on multiparticle swarm co-evolution was presented in the reference [38].In this paper, an enhanced PSO variation known as IPSO was suggested, which was designed exclusively for band coding within particle swarms.A related technique is shown in Ref. [39], which uses an augmented particle swarm algorithm in conjunction with the least squares support vector machine to recognize green pepper targets.This approach employs mutation strategies to stimulate particle swarm activity, as well as the refining of ideal parameters for the support vector machine, resulting in the advancement of the recognition model.
3. Hybrid Methods for Image Feature Extraction: In the present literature, improving image feature extraction frequently entails combining PSO with other techniques.The issue of failure feature parameter extraction and setup in the batch diagnosis of power equipment infrared pictures was addressed in ref. [40].The equipment thermal picture is efficiently separated from the background by integrating the particle swarm technique with the Niblack method.To improve classification speed by lowering feature correlation, Ref. [41] adopts an adaptive selection technique for tobacco leaf feature selection that employs an RBF neural network, a support vector machine, and an Adaboost mixed binary PSO.
Ant Colony Optimization (ACO) ACO is a natural-inspired optimization method that mimics ant foraging behavior.ACO can be used to tackle a variety of problems in medical imaging, including image registration, segmentation, and feature selection.
ACO works by replicating ant interactions as they search for food.In the optimization issue, each ant represents a potential solution or path.Ants communicate by leaving scent trails that direct their movement and influence their decisions.
In picture registration, for example, ants may relate to distinct transformation parameters.Ants leave pheromones that indicate the quality of their solutions as they move across the solution area.Paths with increasing pheromone concentrations become more appealing over time, guiding ants to better solutions.
The capacity of ACO to balance exploration (looking for new solutions) with exploitation (refining current solutions) is its strength.This equilibrium is critical in complex medical imaging activities where correct registrations, segmentations, or features are required for proper diagnosis and therapy planning [42].
Algorithm: ACO for Image Registration in Medical Imaging Step 1: Initialization 1. Create a set of artificial ants, each representing a potential transformation (translation, rotation, scaling, etc.) for image registration.
2. Initialize pheromone levels on all possible transformations.

Set algorithm parameters: number of ants, pheromone evaporation rate, exploration-exploitation balance, maximum iterations
Step 2: Ant Movement and Image Registration 1.For each ant: • Start at a random initial transformation.
• Apply the transformation to one of the images.
• Calculate a similarity metric (e.g., mutual information) between the transformed image and the reference image.
• Move to a neighboring transformation based on a probability function that considers pheromone levels, similarity metric, and heuristic information.
• Update the ant's transformation and similarity score as it moves.
• Repeat until a stopping criterion is met (e.g., maximum iterations or convergence).
Step 3: Update Pheromone Levels 1. Calculate the quality of transformations found by each ant (e.g., based on the similarity metric).
2. Update pheromone levels on the transformations' paths: • Evaporate existing pheromones to encourage exploration.
• Deposit new pheromones on transformations based on the quality of solutions found.
Step 4: Global Update (Optional) 1. Optionally, apply a global pheromone update to reinforce the best transformations found so far.
2. This step intensifies the search towards promising transformation parameters.
Step 5: Termination 1. Check if a termination criterion is met (e g , maximum iterations, convergence of solutions).

If not, return to
Step 2 and repeat the process.
Step 6: Output 1.The transformation with the best similarity score found by the ants is the output of the algorithm.This transformation can be used to register the images.
This modified ACO method optimizes picture registration transformation parameters in medical imaging.It uses pheromone communication and exploration-exploitation balance to direct ants toward modifications that improve medical image alignment.
Bee Colony Optimization (BCO): It is a bio-inspired optimization technique that is inspired by bee foraging behavior within a hive.BCO can be used for a variety of tasks in medical imaging, including image augmentation, segmentation, and feature selection.
The algorithm in BCO mimics the behavior of three categories of bees: scout bees, employed bees, and observer bees.Scout bees investigate the solution space by developing and evaluating solutions, employed bees refine these solutions depending on their quality, and observer bees select solutions from the employed bees based on their fitness.
In picture improvement, for example, scout bees could symbolize multiple sets of enhancing settings.Employed bees modify these settings to increase image quality, while observer bees assess the quality of upgraded photos and select the most promising solutions.This iterative technique aids in the discovery of optimal or near-perfect picture enhancement solutions.
The key advantage of BCO is its capacity to balance solution space exploration and exploitation, similar to how bees examine flowers for nectar.As a result, it is well-suited to addressing complicated optimization challenges in medical imaging, where determining the ideal combination of parameters or features can have a major impact on diagnosis and therapy [43].
Algorithm: Bee Colony Optimization (BCO) for Image Segmentation in Medical Imaging Step 1: Initialization 1. Create a population of scout bees, employed bees, and onlooker bees.
2. Initialize the scout bees with random solutions (segmentation thresholds in this case).
3. Set algorithm parameters: number of scout bees, employed bees, onlooker bees, maximum iterations, and a stopping criterion.
Step 2: Employed Bee Phase 1.For each employed bee: • Select a solution (segmentation threshold) and apply it to the medical image.
• Calculate an objective function (e.g., image entropy or edge detection) to assess the quality of the segmentation.
• If the solution improves over the current best solution, update the best solution.
Step 3: Onlooker Bee Phase 1. Calculate the fitness of each employed bee based on the quality of its solution.
2. For each onlooker bee: • Choose an employed bee with a probability proportional to its fitness.
• Perform a local search around the selected employed bee's solution to explore nearby solutions.
• Update the best solution if an improvement is found.
Step 4: Scout Bee Phase 1.For each scout bee: • If the employed bee's solution does not improve after a certain number of iterations, abandon it and generate a new random solution.
• Update the best solution if a new global best is found.
Step 5: Termination 1. Check if the maximum number of iterations or a specific stopping criterion is met.

If not, return to
Step 2 and repeat the process.
Step 6: Output 1.The best solution found by the bees is the output of the algorithm.This solution represents the optimal segmentation threshold for the medical image.
Assume we have an MRI brain image that must be segmented into brain tissue and lesions.The BCO algorithm begins by assigning random segmentation thresholds to the scout, employed, and bystander bees.As the process iterates, employed bees enhance their solutions by assessing the quality of segmentations using an objective function such as edge detection.
During the onlooker bee phase, onlooker bees select employed bees with higher fitness values (better segmentations) and use local search to investigate adjacent solutions.The algorithm encourages the testing of various threshold values as well as the exploitation of promising locations.
The scout bee phase contributes to diversity by replacing solutions that fail to improve after a specified number of iterations.This prevents the algorithm from becoming stuck in local optima.
Finally, the BCO algorithm returns the segmentation threshold that produces the highest-quality segmentation.This threshold can be used to precisely segment an MRI brain image, hence assisting in medical diagnosis and therapy planning.
Algorithm: Firefly Algorithm (FA) for Image Enhancement in Medical Imaging Step 1: Initialization 1. Create a population of fireflies, each representing a potential solution (adjustment of image parameters) 2. Initialize fireflies' light intensities based on the initial fitness of their solutions.
3. Set algorithm parameters: number of fireflies, attractiveness parameter, maximum iterations, and stopping criterion.
Step 2: Firefly Movement and Image Enhancement 1.For each firefly: • Start with a random initial solution representing image enhancement parameters.
• Calculate the initial light intensity based on the fitness of the initial solution (e.g., image quality metric).
• Move towards brighter fireflies with a higher light intensity while considering attractiveness and distance.
• Adjust the image enhancement parameters based on the movement towards brighter fireflies.
• Calculate the new light intensity of the firefly's solution after movement.
Step 3: Light Absorption 1. Fireflies with lower light intensities may get absorbed by brighter ones.Update the absorbed fireflies' solutions and intensities.
Step 4: Termination 1. Check if the maximum number of iterations or a specific stopping criterion is met.

If not, return to
Step 2 and repeat the process.
Step 5: Output 1.The solution of the firefly with the highest light intensity is the output of the algorithm.This solution represents the optimal image enhancement parameters.
Consider an X-ray image that needs to be enhanced to make certain structures more visible.The FA process begins by randomly assigning picture enhancement parameters to fireflies.Fireflies travel towards brighter fireflies while the algorithm iterates, adjusting their image enhancement settings in the process.
The brightness, contrast, and noise reduction characteristics can be modified based on the movement of the fireflies.Fireflies are drawn to brighter ones based on their beauty and the distance between them.This movement successfully directs the algorithm toward picture enhancement settings that result in higher image quality.
Lower light intensity fireflies may be absorbed by brighter ones, progressively refining the solutions through repetitions.
The FA algorithm eventually outputs the picture enhancement parameters from the firefly with the maximum light intensity.These parameters can be applied to the X-ray image to produce a better version that highlights the required structures [44].
Algorithm: Fish Swarm Algorithm (FSA) for Image Segmentation in Medical Imaging Step 1: Initialization 1. Create a population of virtual fish, each representing a potential solution (segmentation mask) for image segmentation.
2. Initialize fish positions randomly within the solution space.
3. Set algorithm parameters: number of fish, step size, maximum iterations, and stopping criterion.
Step 2: Fish Movement and Image Segmentation 1.For each fish: • Start with a random initial position representing a segmentation mask.
• Evaluate the quality of the segmentation using an appropriate criterion (e.g., region homogeneity, boundary accuracy).
• Move towards more promising positions (better segmentations) while considering the step size.
• Update the fish's position based on movement rules.
Step 3: Fish Grouping and Attraction 1. Group fish into clusters based on their similarity in segmentation quality.

Calculate the center of each cluster to determine attractive regions in the solution space
Step 4: Local Search 1. Fish within each cluster perform local search around the cluster center to refine their solutions.
Step 5: Termination 1. Check if the maximum number of iterations or a specific stopping criterion is met.

If not, return to
Step 2 and repeat the process.
Step 6: Output 1.The solution of the fish with the best segmentation quality is the output of the algorithm.This solution represents the optimal segmentation mask for the medical image.
Assume we have a medical image with multiple tissue types that we wish to precisely segment.The FSA algorithm starts by creating virtual fish in the solution space, with each fish representing a possible segmentation mask.
Each fish analyzes the quality of its segmentation as the algorithm goes through iterations by calculating homogeneity within regions and accuracy along boundaries.Fish will then relocate to positions that promise better segmentation while keeping the step size in mind to avoid unduly abrupt moves.
Fish with comparable segmentations naturally congregate together over time.These clusters' centers represent appealing segmentation solutions.To refine the segmentations further, local search is performed around these cluster centers.
Finally, the FSA algorithm produces the best segmentation mask, as determined by the fish that explored and refined their solutions the most effectively.This mask can be used to precisely identify distinct tissue types inside a medical image, benefiting doctors in diagnosis and therapy planning [45].
Algorithm: Whale Optimization Algorithm (WOA) for Image Registration in Medical Imaging Step 1: Initialization 1. Create a population of virtual whales, each representing a potential solution (transformation parameters) for image registration.
2. Initialize whales' positions randomly within the solution space.
3. Set algorithm parameters: number of whales, maximum iterations, and a stopping criterion Step 2: Whale Movement and Image Registration 1.For each whale: • Start with a random initial position representing transformation parameters (e.g., translation, rotation).
• Calculate the fitness of the solution by measuring the alignment quality between the transformed image and the reference image.
• Move towards better solutions (higher fitness) using a movement rule inspired by the hunting behavior of whales.
Step 3: Encircling Prey Behavior 1.A portion of the whales (e.g., top 30%) performs an encircling prey behavior to converge towards promising solutions.Adjust the position of these whales based on a defined encircling factor.
Step 4: Bubble-net Hunting Behavior 1.Another portion of the whales (e.g., middle 40%) performs a bubble-net hunting behavior to explore the solution space.Move these whales randomly while considering a bubble-net factor.
Step 5: Search for Lost Whales 1.The remaining whales (e.g., bottom 30%) search for lost whales that have strayed far from the optimal solutions.Adjust the positions of these whales based on a defined search factor.
Step 6: Termination 1. Check if the maximum number of iterations or a specific stopping criterion is met.

If not, return to
Step 2 and repeat the process.
Step 7: Output 1.The transformation parameters of the whale with the highest fitness are the output of the algorithm.These parameters can be used to register the medical images.
Assume we have two medical photos that must be aligned for appropriate comparison.The WOA method begins by creating virtual whales in the solution space, with each whale representing a potential transformation parameter.
As the algorithm iterates, whales use movement rules inspired by whale hunting behavior to advance towards better alignment solutions.Whales with high fitness may use the surrounding prey behavior to converge on promising solutions, whereas others use the bubble-net hunting behavior to experiment with different transformation parameters.
The WOA algorithm modifies whale positions depending on predetermined criteria that balance exploitation and exploration.Whales that have wandered too far away from ideal solutions are led back by a search behavior [46].
Finally, the WOA algorithm returns the whale's transformation parameters with the highest fitness.These metrics can be used to precisely register medical images, assisting medical personnel in making exact diagnoses and treatment decisions.

SI-BASED SEGMENTATION
Because of developments in computer technology, machine learning (ML) has found widespread use.In healthcare, computer vision methods are used to reduce human biases in diagnosis, hence lowering possible mistakes caused by human judgment.This is especially important in medical picture analysis, where precise interpretation is critical.Magnetic Resonance Imaging (MRI) has developed as a critical tool for diagnosis and therapy evaluation.
MRI has important properties that help doctors avoid mistakes caused by human interpretation.It can identify the smallest irregularities inside the human body, making it a vital diagnostic tool.MRI gives detailed contrast information on brain tissues, allowing for the distinction of normal and pathological brain conditions.Given the high stakes involved in brain-related diagnosis, accuracy is critical, and even little judgment errors may have serious implications.As a result, medical imaging, especially MRI, is very important [47].
While other imaging technologies, such as CT scans and X-rays, are available, MRI is the most dependable and safe alternative.The segmentation of medical data is a difficult and time-consuming process in the field of medical image analysis.This work entails removing cancers and other organisms from medical photographs.Brain tumor segmentation using MRI images, for example, is crucial in early tumor diagnosis and radiation treatment planning.
The potential of the PSO method in medical image segmentation is evaluated.PSO is being used to improve the accuracy of segmenting brain tumor locations in MRI imaging.The research uses PSO to increase the accuracy and efficacy of the segmentation process, resulting in earlier diagnosis and improved treatment planning for brain-related disorders.
A tumor is an abnormal tissue development characterized by uncontrolled cell multiplication.Primary, diffuse, malignant, and benign brain tumors are all possible.PSO has historically been used in a variety of real-time applications, including medical image processing, satellite image processing, industrial operations, and others.PSO is inspired by the notion of intelligent swarming, in which individual entities communicate and work to accomplish common goals.
The process of splitting an image into discrete parts based on common properties such as grayscale, color, brightness, and contrast is known as image segmentation.There are several segmentation methods available, with continual attempts to improve their efficacy.Simulation-based algorithms, genetic algorithms, ant colony optimization methods, and particle optimization algorithms are among the advancements.SI, a subfield of AI, investigates the collective behaviours of simple agents.These agents interact with one another and with their surroundings, resulting in global behavioral patterns.Nature has analogous systems, such as honey bees, bacterial colonies, and animal herding.
Two SI models, ACO and PSO, have been shown to be effective in tackling optimization difficulties in pattern classification and image analysis.Kennedy and Eberhart developed the PSO approach to mimic the social behavior of insects.Particles, which resemble swarm beings, adjust their placements depending on personal experience and information collected from surrounding particles.This flexibility allows them to gradually shift into more favorable portions of the problem space.
Particles in a PSO system move across a multidimensional search space.Throughout their voyage, each particle constantly adjusts its location based on its own experiences as well as the experiences of adjacent particles.Par-ticles cooperatively converge towards optimum solutions by exploiting the best locations found by themselves and their neighbors.This process is similar to the cooperative behavior seen in nature, in which people learn from one other's experiences in order to navigate and flourish in their environment.
Bond Marzena and Khalid Saeed [48] share their work on an automated method developed for the identification and exact location of brain tumors using MRI images.The method includes two key algorithms: image processing and picture segmentation.The image processing method was especially successful among them.There are many stages to the procedure, including contrast augmentation, Wiener filtering, and skull stripping.The main goal is to use labeled boxes to precisely designate diverse tissue types, such as white matter, gray matter, and brain tumors.This approach performs well over a wide range of brain pictures, adding to its dependability.
Varuna Shree and N. Kumar [49] discuss the difficulties connected with medical image analysis, highlighting how difficult it might be to discover aberrant structures inside the human brain using traditional imaging methods.The emphasis now shifts to noise reduction solutions for medical pictures.Their method trains and evaluates the accuracy of tumor location recognition in brain MRI images using a neural network matrix.The results of the experiments show an amazing almost 100% accuracy rate in discriminating between normal and diseased brain tissues in MR images.This accomplishment demonstrates the effectiveness of the recommended approach.
In conclusion, this research emphasizes the application of modern image processing and machine learning approaches to improve the detection of brain tumors and anomalies in MRI images.These techniques reveal substantial gains in accuracy and efficiency by utilizing segmentation and neural network-based methodologies, adding to the area of medical image analysis.
Brain tumor segmentation using MRI images is critical for early tumor identification and radiation planning.The complexity of MRI brain imaging, on the other hand, offers issues owing to various tumor appearances and ambiguous borders, even in multi-sequence MRI scans [50].
M. S. Atkins and B. T. Mackiewich [51] created a reliable completely automated brain segmentation approach for MRI images.This method successfully manages radio frequency (RF) inhomogeneities, allowing it to segment brain areas across a variety of picture sources, resolutions, and sequences.The approach uses anisotropic filters, "snakes" contouring methods, and previous information to create a multistage process that accurately separates the brain area from background noise and other structures.
N. Abdullah et al. [52] investigate the use of Support Vector Machines (SVM) to automatically classify brain MRI scans as normal or pathological based on axial and coronal picture symmetry.SVM classifiers are trained and validated using feature vectors extracted from MRI images, resulting in accurate classifications.Training and testing phases are used in the process, with SVM parameter accuracy percentages directing further refining and interpretation of brain pictures.
An enhanced Particle Swarm Optimization (PSO)-based approach for picture segmentation is presented [53].This technique integrates geographical information, making it less susceptible to noise and homogeneity than the classic fuzzy c-means algorithm (FCM).The PSO method refines the FCM extension by optimizing initial mass center selection.The efficiency of the method is proved by its application to MRI picture segmentation.
Image splitting, or partitioning, is necessary for extracting specified sections from pictures.Partitioning is used in medical image processing for recognizing damaged regions such as brain tumors.Particle Swarm Optimization (PSO) is used to segment brain tumors [54].PSO uses an objective function to optimize parameters such as location and speed.To remove unnecessary information from MRI scans, pre-treatment is used.
Image splitting is a basic image processing method with several medical applications.The emphasis is on effective illness identification and separation in medical pictures, particularly MRI scans [55].For brain tumor identification and segmentation, the suggested method employs Particle Swarm Optimization (PSO).Conversion, algorithm implementation, time-based result selection, and extraction of tumor-affected areas are all part of the process.The approach is shown to be effective when applied to axial and coronal plane MRI scans, resulting in efficient picture extraction and accurate tumor detection.
In conclusion, these results highlight the need of strong segmentation approaches in medical image processing, notably for detecting brain tumors utilizing MRI data.The combination of machine learning, optimization techniques such as PSO, and modern image processing technologies improves the accuracy and efficiency of finding aberrant structures in medical pictures.
Therefore, in this chapter, we present a medical image segmentation framework using SI with Fuzzy C-means (FCM) and K-means).In this instance, we employ PSO as a SI strategy technique for optimizing the FCM's pixel-mixing issue.For medical picture segmentation, we describe two alternative hybrid techniques called FCM and K-means with PSO.

FCM with PSO Segmentation
In this case, we employ the PSO concept in combination with the FCM to construct a hybrid segmentation of a medical picture.PSO is a powerful meta-heuristic approach adopted by swarming birds, mammals, and other species.A flock of birds or a school of little fish is an excellent example of PSO inspiration since their substantially comparable neighborhood pixel values help to reduce the pixel-mixing problem encountered by the FCM during medical image segmentation.This hybrid segmentation strategy relies on the participation of experts from diverse domains in the search for a threshold value to decrease the mixed pixels.To address a medical image segmentation issue, each par-ticle modifies its threshold value based on its own and its neighbors' experiences.At time t occurrences, each PSO particle PI has a position PI (t) in the search space, which changes by a velocity at time t + 1.The PSO algorithm influences velocity by the best location visited by itself, whereas PALL (t) influences velocity by the best position visited by all particles (we call it the "global best").Each particle's placement is determined by a unique fitness function (Fit (Fun)), which is influenced by the segmentation issue and space dimension.D. Kennedy and EberhaVrt developed the PSO algorithm as an evolutionary image segmentation strategy, and Algorithm 1 shows the FCM with PSO segmentation algorithm.

Algorithm 1
Segmentation Using FCM with PSO Optimization

K-means with PSO Segmentation for Medical Images
The notion of PSO in conjunction with the K-means clustering method is utilized as a medical picture hybrid segmentation, and the algorithm of K-means with PSO segmentation is given in algorithm 2 below.2. Computational Complexity: Because certain SI methods require a large number of agents or iterations, they can be computationally demanding.Medical imaging activities sometimes necessitate the processing of enormous amounts of data, and applying SI algorithms may aggravate the computing complexity, resulting in longer processing times.

3.
Local Optima: SI techniques, such as PSO and ant colony optimization, can become caught in local optima at times, particularly in complex optimization landscapes.This constraint may hinder the algorithms from obtaining the global optimum solution, lowering the quality of the findings.
4. constrained Scalability: When working with high-dimensional data or difficult optimization issues, the scalability of SI techniques can be constrained.Scaling up SI techniques may be difficult in medical imaging, since the data can be complex and multidimensional.
5. Problem-Specific Adaptation: In order to be useful for medical imaging tasks, SI algorithms may require extensive customization and problem-specific adaptation.What works well for one medical imaging task may not work well for another, requiring significant skill to adjust the algorithms.
6. Lack of Domain Knowledge: Because some SI algorithms rely largely on local interactions and information sharing, their performance can suffer in instances where domain-specific knowledge is critical.Medical imaging activities frequently necessitate a thorough understanding of anatomical structures and imaging modalities.
7. Interpretability: Some SI algorithms generate outcomes that are difficult to interpret or explain.Lack of interpretability can be a severe disadvantage in medical imaging, as practitioners must comprehend and trust the results.
8. Medical Data Complexity: Medical images can be noisy, ambiguous, and complicated, posing issues for SI algorithms that presume specific behaviors or interactions.It can be challenging to adapt SI to such complex facts.9. Ethical and safety concerns: The repercussions of inaccurate or biased results in medical imaging can be serious.While SI algorithms are strong, their black-box nature raises questions about reliability, accountability, and potential decision biases.
10. Benchmarking and Validation: Due to the lack of established benchmarks and datasets, comparing the performance of SI algorithms to other state-of-the-art approaches in medical imaging can be difficult.To establish their usefulness, rigorous validation is required.

CONCLUSION
SI has evolved as a dynamic and promising strategy in medical imaging, with the ability to address difficult challenges and improve different elements of image processing, registration, segmentation, and feature extraction.While its adaptability, parallelism, and ability to navigate complex solution spaces are notable strengths, SI algorithms require careful parameter tuning, validation against existing methods, and interpretability consideration to ensure their effective integration into medical imaging workflows.Collaborations that bring together the skills of researchers, doctors, and technologists hold the key to fully realizing SI's transformative impact on medical image analysis and diagnostic accuracy.The increasing integration of AI, machine learning, and computational approaches is driving substantial breakthroughs in the future scope of SI in medical imaging.As researchers continue to enhance and tune algorithms to specific medical imaging difficulties, the discipline has the promise for improved real-time image processing, automated diagnosis, individualized therapy planning, and disease monitoring.Combining SI with future technologies like deep learning and big data analytics has the potential to revolutionize medical imaging by providing more accurate, efficient, and clinically relevant solutions, thereby improving patient care and outcomes.

CONFLICTS OF INTEREST
The author declares no conflict of interest.

FIGURE 1 .
FIGURE 1. Conceptual framework of the SI optimization algorithm

FIGURE 2 .
FIGURE 2. Basic flowchart of SI method

Limitations 1 .
Parameter Sensitivity: Many SI algorithms contain parameters that must be tweaked suitably for different problems.Finding the correct parameter values in medical imaging can be difficult and time-consuming.Poor parameter selection can result in inferior outcomes or a sluggish convergence.
b) Weight Initialization: Weight initialization is critical in deep learning since it determines how soon the model converges during training.SI techniques can be used to initialize the weights of the model, hence boosting convergence and avoiding the problem of becoming stuck in local optima.c) Feature Selection: Deep learning models may have to deal with high-dimensional data with many irrelevant features in some circumstances.SI approaches can be used to find and choose the most informative features, lowering the model's dimensionality and enhancing its performance.d) Deep Learning Model Training Optimization: Deep learning model training can be computationally intensive, especially for large datasets and sophisticated structures.To achieve faster and more stable convergence, SI methods can be used to improve the training process, such as regulating the learning rate, momentum, or batch size.e) Ensemble Learning: SI has been used to create deep learning model ensembles.Ensemble approaches can increase generalization and overall model performance by combining the predictions of numerous models trained with various initializations or hyperparameters.f) Regularization: SI algorithms can be implemented into deep learning regularization approaches such as dropout or L1/L2 regularization to reduce overfitting and improve model generalization.g) Adaptive Learning: SI can be used to develop adaptive learning methods in which the learning rate or other parameters are dynamically modified during training based on the performance of the model.h) Neural Architecture Search: SI was used to execute neural architecture search (NAS), which is a procedure that automatically discovers ideal architectures for deep learning models.NAS may rapidly examine the enormous search space of alternative designs by utilizing SI.