Deploying the Model

The model would be deployed using Binder. The GitHub URL of the notebook needs to be pasted. Firstly, the model needs to be exported, and a file with the extension .pkl  needs to be generated. 

Python3




learn.export()
path = Path()
path.ls(file_exts='.pkl')


Visit the website for Binder. Paste the URL of the GitHub repository, containing the notebook and .pkl file. In the ‘URL to open’ blank, enter the (GitHub) URL of the notebook. Click on ‘launch’, and after a few minutes, the web-application would be ready to be used. 

Note: This image classifier was first taught in the Fast.AI Deep Learning course, lecture 2. 



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: 

Similar Reads

Preparing the Dataset

As is the case with any image classifier, the model needs to be trained on a dataset from which it can infer and extract the features corresponding to a particular category. The BTS Image Classifier would contain 7 categories (total number of members). The dataset can be prepared by manually collecting images of different members and then clubbing them in a folder of that category. In order to fasten this process, a Python script can be employed to create the dataset. The script would fetch images from Google Image Search. (Disclaimer: Using these images may lead to a copyright violation so proceed at your own risk)....

Cleaning the Data

...

Creating the Model

...

Deploying the Model

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:...

Contact Us