In short, this means that we can reuse such a pre-trained model and apply it to a new dataset (in a different field), even if this dataset is much smaller! In this case, we can still finetune the model to learn to recognize domain-specific features, but the most high-level features such as edges and corners are already learned by the model. This often leads to satisfactory results in different domains, which is also the case here!
The image classifier that we have chosen for our ensemble is the Inception ResNet V2 model, mainly because the model is easily accessible, has a pythonic TensorFlow implementation, and is a state-of-the-art model. This model requires that the input images are of fixed size, namely that each image is 299*299 in terms of height*width. Therefore, image preprocessing steps have been taken to make this happen, as each image in our dataset was of variable size. Thus, every image is resized to the specified format, but not by simply adjusting the height and width to these dimensions, as this would result in a loss of proportionality for most images. To guarantee that the aspect ratio is maintained, a technique called padding is applied. This technique ensures that the aspect ratio is maintained, and fills up the empty space (in either height or width) by black pixels, which will not influence the neural network’s ability to classify these images.
Once the images are padded, and thus resized while maintaining their aspect ratio, the time has come to train the model. As we apply transfer learning, we are only finetuning the existing model, however this doesn’t mean that we should leave its parameters as it is. Arguably the most important parameter of a neural network is its learning rate, which determines how well (and how fast) the network will converge to an optimum. It is often argued that the learning rate can be determined via a trial-and-error approach, while this is not that bad, more ‘structured’ approaches exist. One of these approaches is Cyclical Learning Rate (Smith, 2017). By applying this method, one can find optimal boundaries for the learning rate, namely a minimum and maximum learning rate value. When training the neural network, the learning rate will cycle between these values, thereby often obtaining good results faster than by just setting a learning rate value.