Introducing 

Prezi AI.

Your new presentation assistant.

Refine, enhance, and tailor your content, source relevant images, and edit visuals quicker than ever before.

Loading…
Transcript

HIGHWAY CLASSIFICATION

20/10/2019

Problem Statement

1. This task is a part of preliminary exercise done in order to determine the features of a highway intersection/exit which contribute significantly to accident proneness of a location.

2. The main objective was to classify a given satellite image of a highway intersection/exit into either a High or Low Accident Proneness region using Deep Learning and Computer Vision techniques.

PROBLEM STATEMENT

DATA COLLECTION

DATA COLLECTION

The data used in this project were of two types:

1. A set of structured data on crashes and average annual daily traffic (AADT) in multiple cities (total 1544 data points), and

2. A set of unstructured data which comprised of satellite images of various crash locations collected from structured data with a total of 1206 images (338 requests returned error).

Crash Data and Average Annual Traffic Data (AADT)

The crash data available through government sources were used for the following locations:

1. Allegheny County, Pennsylvania, USA

2. Chicago, Illinois, USA

3. Los Angeles, California

4. New York, USA

The AADT for the above listed locations was also downloaded from government sources. The pre-processing of all the datasets was accomplished using R package 'tidyverse' and 'varhandle'.

STRUCTURED DATA

Allegheny County

Allegheny

  • Crash Data

The major data entries used from the crash dataset for each accident record was the injury count, street name and the geographical coordinates of the accident. This data had 35,468 entries.

  • Average Annual Daily Traffic Data (AADT)

This dataset consisted of AADT of 1305 different locations across the county.

  • Final Data

Both the datasets were processed to create a separate dataframe with 654 unique entries having variables Address, LAT/LON, AADT and Frequency of accidents given a location.

Chicago

  • Crash Data

The major data entries used from the crash dataset for each accident record was the total injuries, fatal injuries, street address and the geographical coordinates of the accident. This data had 44,284 entries.

  • Average Annual Daily Traffic Data (AADT)

This dataset consisted of AADT of 1279 different locations across the city.

  • Final Data

Both the datasets were merged to create a dataframe with 205 unique entries having variables Address, LAT/LON, AADT, total injuries and Frequency of accidents given a location.

Chicago

Los Angeles

  • Crash Data

The major data entries used from the crash dataset was frequency of accident occurence at a given street/location, street address and the geographical coordinates of the accident. This data had 125,168 entries.

  • Average Annual Daily Traffic Data (AADT)

This dataset consisted of AADT of 1841 different locations across Los Angeles.

  • Final Data

Both the datasets were combined to create a dataframe with 169 unique entries having variables Address, LAT/LON, AADT, Frequency of accidents given a location.

Los Angeles

New York

  • Crash Data

The major data entries used from the crash dataset was frequency of accident occurence at a given street/location, numebr of injuries for each record, street address and the geographical coordinates of the accident. This data had 1,023,668 entries belonging to 5 different boroughs, namely, Bronx, Brooklyn, Manhattan, Queens and Staten Island.

  • Average Annual Daily Traffic Data (AADT)

This dataset consisted of AADT of 21444 different locations across New York.

  • Final Data

Both the datasets were combined to create a dataframe with 516 unique entries having variables Address, LAT/LON, AADT, Total Injuries, Frequency of accidents given a location.

New York

Satellite Images

  • Satellite images for the listed locations from the datasets for Allegheny county, Chicago, LA and New York was downloaded using Google Static Maps API with the help of R package 'RgoogleMaps'. A total of 1544 requests were made which resulted in 338 errors and 1206 results.

  • The satellite images downloaded for each location were colored and defined by a bounding box of ~40,000 sq. meters and a zoom level of 18 (max. available is 22).

UNSTRUCTURED DATA

DEEP NEURAL NETS

PREDICTIVE ANALYSIS

For this exercise, three different models were trained to arrive at the results of the classification task:

  • Three-Block VGG
  • VGG16 (Transfer Learning)
  • ResNet50 (Transfer Learning)

Furthermore while defining functions for each model, an instance of ImageDataGenerator was defined for data augmentation to increase the sample size for better training results.

3-Block VGG

3-Block VGG Architecture

Three-Block VGG model is an extension of the basic one-block VGG model. Each block had a convolutional layer with 32 filters followed by a max pooling layer. Moreover, each layer used the ReLU activation function and the He weight initialization. Adadelta (an adaptive learning method) was used as the optimizer which has default value for learning_rate and rho as 1.0 and 0.95 respectively.

An output layer with one node and a sigmoid activation was used and the model was optimized using the binary cross-entropy loss function.

To reduce overfitting, Dropout regularization was added to each layer.

Code Snippet

VGG16

Both VGG16 and ResNet50 models are one of the most popularly used pre-trained models provided by Keras for transfer learning and can be loaded wholly or partially based on requirement.

VGG16 model is comprised of two main parts, the feature extractor part of the model that is made up of VGG blocks, and the classifier part of the model that is made up of fully connected layers and the output layer.

For this task, the feature extraction part of the model was used as it is and the fully connected layers at the top of the model were removed to tailor the model according to the classification task at hand.

VGG16

Code Snippet

ResNet50

RESNET50

Although, the ResNet50 developed by He et al. (2016) was a massive improvement over the VGG model for classifying images in the Imagenet dataset but at the same time the architecture is highly dense and complex.

This model gave an exceptionally well accuracy for training dataset (~90%) as compared to VGG (~70%) but performed slightly worse than VGG on the validation dataset. This could possibly be attributed to overfitting of model on the training data and could be tackled with the help of larger training dataset or cross-validation among various other techniques.

Code Snippet

Results

RESULTS

Follow-Up Tasks

This exercise was just a precursor to the final task at hand, which is to determine highway features which contribute significantly to the accident proneness of a location. The result to the final task could be invaluable as the model trained for locations all of the world will lead to global implications as compared to the local level research done previously. Use of remotely sensed data helps in the cause by reducing the cumbersome task of primary data collection for a location.

Apart from this, the existing model accuracy could also be improved by using Fine-tuning and other techniques for better feature identification.

FOLLOW-UP TASKS

Improving Model Accuracy

  • Fine-tuning, by removing the top layers from the model and training them from the scratch for task at hand will improve the model accuracy significantly.

  • Larger Training Dataset, it has been observed that the size of the training dataset most of the times directly influences the model accuracy.

  • K-fold Cross Validation, a larger dataset is a pre-requisite for performing cross validation and consequently get better results.

Accuracy Improvement

Feature Extraction

The main aim to identify features of the highway that contribute significantly to accident proneness of the location.

Class Activation Maps (CAM) is one of many ways to visualize and get insights from a CNN by creating a heatmap of "Class Activation" over the input image. A "class activation" heatmap is a 2D grid of scores associated with an specific output class, computed for every location in any input image, indicating how important each location is with respect to the class considered. Following are some of the heatmaps created for few images from the dataset which were classified into High Accident Prone region. It is very clearly visible that the regions in the high intensity regions are mostly intersections and driveway/highway exits which could be of importance for future exercises.

Feature Extraction

Heatmap #1

Heatmap #2

Heatmap #3

Heatmap #4

Learn more about creating dynamic, engaging presentations with Prezi