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

Road Signs Bounding Box Prediction using PyTorch

Problem Statement: Predict bounding box around a Road sign in a given image and also predict the type of road sign.

Dataset: https://www.kaggle.com/andrewmvd/road-sign-detection

(title= Road Signs Dataset ,

url= https://makeml.app/datasets/road-signs,

journal= Make ML)

#library imports
import os
import random
import math
from datetime import datetime
from collections import Counter
import pandas as pd
import numpy as np

import cv2
from PIL import Image
from pathlib import Path
import matplotlib.pyplot as plt
from matplotlib.patches import Rectangle
from sklearn.model_selection import train_test_split
import xml.etree.ElementTree as ET

import torch
from torch.utils.data import Dataset, DataLoader
import torch.optim as optim
import torch.nn as nn
import torch.nn.functional as F
from torchvision import models
%reload_ext autoreload
%autoreload 2
%matplotlib inline
#!unzip road_signs.zip

Loading the data