Research Article
Chest X-Ray Images to Differentiate COVID-19 from Pneumonia with Artificial Intelligence Techniques
Algorithm 1
Steps to classify the X-ray images using VGG16.
1: Load images for training, testing, and validation | 2: Rescale the images to (224, 224, 3) | 3: Normalize the pixel values of the images between 0 and 1 | 4: Load the pre-trained VGG16 model | 5: Freeze the base network | 6: Flatten the network | 7: Add two dense network layers on top of the base network | 8: Split the images, into training, validation, and testing set in the ratio of 70:15:15 | 9: Extract the feature map, from the images using pre-trained VGG16 | 10: Set the epoch, | 11: Set the counter, i | 12: do while | 13: Select the initial hyperparameter values (e.g., learning rate, batch size, etc) | 14: Train the classifier using the training dataset | 15: Evaluate VGG16 performance with the validation data | 16: end | 17: Choose the best weight matrix that provides minimum validation error rate | 18: Compute prediction scores, based on testing samples | 19: Classify samples as COVID-19 or pneumonia using | 20: Identify the best-trained model using the test images |
|