A Hybrid Particle Swarm Optimization-Tuning Algorithm for the Prediction of Nanoparticle Morphology from Microscopic Images

Aggregated nanoparticle structures are quite ubiquitous in aerosol and colloidal science, specifically in nanoparticle synthesis systems such as combustion processes where coagulation results in the formation of fractal-like structures. In addition to their size, morphology of the particles also plays a key role in defining various physicochemical properties. Electron microscopy based images are the most commonly used tools in visualizing these aggregates, and prediction of the 3-dimensional structures from the microscopic images is quite complex. Typically, 2-dimensional features from the images are compared to available structures in a database or regression equations are used to predict 3-dimensional morphological parameters including fractal dimension and pre-exponential factor. In this study, we propose a combination of evolutionary algorithm and forward tuning model to predict the best fit 3-dimensional structures of aggregates from their projection images. 2-dimensional features from a projection image are compared to the candidate projections generated using FracVAL code and optimized using Particle Swarm Optimization to obtain the 3-dimensional structure of the aggregate. Various 3-dimensional properties including hydrodynamic diameter and mobility diameter of the retrieved structures are then compared with the properties of the aggregate used to form the candidate projection image, to test the suitability of the algorithm. Results show that the hybrid algorithm can closely predict the 3-dimensional structures from the projection images with less than 10% difference in the predicted 3-dimensional properties including mobility diameter and radius of gyration.


INTRODUCTION
Deteriorating air quality levels are a great concern in several places across the world. Air pollution adversely affects human health, including respiratory illness, pulmonary and cardiovascular diseases, and premature mortality (Shiraiwa et al., 2017;West et al., 2016;O'Dell et al., 2019;David et al., 2019). Of great concern is the particulate matter (PM), especially those generated through anthropogenic sources, including various combustion processes and burning of fossil fuels (Wang et al., 2013;Bell et al., 2007;Dang et al., 2022;Martin et al., 2010;Mayer et al., 2020). The fine and ultrafine particles remain dispersed in the air for significantly long durations and the physicochemical properties of these suspended particles are defined by their size and morphological features. Nanoparticles formed from several engineering and combustion processes are often found in clusters or aggregations of individual spherical particles rather than as isolated spheres due to constant collisions and subsequent coagulation. These aggregates are usually ensembles of point-contacting or overlapping near-spherical particles and are referred to as fractal aggregates. Despite a complex shape, the morphology of these aggregated particles is commonly represented as mass fractals (Forrest and Witten, 1979;Jullien, 1987;Filippov et al., 2000;Cai et al., 1995) with the following relationship between the number of primary particles (also referred to as monomers) and the radius of gyration of aggregate: where N is the number of monomers in the aggregate, Rg is the radius of gyration, a is the primary particle radius, kf is the fractal prefactor/pre-exponential factor, and Df is the fractal dimension (Meakin, 1999;Jullien, 1987;Brasil et al., 2001). Df and kf are referred to as the morphological parameters, and the values typically are found to range between 1 to 3 and 0.6 to 4, respectively.
Multiple studies have been done on understanding the physicochemical behaviour of quasifractal aggregates due to the inherent properties of fractal structures, such as large available surface area per unit volume, porous geometry, and ability to form extended networks (Altenhoff et al., 2020a;Filippov et al., 2000;Köylü et al., 1995). It has been well documented that the morphological features affect the formation and growth of aggregates and play a significant role in altering various physicochemical and transport properties Morán et al., 2018;Oh and Sorensen, 1997). Experimental determination of the morphology of the particles is quite complicated, and Transmission Electron Microscopy (TEM) is considered the gold standard to visualize the submicron sized aggregated particles (Manuputty et al., 2019;Palotás et al., 1996;Tian et al., 2006;Wang et al., 2016). Advancements in image analysis and computational tools have led to more significant improvements in predicting the morphological descriptors of the aggregates from their microscopic images (Brasil et al., 2001;Cabarcos et al., 2022;Wang et al., 2016). Most studies have attempted the identification of relevant 2-dimensional parameters in order to predict the 3-dimensional structures, most often the Fractal dimensions (Einar Kruis et al., 1994;Heinson et al., 2012;Verma et al., 2019). Einar Kruis et al. (1994) used automated particle recognition techniques with the TEM images for particle size distribution analysis, and Fractal dimensions of the aggregates were calculated. Pair correlation functions were derived from the microscopic images to describe the structure of the fractal aggregates using packing fraction density and fractal dimension (Heinson et al., 2012). Monte-Carlo methods and Langevin equations were combined to understand the aggregation processes in different flow regimes with computationally simulated aggregates (Morán et al., 2020). Thajudeen et al. (2015) developed a technique to predict the 3-dimensional structures of the aggregates from TEM images, by comparing them with test images in a database. Using a forward model, they created a large database of candidate 3-dimensional structures across a range of morphological descriptors and the number of primary particles. A few identified 2-dimensional features of the microscopic images were compared with the features of the candidate aggregates from the database to identify the best-fitting 3-dimensional structure. Comparison of the mobility diameters of the aggregate collected for the image analysis and the aggregate identified from the database proved this to be a promising method and was later extended for multiple applications (Jeon et al., 2016;Qiao et al., 2020). The efficacy of this method depends on the database, and covering the entire spectrum of the morphological properties and monomer number makes it cumbersome. Characterization of images and conversion into 3-dimensional structures were also used in growth and absorption rate measurements of iron oxide nanoparticles, and in understanding the effects of aggregate generation due to electrosurgical pencils in operation conditions (Jeon et al., 2016;Qiao et al., 2020). That Df, kf and N do not completely fix the morphology of an aggregate further complicates this problem. Regression equations to relate 2-dimensional and 3-dimensional features also depend on the candidate aggregates used for the study. In comparison, an optimization algorithm can focus on a narrower range of the fractal parameters providing better chances of replicating the 3-dimensional structure of an aggregate from a microscopic image. In this study, we propose a hybrid Particle Swarm Optimization-Forward Tuning algorithm combination that can predict the 3-dimensional structure of aggregates from their microscopic images.
Relevant 2-dimensional parameters are identified from the microscopic image, and these are compared with the parameters calculated for synthetic projections of aggregates generated with tuning algorithms. FracVAL and FracMAP are two open-source codes for generating tailor-made aggregates for specific input of fractal parameters (Morán et al., 2019;Chakrabarty et al., 2009). Due to better features, including the option to generate aggregates with polydisperse monomers, FracVAL was used extensively in this study. The details of the algorithms and the relevant 2-dimensional and 3-dimensional features used in the study are explained in the next section. The proposed algorithm was tested with synthetic images created using FracVAL. The results obtained for various test cases are explained in Section 3, followed by a brief conclusion and the future possibilities of the proposed algorithm.

