# A Novel Deep Learning Segmentation and Classification Framework for Leukemia Diagnosis
## 2 Materials and Methods
### The Proposed System  
This section offers a complete description of the presented algorithm. The proposed model takes inputs of images, converts every image into grayscale, and performs some preprocessing to remove noise, enhance the pixels, rescale all images to a common size, and normalize each input. Normalization is applied to change pixel intensity and divide each pixel value by the allowed maximum value that a pixel can take. The system rescales each input to 600 \(\times\) 600 pixels. The performed preprocessing processes are applied using some built-in functions. These functions include filters, such as Bilateral, Gaussian, and Gabor. In addition, morphological operations are deployed to support the presented framework in its segmentation stage. Then, the segmentation stage takes place to segment each input to outline potential Regions of Interest (RoIs). These regions are utilized to extract the needed characteristics for the categorization stage. The utilized segmentation stage is applied using the newly implemented model for this purpose based on U architecture. This architecture is a simple, popular architecture used in image segmentation; training a model is easy on this network, and preferable for applications that require less computational resources. In addition, UNET is composed of two components, which are a contracting path and an expansive path [30; 31; 32]. The contracting path is represented by the left-hand side and the expansive path is denoted by the right-hand side. In the contraction stage, the proposed approach reduces the spatial information and increases feature information [30; 31; 32]. The expansive pathway is responsible for combining the extracted features and the spatial information. Moreover, UNET architecture localizes and distinguishes RoIs by performing operations based on the pixel level to equalize the size of input and output. After that, the classification is performed using the UNET model to categorize the identified potential RoIs as either healthy or cancerous cells. The cancerous cells are further classified into two suitable types, which are ALL and AML as depicted in Figure 1. Unfortunately, the deployed datasets contain only these two types. Figure 1 illustrates a flowchart and block diagram of the proposed approach to discover and categorize leukemia using blood images. Some blood smear images can be blurry and contain undesirable noise, which could affect the segmentation process and lead to unneeded outcomes. Thus, these images should be clear; this is achieved using three built-in filters, which are Bilateral, Gaussian, and Gabor. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**First Dataset [26]** & **Second Dataset [27]** & **Third Dataset [28]** & **Fourth Dataset [29]** \\ \hline
**Number of images** & 3256 & 6512 & 15,135 & 3242 \\ \hline
**Size** & 116 MB & 210 MB & 909 MB & 2 GB \\ \hline
**Ground Truth** & Yes & Yes & Yes \\ \hline \hline \end{tabular}
\end{table} 
Table 2: The utilized datasets description. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Dataset Number** & \multicolumn{3}{c}{**Number of Images**} \\ \cline{2-4}  & **Training** & **Validation** & **Testing** \\ \hline
1 & 2800 & 200 & 256 \\ \hline
2 & 4790 & 722 & 1000 \\ \hline
3 & 10,529 & 2500 & 2106 \\ \hline
4 & 1582 & 800 & 860 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Details of the utilized datasets. Then, some morphological operations are deployed to distinguish between red and white cells. In addition, all white blood cells are outlined to start determining the possible potential RoIs. Later, all processed inputs are normalized. All these procedures take place in the preprocessing phase, which is considered the first stage of the presented model. After that, the second and the third stages occur consecutively. These stages are segmentation and classification. Inside the segmentation stage, white blood cells are analyzed to spot potential cells and outline them as well.