# Automatic Classification of Morphologically Similar Fish Species Using Their Head Contours
## 3 Results
### Features Based on the Dct and the Dft. a Comparative Study
#### 3.1.2 LOO-CV Tests
The feature extraction network is usually a pre-trained CNN. The first subnetwork that supports the feature extraction network is a region proposal network (RPN) devoted to finding the areas in the image where objects are likely to exist. Those areas are known as object proposals. The second subnetwork is dedicated to predicting the class of each object proposal. In the case we are dealing with, for the first network, instead of using a pre-trained CNN as, for instance, the ResNet-50 or the Inception v3, we used a much simpler CNN that has only three convolutional layers from a total of fifteen, that was trained for another problem. The main characteristics of the structure are summarized in Table 4. The main training options chosen for the Faster R-CNN are 'MaxEpochs', 'MiniBatchSize' and 'InitialLearnRate', which were set to 12, 8, and 5\(\times\)10\({}^{-4}\) with a 'NegativeOverlapRange' of [0 0.3] and a 'PositiveOverlapRange' of [0.6 1]. From these parameters, we note that the 'MaxEpochs' specifies the number of epochs, that is, the number of full passes of the training algorithm over the entire training set, and the learning rate that controls the speed of training. The training was performed using the CPU of a MacBook Pro with eight-core Intel i9 processor at 2.4 GHz and 64 GB of RAM running the MATLAB environment on the macOSCatalina 10.15.3 operating system. Training lasted approximately 3 min. Due to the reasonably fast training time, many random tests on the whole set of images could be performed, and thus the solidity of the approach could be checked. The FasterRCNN object detection network output provides a rectangle by giving two points corresponding to the endpoints of one of its diagonals (specifically the one that goes from the top right to the lower-left point of the rectangle). Some ROI detection results are shown in Figure 12. \begin{table}
\begin{tabular}{c c c} \hline \hline  & \multicolumn{2}{c}{**Feature Extraction Network**} \\ \hline
**Layer** & **Type** & **Main Characteristics** \\ \hline
1 & Image Input & 32 \(\times\) 32 \(\times\) 3 images with ‘zerocenter’ normalization \\
2 & Convolution & 32 \(\times\) 5 \(\times\) 3 convolutions with stride [1 1] and padding [2 2 2 2] \\
3 & Max Pooling & 3 \(\times\) 3 max pooling with stride [2 2] and padding [0 0 0 0] \\
4 & ReLU & ReLU \\
5 & Convolution & 32 \(\times\) 5 \(\times\) 32 convolutions with stride [1 1] and padding [2 2 2 2] \\
6 & ReLU & ReLU \\
7 & Average Pooling & 3 \(\times\) 3 average pooling with stride [2 2] and padding [0 0 0 0] \\
8 & Convolution & 64 \(\times\) 5 \(\times\) 32 convolutions with stride [1 1] and padding [2 2 2 2] \\
9 & ReLU & ReLU \\
10 & Average Pooling & 3 \(\times\) 3 average pooling with stride [2 2] and padding [0 0 0 0] \\
11 & Fully Connected & 64 fully connected layer \\
12 & ReLU & ReLU \\
13 & Fully Connected & 2 fully connected layer \\
14 & Softmax & softmax \\
15 & Classification Output & crossentropyvex \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Network layers that compose the feature extraction network. The convolution put the input images through a set of convolutional filters, each of which activates certain features from the images. The pooling layer simplifies the output by performing nonlinear downsampling, reducing the number of parameters that the network needs to learn. The rectified linear unit (ReLU) allows for faster and more effective training by mapping negative values to zero and maintaining positive values. The fully connected layer “flattens” the network’s 2D spatial features into a 1D vector that represents, and, finally, the Softmax provides probabilities for each category in the dataset image-level features for classification purposes. These points can be used to crop the original image and obtain the ROI, which is practically the same provided by the specialist (although the specialist selects the other diagonal because its endpoints are more near to the segment of interest).