Optimized FPGA-Based Implementation of Brain Tumor Detection by Combining K-Means and Grey Wolf Optimization Algorithms Amin Jarrah * , Sereen Amri Department of Computer Engineering, Hijjawi Faculty for Engineering Technology, Yarmouk University, Irbid 21163, Jordan Corresponding Author Email: amin.jarrah@yu.edu.jo https://doi.org/10.18280/ts.390601 ABSTRACT Received: 18 July 2022 Accepted: 12 December 2022 There is a need for fast, accurate, and real-time algorithms to detect brain tumors effectively to support the physician’s decision-making for treatment purposes. A brain tumor is a life- threatening uncontrolled growth of cells and tissues that may cause death due to inaccurate and late detection. K-means clustering is one of the clustering techniques that is widely used in brain tumor detection, but it has some drawbacks such as dependency on initial centroid values and a tendency to fall on local optima. This research proposes a new model that uses grey wolf optimization to find the optimal value of K (clusters number) of the k-means algorithm to avoid local optima. A parallel implementation of the K-means clustering algorithm on a field-programmable gate array (FPGA) is also proposed to enhance the performance by reducing the processing time and the power consumption. Moreover, the proposed algorithm is implemented using the Vivado HLS tool on Xilinx Kintex7 XC7K160t FPGA 484-1 where different optimization techniques are adopted and applied, such as loop unrolling, loop pipelining, dataflow, and loop merging. The achieved speed-up of the parallel implementation compared with sequential implementation was 88.17, where the obtained average clustering accuracy was 97.11%. Keywords: brain tumor detection, grey wolf optimization, k-means clustering algorithm, optimization techniques, parallel implementation 1. INTRODUCTION All human body activities are controlled by the brain, including intelligence, memory, speech, senses, etc. [1]. The brain consists of three types of tissues, including grey matter, white matter, and cerebrospinal fluid [1]. A brain tumor is an abnormal and uncontrolled growth of brain cells. It is a life- threatening disease that can be primary or secondary due to metastasis from other organs in the body. It’s classified into two types: malignant and benign [1]. The Magnetic Resonance Imaging technique MRI is the preferred imaging technique to detect brain tumors [2] since it’s widely used in hospitals for diagnosis, treatment, and follow-up disease [2]. It is used to create a picture of the anatomy and physiology of body organs. MRI has the advantage of being non invasive diagnostic tool as it does not use radiation. Thus, it’s commonly used to image soft tissues such as the brain, where it detects changes in the brain, including bleeding and tumors [2]. Early detection of brain tumors helps in accelerating the treatment and saving human lives [3]. There are many brain tumor detection algorithms that are proposed to help in the diagnosis and treatment processes [3]. K-means is one of these algorithms [3]. It is an unsupervised, simple, and practicable algorithm that classifies the observations into classes. It was chosen because it is efficient and does not necessitate significant effort in data preprocessing, training, and testing [3]. However, K-means has some drawbacks, such as the dependency on initial centroid values, the large number of iterations, determining the number of clusters and a tendency to fall into local optima [4]. Therefore, the Grey Wolf Optimization (GWO) technique [5] was adopted and applied to determine the optimal number of clusters. It’s an optimization technique that is inspired by the behavior of grey wolves and their strategies for eating and hunting [5]. This will help in optimizing the accuracy by avoiding falling into local optimum and improving the processing speed. However, the detection of brain tumors from MRI images is a computationally intensive task, especially when the image size increases. It requires processing of a massive amount of data known as Big Data, especially for processing MRI for brain tumor detection which needs high-speed processing to analyze data [3]. Therefore, a parallel implementation of the proposed K-means based on GWO was proposed and implemented on the FPGA parallel platform. This means that more than one section of a system may operate with a different set of data concurrently to improve the execution time [6]. However, the FPGA needs a long time for designing, implementation, and validation processes since it requires knowledge of digital systems and underlying architectures [6]. Xilinx FPGA has a powerful tool called the Vivado HLS tool which can be used to overcome these constraints [7]. Therefore, the Vivado High-Level Synthesis tool for synthesis and simulation was adopted and used. It’s a tool that is used for configuring the FPGA and converting the C family code into a hardware description language. So, the proposed algorithm was implemented on the Vivado HLS tool where different optimization techniques were adopted and applied. The remainder of this paper is organized as follows: Section I provides an overview of the topic. Section II discusses the related work. Section III explains the K-means algorithm and its operation. Section IV shows a brief description of the Grey Wolf Optimization, while Section V provides an explanation of the FPGA and Vivado HLS tool, Section ⅤI presents the proposed methodology with a detailed explanation, and Traitement du Signal Vol. 39, No. 6, December, 2022, pp. 1879-1891 Journal homepage: http://iieta.org/journals/ts 1879