# Automatic Approach for Brain Aneurysm Detection Using Convolutional Neural Networks
## 4 Proposed Method
### Proposed 3 DCNN-ConvLSTM Architecture  
The 3 DCNN-based approaches, leveraging 3D convolution layers, have garnered significant popularity for feature extraction from input image data in the biomedical field. Accordingly, our proposed 3 DCNN architecture integrates a three-dimensional (3D) convolution layer. This layer functions by employing a sliding 3D convolution window across the input data, positioned above the data itself. Within this window, multiple filters are deployed, with each filter specializing in detecting distinct patterns. These 3D filters traverse the input data in all three spatial directions. The novel neural network architecture integrates 3 DCNN (Conv3D) layers, ConvLSTM layer and 2 DCNN (Conv2D) layer (see Figure 8). This architecture, denoted as 3 DCNN-ConvLSTM, comprises several 3 DCNN (Conv3D) layers, succeeded by a solitary ConvLSTM layer, and 2 DCNN layer (Conv2D). The description of the layers of the proposed 3 DCNN-ConvLSTM can be seen in Table 3. This architecture is divided into the following layers: \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Layer Type** & **Output Shape** & **Param \#** & **Kernel Size** & **Pooling Size** & **Activation** \\ \hline Conv 2D & 62, 62, 16 & 160 & 3 & ReLU \\ \hline MaxPooling2D & 31, 31, 16 & & 2, 2 & \\ \hline Conv 2D & 29, 29, 16 & 2320 & 3 & ReLU \\ \hline MaxPooling2D & 14, 14, 16 & & 2, 2 & \\ \hline Flatten & 3136 & & & \\ \hline Dense & 32 & 100,384 & & ReLU \\ \hline DropOut & rate = 0.3 & & & \\ \hline Dense & 2 & & SoftMax \\ \hline \hline \end{tabular}
\end{table} 
Table 2: The description of 2D convolution neural network model. * 3 DCNN layers (Conv3D) improve the recognition of 3D and dynamic images. Each layer contains a 3D filter that scans data in three directions \((x,y,z)\). The 3D convolution process generates a convolutional map, crucial for thorough data analysis while also preserving essential time and volumetric context information. * MaxPooling layers, specifically MaxPooling3D designed for 3D data, play a crucial role in diminishing the dimensions of image data. MaxPooling3D is a mathematical operation crafted for handling 3D data, encompassing spatial or spatiotemporal data. These layers are configured using \(n\)\(\times\)\(n\)\(\times\)\(n\) regions as filters to execute the max pooling operations. Additionally, a stride parameter is specified, determining the number of pixels the filter advances with each step as it traverses the image. * The ConvLSTM layer is responsible for handling the features extracted by the Conv3D layers and effectively capturing the temporal dependencies that exist among the frames. * Batch normalization (Batch Norm) is a technique employed to standardize the output of the preceding layer for each batch of data. * The Dense layer consists primarily of fully connected neurons. The Flatten layer facilitates the transformation of the matrix into an output vector. The architecture is predominantly composed of 3D convolution layers but also incorporates essential layers such as flatten and dense. Certain hyperparameters, including the number of filters and the core size of 3D convolution layers and MaxPooling, are constrained by mathematical operations to ensure non-negativity and integer output from the layers. Building upon our previous research [22; 23], we introduced an optimization algorithm for ConvLSTM, which was slightly modified and applied to this network. The suggested architecture harnesses the advantages of both Conv3D and ConvLSTM networks. This design includes multiple 3D convolutional layers, one ConvLSTM layer, and one