Human Protein Multi Label Image Classification — DEEP LEARNING

Akash Singh
2 min readJun 24, 2020

How a CNN learns (source):

Layer visualization (source):

Transfer learning (source):

Here, I have import all the required modules

Preparing the data:

Here, already preparing the dataset and load up the dataset i.e jovian-pytorch-z2g/Human protein atlas.

So, we get the data and train and test the data.

Here, I have read the training dataset with the help of pandas function i.e pd.read_csv(TRAIN_CSV)

Read the train.csv file which is Image_Id and Labels and track that.

Here, the bunch of function and these function convert the label into vector because the you need to input vectors into pytorch.

Here the input file is Dataset. But this dataset is .csv file. We are now going to give it dataframe because we will do this split of the training and validation not after the creating dataset but before because we need to supply different augmentations to training and validation.

Data augmentations:

Here, I have split the dataset into training dataset and validation dataset. Here the training dataset is 90% and validation dataset is 10%.

Here, I have pick the length of training dataset and validation dataset.

DataLoaders:

Model — Transfer Learning:

Here the use of predefined model i.e models.resnet18()

Learn about ResNets.

Check out torchvision models: https://pytorch.org/docs/stable/torchvision/models.html

Here, I am Load the models.resnet34(pretrained=True).

Training:

This is the relation between F1 score and No. of epochs.

Here, maximum F1 score is 0.7051 and No. of epochs is about 20.

Here, the relation between Loss and No. of epochs.

And here two losses graph are mentioned.

1). Training loss and 2). Validation loss

Here, the relation between Learning Rate and Batch No.

Making predictions and submission:

Here predict the datasets.

--

--