FracVAL -A Tunable Algorithm for Cluster-cluster Aggregation
Tuning algorithms are significant as they provide ways of systematically studying the effect of different morphological parameters on various physicochemical properties. Several tuning algorithms have been developed in the past that provide structures of fractal aggregates for pre-defined morphological parameters (Chakrabarty et al., 2009;Morán et al., 2019). These algorithms also allow the possibility of numerically generating a large number of fractal aggregates with low computational time. In this study, we use the capability of FracVAL as a tuning algorithm. In addition to the capability of generating large aggregates with thousands of monomers, it can also be used to generate aggregates consisting of polydisperse primary particles. The source code is also freely available, providing the opportunity to incorporate any modifications, including the effect of overlap between the primary particles. This algorithm generates aggregates with predefined fractal dimension Df and the fractal prefactor kf and preserves them during the generation process of fractal aggregate.
In the first step, a particle-cluster aggregation algorithm is used to obtain a limited number of sub-clusters containing approximately equal number of monomers (Nsub). The sub-clusters generated are prepared into pairs that can aggregate to form larger clusters subsequently. The process is performed until there is a single large cluster. This method ensures the preservation of both Df and kf by ensuring that Eq. (1) is valid at all times. For the input of Df, kf, N and primary particle size, the algorithm provides the coordinates of the primary particles forming the aggregate. There is a degree of randomness associated with the process, due to which the likelihood of obtaining the exact same aggregate for the same input parameters is quite low.

