## 6 Discussion  
Microwave imaging for biomedical imaging applications has gained much attention over the past few decades. It has many advantages such as fast diagnosis and non-ionizing radiation and is emerging as a potential imaging modality compared to the existing imaging modalities such as magnetic resonance imaging (MRI), computed tomography (CT) and ultrasound. The reliability of microwave medical imaging system is largely dependent on the efficiency and accuracy of preprocessing and imaging algorithms. The imaging algorithm can be divided into two types: tomography-based algorithm and radar-based imaging algorithm. The tomography-based methods reconstruct the electrical properties  
Figure 5: Experimental results of DMAS and its parallel versions using Pyspark and Python multiprocessing on a standalone PC and on Eddie. The results shows that both Spark and Python multiprocessing reduces processing time significantly; however, Spark outperforms Python.  
Figure 6: Comparison of the DMAS and MIR algorithms based on DAS proposed in our previous work [34]. The Pyspark improves the performance for both algorithms; however, DMAS takes slightly longer due to multiplication of signal in pairs.  
of the imaging area by solving an ill-posed inverse problem and is therefore complex and time-consuming. Conversely, radar-based methods use the reflected or transmitted signals to find the position/size of the targeted object, such as breast tumour, brain stroke or brain atrophy. Among the two types of radar-based beamformers, data-independent beamformers are faster at image restoration than data-adaptive beamformers; however, the latter yields better results.  
Several data-independent and data adaptive algorithms are utilised for image reconstruction. However, DAS and its variations are mostly used due to their robust performance and simplicity. The most commonly used extension of DAS beamformer is DMAS, which provides improved contrast and resolution in the reconstructed images by trading the complexity of computation [45]. The computation is further increased for the multistatic approach; however, it improves the accuracy. This work uses Spark as an accelerator to improve the efficiency of the DMAS algorithm. The most computationally intensive part of the algorithm is first identified. The algorithm is implemented using a MapReduce operation, where subsets of pixel values are calculated on different worker nodes in parallel and retrieved to a master node. The Spark-based parallel implementation is compared with a sequential and Python built-in multiprocessing library implementation. The comparison are performed on a standalone PC and in cluster mode.  
The experimental results shows that the Spark-based parallel algorithm performs an average of 34 and 43.2 times faster than the sequential one on a standalone PC and on HPC, respectively. Similarly, it outperforms Python multiprocessing due to in-memory processing. The comparison in terms of processing speed for all three versions of DMAS can be found in Figure 7. The comparison indicates that the Pyspark version improves the speed significantly compared to both sequential and multiprocessing version of DMAS.  
The downside of the proposed Spark-based algorithm is its retrieval of data to a memory disk on every cycle for image reconstruction, resulting in substantial disk input/output. The results revealed that the PDMAS achieves significant speed improvements on image reconstruction in parallel. The Spark-based results and comparison indicated that big data frameworks have the potential to improve the efficiency of microwave imaging algorithms. The master-slave architecture along with the Spark framework is generalisable and can be used for tomography-based algorithms as well as data-adaptive algorithms.  
Figure 7: Processing speed (1/second) for sequential DMAS and its parallel versions using Pyspark and Python multiprocessing on a standalone PC and on Eddie. The results show that the Pyspark-based algorithm performs faster.