Learn practical skills, build real-world projects, and advance your career

Human Protein Multi Label Image Classification - Transfer Learning & Regularization

How a CNN learns (source):


Layer visualization (source):


Transfer learning (source):

This is a starter notebook for the competition Zero to GANs - Human Protein Classification. It incorporates transfer learning, and other techniques from https://jovian.ml/aakashns/05b-cifar10-resnet

import os
import torch
import pandas as pd
import numpy as np
from torch.utils.data import Dataset, random_split, DataLoader
from PIL import Image
import torchvision.models as models
import matplotlib.pyplot as plt
from tqdm.notebook import tqdm
import torchvision.transforms as T
from sklearn.metrics import f1_score
import torch.nn.functional as F
import torch.nn as nn
from torchvision.utils import make_grid
%matplotlib inline

Preparing the Data

DATA_DIR = '../input/jovian-pytorch-z2g/Human protein atlas'

TRAIN_DIR = DATA_DIR + '/train'                           
TEST_DIR = DATA_DIR + '/test'                             

TRAIN_CSV = DATA_DIR + '/train.csv'                       
TEST_CSV = '../input/jovian-pytorch-z2g/submission.csv' 
data_df = pd.read_csv(TRAIN_CSV)