Analysis of the Aggregate Images
Typical prediction of 3-dimensional aggregate structure from the microscopic image of aerosol aggregate starts with the extraction of relevant 2-dimensional geometrical properties. Projected area, perimeter, average primary particle radius, longest length across the aggregate, number of primary particles, 2-dimensional fractal dimension etc., are the more commonly used image features (Brasil et al., 1998;Köylü et al., 1995;Chakrabarty et al., 2009;Thajudeen et al., 2015). The morphological depiction of fractal aggregates is usually reduced to only two primary parameters, the mass fractal dimension, Df and the exponential prefactor kf. Contrary to what has been prevalently used, recent studies have reported that fractal dimension and prefactor value alone is insufficient to fix the shape and structure of aggregates (Heinson et al., 2012;Rottereau et al., 2004;Yon et al., 2021). Six 2-dimensional morphological properties are used in this study to describe the morphology of the projection, which are then be used to compare the input image to the projection of simulated aggregate, assisting in the retrieval of the best 3-dimensional aggregate candidate. All the properties are calculated with the box-counting method, where the number of squares required to cover the entire aggregate image is used for determining the relevant 2-dimensional parameters (Forrest and Witten, 1979;Mc Donald and Biswas, 2004;Altenhoff et al., 2020b). As the size of the boxes decreases, the number of boxes required to cover the image increases and thereby the accuracy of the method. Different versions of the box-counting method are extensively used in measuring relevant 2-dimensional properties of the aggregates from their microscopic images as represented in Fig. 1.

Projected Area (Aproj)
The projected areas of the aggregates were calculated using the number of boxes (Nin) and the area of each box, given by:

Perimeter (P)
Perimeter was calculated by using Eq. (3) after identifying the number of boxes on the edges of the image or projection (Nedge),

Maximum Length (Lmax)
The longest length across the aggregate (Lmax) was determined by selecting the pair of boxes with the farthest location out of all the box locations on the image or projection.

Maximum Width (Wmax)
It is the maximum width perpendicular to the estimated maximum length and is calculated by examining the orthogonality between the locations of any selected pair of boxes with that of the boxes forming the maximum length. The distance between the selected pair of boxes is calculated using Eq. (4).

2-dimensional Radius of Gyration (Rg,2D)
The 2-dimensional radius of gyration for the image is calculated from the area of a unit square box (Asq) and the coordinates of each of the squares (xi, yi), given as ( ) where Ri is the distance of the i th box from the origin of the system and Rcom is the center of mass or center of area for the particular case, with n = 2 for the 2-dimensional image.

2-dimensional Fractal dimension (Df,2D)
Df,2D is another important 2-dimensional property to compare the similarity between the input image and the computationally generated fractal aggregate image. Df,2D is calculated using the box-counting method as where the number of boxes increases as length (scaling) of the box decreases and the 2-dimensional Fractal dimension is determined by calculating the slope as depicted in Fig. 1.

Particle Swarm Optimization (PSO)
PSO is one of the most commonly used bio-inspired optimization algorithms. First introduced by Kennedy and Eberhart in 1995 (Kennedy and Eberhart, 1995), it mimics the collective motion of flock of birds where each bird gains from the collective experience of the group. PSO has been widely used in several applications across various engineering disciplines (Mangat and Vig, 2014;Yuan et al., 2010). In the constant search for the best solution, the method moves the particles with a certain velocity calculated in every iteration. The motion of each particle is influenced by its own best-known position (local best) and the best-known position in the space search (global best). The final result expected is that the particle swarm converges to the best solution, which is problem-dependent. The updated positions of each of the particles in the swarm are given by: where 'FP' is replaced by all three fractal parameters kf, Df, and N, resulting in three equations of velocity and three equations of location. These six equations are used to update swarm locations in terms of kf, Df, and N. Swarm particles move based on 1 , t i FP P + , the position vector that updates particle location, and 1 , t i FP V + , the velocity vector that updates particle direction where 'i' corresponds to the swarm particle number and 't' corresponds to the iteration, V is the velocity, P represents the position of the swarm particle. The control parameters c1, c2 are the local and global acceleration coefficient, w is the inertia coefficient, and r1, r2 are uniformly distributed random numbers between 0 to 1. PSO uses control parameters to update the population and choose the direction of the flock. The inertial coefficient was varied between 0.2 to 0.9, while the local and global acceleration coefficient were varied between 1.5 to 2.0. The velocity vector 1 , t i FP V + is determined by the Pbest (local best) and Gbest (global best). Pbest is the best location of a particular swarm particle, in this case, the personal best parameters kf, Df, and N as coordinates of the specific particle. This best location is verified with the computation of fitness function 'f' value after comparing the input image to the generated aggregate projection. This aggregate is created using the FracVAL with the location of swarm particles (fractal parameters kf, Df, and N). Gbest is the best location discovered among all swarm particles, and it aids in changing the direction of the entire swarm. Gbest represents the best fitness function value corresponding to a particular morphological set of kf, Df, and N. Both of these Pbest and Gbest values could change after an iteration or time step 't' if the current iteration yields better results than the previous iteration. Because it is desirable to search both local and global space without bias, the values of c1 and c2 are kept same in all the simulations. If c1 is greater than c2, particles will be drawn to their own best, resulting in prolonged wandering in search space; while, if c2 is greater than c1, global best will dominate the search, causing particles to move early to optima (Liu et al., 2012;Sun et al., 2010).

