Building a real-world image classifier with Transfer learning
In this case study, your company secured a medical project, and you are assigned the responsibility to build a pneumonia classifier for GETWELLAI. You have been provided with over 5,000 X-ray JPEG images, made up of two categories (pneumonia and normal). The dataset was annotated by expert physicians and low-quality images have been removed. Let's see how we can tackle this problem using the two types of transfer learning techniques we have discussed so far.
Loading the data
Perform the following steps to load the data:
- As usual, we start by loading the necessary libraries that we will need for our project:
#Import necessary libraries
import os
import pathlib
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import random
import numpy as np
from PIL import Image
import pandas as pd
import tensorflow as tf
from tensorflow import keras
from tensorflow.keras.preprocessing.image import ImageDataGenerator...