This chapter covers the exhaustive description of the experiment carried out for the design of a hybrid CAC system using end-to-end Pre-trained GoogLeNet CNN model as a deep feature extractor and PCA-SVM classifier for chest radiographs. It explains in detail the concepts of feature dimensionality reduction and the steps involved in implementing PCA and SVM classifier. The code snippets of the different experiments aim at giving a better understanding to the programmatic implementation of designing these CAC systems.
Hybrid CAC system; DAG network; Deep feature extraction; GoogLeNet; Feature selection; Correlation-based feature selection; Feature dimensionality reduction; Principal component analysis; Machine learning; SVM classifier
This chapter covers the exhaustive description of the experiments carried out for the design of a hybrid computer-aided classification (CAC) system using an end-to-end Pre-trained GoogLeNet convolution neural network (CNN) model as deep feature extractor and principal component analysis support vector machine (PCA-SVM) classifier for chest radiographs. It explains in detail the concepts of feature dimensionality reduction and the steps involved in implementing PCA and SVM classifier. The code snippets of the experiment aim at giving a better understanding to the programmatic implementation of designing this CAC system.
The experimental workflow followed for analyzing the performance of a CAC system designed for binary classification of chest radiographs using deep feature extraction, GoogLeNet CNN model, and PCA-SVM is shown in Fig. 6.1.
The process of extracting the features of an image from the deep layers of a CNN is referred to as deep feature extraction, and the features extracted are called deep features. This process involves the steps of providing the input data to the Pre-trained CNN, and then the respective activation values from the fully connected layer usually present at the end of the network or pooling layer are obtained. The process of deep feature extraction has been discussed in detail in Chapter 5. In the present work, the deep features are extracted from the best fine-tuned model decided on the basis of the classification results of Experiments 1–3, discussed in Chapter 4, consequentially forming a set of deep features that are extracted from the best performing CNN model. This feature set is referred to as a deep feature set (DFS).
The following code snippets show the process of feature extraction and feature map visualization of the extracted features. Code Snippet 6.1 shows the syntax to load the GoogLeNet CNN model trained in Experiment 3, discussed in Chapter 4, to extract the features from its pooling layer.
Code Snippet 6.2 shows the extraction of training and testing features from the pooling layer of the GoogLeNet CNN model after it has been loaded into the MATLAB workspace.
Code Snippet 6.3 shows the syntax of writing the features extracted from the pooling layer to Microsoft Excel sheets. These .xlsx files or .csv files are then used as input to the feature selection methods and machine learning-based classifiers.
The process of feature selection and different methods of feature selection have been discussed in the previous chapter along with the details of GoogLeNet as a deep feature extractor and the feature visualization.
Correlation-based feature selection (CFS) is a filter-based feature selection technique that aims at extracting the best and most optimal set of features, which are nothing but a subset of the original set of features, on the basis of their correlation values. This technique is widely used as an attempt to select the optimal features from the original feature sets [1–12]. The CFS follows the basic idea that the features are not correlated to each other but have higher correlations to the class to which they belong; here, the reduced feature set (RFS) consists of the features that are uncorrelated to each other but have high correlation to their respective classes, either Normal or Pneumonia. A detailed explanation of CFS is given in Chapter 5.
The DFS contains the features extracted from the pooling layer of the GoogLeNet CNN, that is, the global average pool (GAP) layer, which when subjected to the CFS, results in an RFS. The DFS consists of 1024 features extracted from the GAP layer, and after CFS, the RFS consists of 103 features.
In the present work, PCA is used as a dimensionality reduction technique for the deep feature space, which is extracted from the Pre-trained GoogLeNet CNN model in the form of a DFS. This DFS, after further application of CFS, forms an RFS. The PCA helps in finding optimal principal components (PCs) that are highly useful in the classification task [13–16]. The steps involved for the implementation of PCA are given in Fig. 6.2.
The total resultant optimal PCs that need to be taken into consideration for the job of classification are obtained by repetition of the experiments in an iterative manner. In this way, the PCs are calculated empirically mainly by stepping through the few initial PCs that primarily lie in the range of 2–15 in an attempt to build a model.
The SVM classifier is a member of the supervised machine learning algorithms class. The basic concept that the SVM works on is decision boundaries. The SVM applies functions called kernels that perform the mapping of the training data to a feature space of a higher dimensionality [17–21]. The training data, which is mainly nonlinear in nature, is taken from the input space. Some of the most common kernels used in SVM are: (a) polynomial kernel, (b) radial basis function or Gaussian radial basis function, and (c) sigmoid kernel. The present work implements the SVM classifier using the LibSVM library [22], and the kernel used is the Gaussian radial basis function kernel. Among the multiple steps involved in implementing SVM, the most crucial step is attaining a good, generalized performance. The parameters represented by C and γ play a major role in achieving a good and well-generalized performance of the SVM classifier. Here the parameter C is responsible for the regularization of the result; hence, it is called the regularization parameter. Similarly, the parameter γ is associated with the kernel performance; hence it is called the kernel parameter. The main aim of regularization parameter C is to maximize the margin, which is the distance between the support vectors, while keeping the error of training as low as possible. In the present work, a k-fold cross validation is carried out, where k = 10 on the training dataset. Here each combination of (C, γ) is chosen, such that:
The grid search procedure followed in the parameter space aims at giving the optimum values of the regularization parameter C and the kernel parameter γ, such that the training accuracy is maximum at the optimum value of (C, γ) [23–27]. The extracted feature values are normalized in the range [0,1] by using the min-max normalization algorithm. This normalization is performed in order to dodge any bias that could be caused by the presence of unbalanced feature values. The SVM has been widely used in classification of medical images [28–39]. The steps followed in SVM are given in Fig. 6.3.
Experiment 6: Designing a hybrid CAC system for chest radiographs using deep feature extraction, GoogLeNet, and PCA-SVM classifier
From the results of Experiments 1–3, as described in Chapter 4, it can be seen that the GoogLeNet CNN model attains the highest accuracy (90.00%). Hence, for this experiment to evaluate the performance of designing a hybrid CAC system for chest radiographs using GoogLeNet, deep feature extraction, and PCA-SVM classifier, the GoogLeNet CNN is used as the deep feature extractor. The features from the GAP layer of GoogLeNet CNN are extracted forming a DFS of 1024 features. This DFS is reduced to 103 uncorrelated features resulting in the formation of an RFS by CFS. This RFS acts as an input to the PCA-SVM classifier for the classification of chest radiographic images. The result of the performance evaluation of the hybrid CAC system designed using deep feature extraction, GoogLeNet CNN model, and PCA-SVM classifier is shown in Table 6.1.
Table 6.1
Network/classifier | Confusion matrix | Accuracy (%) | ICA_Normal (%) | ICA_Pneumonia (%) | ||
---|---|---|---|---|---|---|
Normal | Pneumonia | |||||
GoogLeNet/PCA-SVM | Normal | 48 | 2 | 91.00 | 96.00 | 86.00 |
Pneumonia | 7 | 43 |
ICA_Normal, individual class accuracy for Normal class; ICA_Pneumonia, individual class accuracy for Pneumonia class.
From the results of Experiment 6, as shown in Table 6.1, it can be seen that the hybrid CAC system designed using the deep features extracted from the GoogLeNet CNN model fed to PCA-SVM classifier achieves 91.00% accuracy for the classification of chest radiograph images into binary classes: Normal and Pneumonia. The individual class accuracy value of Normal class is 96.00%, and for the Pneumonia class, the individual class accuracy value obtained is 86.00%. From the total 100 images in the testing set, 9 images have been incorrectly classified, from which 2 images belong to the Normal class and 7 images belong to the Pneumonia class. The ROC curve with its corresponding AUC values for the hybrid CAC system designed using the GoogLeNet CNN model as deep feature extractor and PCA-SVM classifier is shown in Fig. 6.4.
This chapter gives a detailed overview of the PCA feature dimensionality technique and explains in detail the steps involved for classification of the images using the SVM classifier. From the experiment carried out in this chapter, it is observed that designing the hybrid CAC system through deep feature extraction by GoogLeNet and PCA-SVM achieves 91.00% accuracy for the classification of chest radiographs. The next chapter aims at understanding the lightweight CNN model, its architecture, and experiments conducted to evaluate the performance of designing lightweight CNN-based CAC systems for classification of chest radiographs.