# Automatic Microscopy Analysis with Transfer Learning for Classification of Human Sperm
## 3 Results and Discussion
### Feature Extraction Analysis  
Explaining how artificial intelligence networks make decisions is a long-standing problem, but it is very meaningful, especially in the medical field, to make artificial intelligence systems trustworthy and transparent [30]. Here we try to explain the basis of the network's decision-making by visualizing the feature maps. The feature maps extracted from the first convolutional layer, the second convolutional layer and the last convolutional layer are shown in Figure 8. It can be seen from the feature maps that the feature extraction part mainly extracts the edge information of the sperm heads, which is the most important feature to classify sperms morphologically. With the further extraction of features and multiple down-sampling, unimportant feature information is gradually ignored, while the contour information of the sperm head becomes increasingly significant. Accordingly, the pixels on the contour are more and more distinguished from the pixels in other places. This reveals that the extracted features are helpful for the classifier to distinguish between different sperms. To further evaluate the performance of feature extraction, the feature vectors extracted by the feature extraction part of the proposed architecture were fed to the enhanced _k_-nearest neighbors (_k_-NN) [31], Support Vector Machine (SVM) [32], and Random Forest [33] classifiers for sperm morphological classification, as shown in Figure 9. \begin{table}
\begin{tabular}{l c c c} \hline \hline
**Datasets** & **Original** & **Cropped** & **Cropped and Aligned** \\ \hline Accuracy & 79.4\% & 83.4\% & 96.0\% \\ Precision & 80.1\% & 84.9\% & 96.4\% \\ Recall & 79.2\% & 83.2\% & 96.1\% \\ F-score & 79.3\% & 83.2\% & 96.0\% \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Performance of the algorithms on the original HuSHeM dataset and processed datasets. In the proposed framework, an input image with the size of 64 \(\times\) 64 pixels produces a feature map with the size of 16 \(\times\) 16 pixels after feature extraction. The feature map is subsequently flattened into a 1 \(\times\) 256 vector and fed into different classifiers. An enhanced \(k\)-NN algorithm named Centroid Displacement-Based \(k\)-Nearest Neighbors algorithm (CDNN) [31] is employed to classify sperms according to the input feature data. Different from the \(k\)-NN algorithm [34], the CDNN algorithm adopts a more reasonable classification decision criterion. In the CDNN algorithm, the obtained k nearest neighbors to the test sample are classified into separated groups according to their labels, and then the corresponding classification score is calculated as \(\frac{1}{k}\). Figure 8: The visualization of feature maps. Figure 9: Different classifiers perform sperm morphological classification based on the features extracted by the same feature extraction network used in the proposed method. the test sample is assigned to the group with the smallest centroid displacement when the test instance is inserted into that group. Here, the \(k\) value in the CDNN algorithm was set to be ten, namely ten nearest neighbors to the test instance were returned. For SVM, an off-the-shelf SVM classifier based on one-versus-one strategy was used to perform the classification task. In this task, radial basis function was selected as the kernel in the SVM classifier. A built-in Random Forest classifier in the scikit-learn was also used to evaluate the performance of the feature extraction part of the proposed approach. In the Random Forest classifier, ten estimators were adopted to perform the task. The same data splitting was used in all the classifiers. The performance of these classifiers on sperm morphological classification task is shown in Table 7. It is worth pointing out that the experiment results are achieved to confirm the effectiveness of feature extraction of our approach, so the parameters of these classifiers are not fine-tuned and optimized.