Hybrid PSO-FracVAL algorithm
The details of the combined algorithm/code are provided in Fig. 2, with the specifics of the information flow. The 2-dimensional features of the input image are calculated using the box-counting method explained before. Although microscopic images are the intended input images, to test the efficacy of the proposed method, "synthetic" images are generated using the test aggregates created using FracVAL. The initial population in the PSO algorithm is created using random values of Df, kf, and N, within the set limits. In this study, P corresponds to the coordinate positions of Df, kf, and N, with With each iteration, the corresponding Df, kf, and N values of the swarm particles were updated using Eq. (8) and Eq. (9). For each swarm particle, the corresponding morphological parameters are passed on to FracVAL code to generate candidate aggregate structures. The process is repeated until the FracVAL is able to generate fractal structures. For each of the structures, multiple projections are made on random planes and the relevant 2-dimensional properties are calculated. The objective of the algorithm is to minimize the fitness function given by: where all the properties with subscript 'T' are the true/input values and the ones without 'T' are the 2-dimensional parameters calculated from the projections of the aggregates generated through FracVAL. The fitness function value 'f' is the difference in the 2-dimensional features of the input image and the best-fit projection. The best fit structure corresponds to the case with the least fitness function value. In most of the simulations, the fitness function values attained values less than 10 -4 after 200 iterations, and 200 iterations were used as the stopping criteria for all the simulations. These final fitness function values in all the simulations are shown in Tables S3 and S6 in the supplementary information. Appropriate limits for kf, Df, and N were provided as constraints in the simulations. kf values were constrained between 0.6 and 2.6, while Df values were between 1.1 and 2.6. The range of the number of monomers was modified depending on the number of primary particles visible in the image. The lower limit was kept closer to this, while the upper limit was set with a sufficient factor of safety. The fitness function is calculated for each of the swarm particles, and the velocity and positions are updated based on the local best and global best solutions. At each iteration, the updated set of swarm positions (Df, kf, and N) are communicated to FracVAL code for the generation of candidate fractal structures. The aggregate details corresponding to the best solution for the fitness function are stored separately since the same set of input morphological parameters does not completely fix the aggregate structure in the case of fractal aggregates. All simulations were run for a sufficient time until the number of iterations reached a specific number or the value of the fitness function was reduced below a specified limit. 20 swarm particles were used in all the test cases in this study.

Fig. 2.
Flow chart of the proposed PSO-FracVAL algorithm for the prediction of 3-dimensional aggregate structure from their microscopic images.

Comparison of the 3-dimensional Properties of the Predicted Aggregate Structures
The suitability of the method as a retrieval algorithm was evaluated, corresponding to various features of the predicted structure. For each of the retrieved structures, 3-dimensional properties including 3-dimensional radius of gyration (Rg), anisotropy factor (Aij), hydrodynamic radius (Rh), orientationally averaged projected area (PA), and mobility diameter (dm) were compared against the corresponding values for the test aggregates. The details of the 3-dimensional parameters used are provided in this section. The 3-dimensional radius of gyration was calculated using Eq. (5) and Eq. (6) with N = 3 (for 3-dimensional structure). Heinson et al. (2010) showed that for Diffusion Limited Cluster Aggregates (DLCA), even with increased anisotropy, the fractal dimension remained more or less the same. They also discussed the relevance of anisotropy factor in defining the anisotropy of fractal structures. The anisotropy index can be calculated from the Inertia tensor and is defined by the ratio of squares of the principal radii of Gyration. The Inertia tensor (T) was calculated from the coordinates of the monomers for each aggregate as:

