Cleaning the Data
The images that have been downloaded may not be of the same dimensions. It is preferred to have all the images in the dataset of uniform dimensionality. The fastai library has a function for this:
Python3
bts = bts.new( item_tfms = RandomResizedCrop( 224 , min_scale = 0.5 ), batch_tfms = aug_transforms()) dls = bts.dataloaders(path) |
All the images are resized to 224 x 224 which is a standard size for images in the training dataset.
Identify Members of BTS — An Image Classifier
BTS is an eminent K-Pop band comprising of 7 members. This article looks at an image classifier that would recognize the name of the band member from a picture. The image classifier would be built using fastai. It is a deep learning library that aims to democratize deep learning. It is built on top of PyTorch, and has plethora of models with optimized weights that are ready-to-use. The application would be hosted on Binder, and the end product would look like this: