Recognizing Early Modern Painters Project
!pip install opendatasets --upgrade --quiet
Recognizing early modern art using ResNets in Pytorch
The early modern art period, starting from the early Renaissance Giotto untill the late Baroque with Rembrandt, brought huge innovation to the art world with numerous well-known masterpieces. This notebooks explores a classification problem which tries to identify 16 artists from 1250-1700 by their respective works of art. The dataset comprises 2291 paintings and is imbalanced. From certain artists there are as low as just 50 unique paintings available; this is 70% less compared to if it were a balanced dataset. The steps this notebook follows are:
- Download & clean dataset
- Import dataset in Pytorch
- Prepare dataset for training
- Create & train model
- Record & evaluate results
- Use a pre-trained model
- Conclusion
Besides the interesting challange in creating a successfull deep learning model to tackle the aforementioned problem, model results could be applied to recognize newly discovered paintings or clarify attributions of those under dispute.
import os, shutil
import opendatasets as od
import torch
import torchvision
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import torch.nn as nn
import torch.nn.functional as F
import torchvision.transforms as tt
from torchvision.utils import make_grid
from torch.utils.data.dataloader import DataLoader
from torch.utils.data import random_split, WeightedRandomSampler
%matplotlib inline
!pip install jovian --upgrade --quiet
import jovian
jovian.commit(project="Recognizing early modern painters - project")
[jovian] Detected Colab notebook...
[jovian] Please enter your API key ( from https://jovian.ai/ ):
API KEY: ··········
[jovian] Uploading colab notebook to Jovian...
Committed successfully! https://jovian.ai/boris/recognizing-early-modern-painters-project