Anisotropy factor
The radius of gyration and cluster anisotropy was calculated by diagonalization of the abovecalculated T as: where Aij is the anisotropic factor, and Ri and Rj are the principal radii of gyration, respectively in the i th and j th direction.

Mobility diameter
Mobility diameter is one of the most commonly used equivalent diameters for the characterization of aerosol nanoparticles. Mechanical mobility is a proportionality constant between the velocity of the particle (v) and the resistance force (F) acting on it (Thajudeen et al., 2015). Mobility (B) can be defined as: Since typical combustion generated nanoparticles have sizes in the range of the background mean free path (λ), the effects of the slip correction factor should also be considered. The calculation of mobility for non-spherical particles has been fairly well established (Thajudeen et al., 2015), and the expression for the mobility is given by: ( ) where, µ is the dynamic viscosity, Rh is the hydrodynamic radius, and PA is the orientationally averaged projected area. The value of mobility requires knowledge of the hydrodynamic radii and projected areas of measured aggregates, which are difficult to determine by direct means. Mobility of a non-spherical particle can also be given in terms of the mobility diameter (dm) as: The details of calculation of Rh and PA are reported in prior studies (Thajudeen et al., 2015;Zhang et al., 2012). With the calculation of Rh and PA, Eq. (16) and Eq. (17) were combined to obtain the mobility diameter of the aggregate structure.

RESULTS AND DISCUSSION
Throughout this study, computational projection images made from 3-dimensional structures were used as the test cases, thereby enabling direct comparisons with the predicted structure and the structure used for making the projections. Aggregate structures were generated using FracVAL based on the input morphological parameter set, and projections on random planes were taken as the cases for testing the algorithm. The proposed method was tested on multiple datasets with {N, Df, kf} ranging between N = 25-500, Df = 1.3-2.4, and kf = 0.9-1.6. All the test aggregates used in the study are composed of monodisperse monomers with radius of 15 nm, with only point contact between the monomers. The size of the monomer has no direct bearing on the results. A simple visualization of the input aggregate structure, test projection case, output projection and the best fit aggregate is provided in Fig. S1. The retrieval of the morphological parameters and the 3-dimensional structure is expected to be more accurate for aggregates with low Df, and for Df > 2, the overlap between particles is more pronounced in the projections. The convergence of the coordinates for the swarm particles for one of the simulations is shown in Fig. 3. At the start of the simulations, the swarm coordinates {N, Df, kf} span across the possible range and as the simulation proceeds, they converge to a narrower range. Since the same coordinates {N, Df, kf} do not necessarily mean that the same aggregate structure can be generated, it is difficult for the entire swarm population to converge to the same final result.

Retrieval Using Five 2-dimensional Parameters
The suitability of the proposed hybrid algorithm was first tested for aggregates, based on the comparison of five 2-dimensional parameters including area (Aproj), perimeter (P), maximum endto-end length of the projection (Lmax), maximum width (Wmax) and 2-dimensional radius of gyration (Rg,2D). These were initially used since they were the 2-dimensional features chosen in a prior study where the images were compared to synthetic images in a database (Thajudeen et al., 2015). For the initial test cases, the number of primary particles for the 3-dimensional structures was fixed as 25. The retrieved Df, kf, and N values are shown in Table 1 show that the predicted morphological parameters are quite similar to the actual values of the aggregates used to create the projections. As expected, the accuracy decreases for Df ≥ 2.0. Comparison of the 3-dimensional properties of the aggregate used for testing and the corresponding predicted values are shown in Fig. 4.   Fig. 3. Convergence of the initial population of birds to the best location or solution depicting the best fractal parameters.  . 4. Comparison of the 3-dimensional properties of the best fit structure predicted with the properties of the aggregates (Table 1) used to generate the computational aggregate image.
The 3-dimensional properties are modified for easier comparison, with the input values plotted on x-axis and the best fit values plotted on the y-axis, for easier comparison. 1:1 line and lines with 10% margins are provided for reference. The orientationally averaged projected areas are represented as equivalent radii values. The results clearly show that the best-fit aggregate image closely matches the 3-dimensional properties of the aggregate used to generate the test images. The results suggest that the algorithm is quite promising, especially for the cases with Df < 2. The error seems to be increasing in cases with higher Df, and most notably shown in the anisotropy values.

