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

The Notebook file where I am going to create the model and train it

The plan is to create a human visual system like replica for computer to look through camera working as their eyes and understand the mood by reading on facial expression.

I will load the data here, make it ready or the model, then create the model and train it here. After it is done I will save the trained parameters to use in a python script which can understand the facial expression with the help of camera and the OpenCV module.

# performing the imports we may need to use later in the notebook

import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
import torch, os
import torch.nn as nn
import torch.nn.functional as F
from torch.utils.data import Dataset, DataLoader, random_split
from torchvision import transforms, utils
from torchvision.transforms import ToTensor
from torchvision.utils import make_grid

1. Getting the Data and Understanding it

After looking around the internet I found a dataset in csv format known as FER2013 containing pixel values of the photos and their respective classes.