Retrieval Using Six 2-dimensional Parameters
An important aspect is the number of 2-dimensional parameters required to possibly uniquely represent a projection image. Increasing the number of independent 2-dimensional parameters for comparison is expected to improve the accuracy of the proposed method for the morphological parameters. In addition to the five 2-dimensional parameters used in the first simulations, Df,2D was used as the relevant 2-dimensional parameters to compare the project images. Df,2D was also expected to provide additional information on the range of Df of the 3-dimensional aggregate.
Multiple studies have looked at the relationship between 2-dimensional and 3-dimensional fractal dimensions of aggregate structures, and this is often used in the prediction of morphological structures. A recent study has explored this in detail, where a relationship was arrived at for multiple projections of the computationally generated aggregates (Wang et al., 2022). In our work, the relationship between Df,3D and Df,2D of computationally generated aggregate and their projections, respectively, was explored. The results for some sample test cases of various Df,3D are shown in Fig. 5, where Df,2D values are calculated for different projections of the same aggregate.
It is clear from the results that the Df,2D values of all projections of a fractal aggregate are in a narrow range, which can be used to narrow down the search space of Df, thereby improving the simulation time. The computational images used for simulations, summarized in Table 1, were also used as input cases to test the algorithm after considering Df,2D also as input and the results of the predicated morphological parameters are shown in Table 2, and the 3-dimensional properties are plotted in Fig. 6.
The codes were not parallelized in this study and the simulation time mainly depended on the morphological features communicated to FracVAL. For 200 iterations, and input image corresponding to an aggregate with Df, kf and N values of 1.8, 1.3 and 25, respectively, the simulation time was roughly 1 hour (serial code) in a workstation with Intel Xeon Gold processor 6240R.
After the successful test of the algorithm with the images of smaller aggregates with N of 25, simulations were carried out for various 3-dimensional aggregates with fractal parameters {N, Df, kf} ranging between, N = 25-500, Df = 1.3-2.4, and kf = 0.9-1.6. The details of the morphological parameters used are provided in Tables S1 and S4 in the Supplementary information. The constraints for the morphological parameters in the PSO code were modified based on the input 2-dimensional features. Each case is simulated with particular constraints considering the available information from the input image as the Df,2D to narrow down the range of Df,3D search space, and the number of monomers visible in the image to restrict the monomer numbers in the PSO  code. For each of the cases, simulations were run for 200 iterations and 20 swarm particles. The PSO control coefficients were tested with different values but mainly with the inertia coefficient varying between 0.2 to 0.9 and the acceleration coefficients were kept constant at 2.0. The coordinates of the aggregate with the least fitness function value are used to calculate various 3-dimensional properties of the aggregate, which were then compared with the 3-dimensional properties of the aggregate used to generate the sample image. The comparison of the 3-dimensional properties of the input and the best fit aggregate in all the cases are shown in Fig. 7. To represent the orientationally averaged projected area, its equivalent radii is calculated and shown in the plot. The comparison of the 2-dimensional properties corresponding to the input image and the predicted structure are shown in Fig. 8. For Figs. 7 and 8, 1:1 line and lines with 10% margin are shown for comparison.
Since the method is based on comparing 2-dimensional morphological properties, the algorithm compares these parameters to those of images generated by random orientation of the tailor-made 3-dimensional aggregates generated using FracVAL. For multiple combinations of morphological features, the 2-dimensional features are likely to be close to the features of the input images Fig. 7. Comparison of the 3-dimensional properties of the best fit structure predicted with the properties of the aggregate used to generate the computational aggregate image. Morphological parameters are varied in the ranges of N = 25-500, Df = 1.3-2.4, and kf = 0.9-1.6. Fig. 8. Comparison of the 2-dimensional features input to the simulations and the corresponding best-fit features as predicted by the hybrid algorithm. Morphological features for the test aggregates are varied in the ranges N = 25-500, Df = 1.3-2.4, and kf = 0.9-1.6 used for retrieval. More 2-dimensional features should be added to reduce the impact of this problem. Regardless of whether the majority of the 2-dimensional parameters are well recovered, dispersion might still exist. One way to improve this is to assign weights to different 2-dimensional parameters or to add more 2-dimensional parameters which would be explored in the future.
In all the simulations, the fitness value reached less than 0.001 and converged to 0.0001 in some cases.
The proposed method was also compared with a few prior publications on predicting the morphological features from microscopic images (Thajudeen et al., 2015;Lee and Kramer, 2004;Chakrabarty et al., 2011aChakrabarty et al., , 2011b. Most of the reported studies are focused on predicting Df,3D and/or the number of monomers in the aggregate structure and very few studies have proposed methods for predicting the best fit 3-dimensional aggregate structures. A detailed comparison with the database method proposed in Thajudeen et al. (2015) was carried out for a number of test cases and the results are summarized in Table S7 in the supplementary information. It is to be noted that the same databased as reported in the 2015 study was used for comparison and the performance of the database method could be improved with a more populated database. For example, the error from the database method is high when the number of monomers in the aggregate are over 100. This reinforces the main advantage of the hybrid algorithm where localized search is possible depending on the relevant morphological search space.
The proposed method was also compared with other reported techniques (Wang et al., 2022;Lee and Kramer, 2004), where Df,3D of the aggregate structures were predicted from the input images. The results are summarized in Fig. 9, and it shows that the optimization algorithm can predict the 3-dimensional morphological feature quite accurately for the test cases.
In Fig. 10, the number of monomers in the aggregate structure predicted from the input images are compared. The results are quite similar to the regression equations from Chakrabarty et al. (2011aChakrabarty et al. ( , 2011b, but the regression equations assume that Df,3D values are known apriori. This can however be used to accurately define the search space for the number of monomers. The comparison shows that the proposed method is able to predict the fractal parameters with an error margin of less than 10%.  It is quite clear from the results that the hybrid algorithm is a promising technique in predicting the 3-dimensional structures from microscopic images. Although the proposed method is able to closely reproduce relevant 3-dimensional properties of the aggregate, there is variation in the deduced anisotropy factor which is shown in the Table S2 and S5 in the Supplementary Information. This may be improved by using more swarm particles or by increasing the number of projections of each aggregate used for comparison. The impact of this property on various 3-dimensional properties of the retrieved aggregate structure needs to be investigated further. The algorithm should also be tested for aggregates with over 1000 monomers. This could be implemented after parallelizing the PSO code.

CONCLUSION
In this study, a hybrid retrieval algorithm is proposed to predict the 3-dimensional structures of aggregated nanoparticles from their microscopic images. Particle Swarm Optimization was combined with FracVAL, a tuning aggregate generation algorithm to predict the 3-dimensional structures based on six 2-dimensional projection features. 2-dimensional features from the test image are input to the PSO algorithm, from which the initial population of swarm is generated based on random sets of Df, kf, and N values. Corresponding fractal structures are generated using FracVAL, and 2-dimensional features for these aggregates are compared with the input values. The algorithm then proceeds to find the optimal set of Df, kf, and N values to obtain the best-fit projection image compared to the input image. The algorithm is validated by comparing various 3-dimensional properties of the aggregate used to create the input image and the best fit aggregate structure, including anisotropic factor, hydrodynamic radius, orientationally averaged projected area, mobility diameter, and the 3-dimensional radius of gyration. All 3-dimensional properties, with the exception of the anisotropy factor, are predicted within an error margin of 10% by the hybrid algorithm. In all the simulations, artificially generated images from computationally generated aggregates as used as the input.
A wide range of Df, kf, and N values were used to test the suitability of the proposed hybrid technique. The results clearly show that the proposed algorithm is a promising method for retrieving morphological features from the projection images of fractal structures. The method does not require any extensive database for comparing the projections, and a more detailed search can be done by narrowing the search space. As expected, the accuracy is lower for particles with Df > 2.0 and there is scope for improvement in this aspect. In the current study, only aggregates with point contact between the monodisperse monomers are considered. This could be extended to test aggregates with polydispersity in the monomer sizes as well as varying degrees of overlap between the monomers. The hybrid algorithm can further be parallelized for faster execution times, and other optimization techniques may be used to improve its efficiency.