Streetscape is my way of making my MSc research project interactive.

I studied MSc Computer Science with the University of Bath between 2021 and 2024, bookending my tenure with a research project entitled "Using a Convolutional Neural Network to Predict Road Traffic Accident Risk from Geographic Data". The chain of thought that powered the project can be expressed thus: that geographic factors such as road shape and topography affect the likelihood of a crash happening; that these factors exert their effects in complex ways, both individually and in interaction; that that complexity would be rejected by the heavy discretisation necessary to produce traditional machine-learnable input; that colourised map images, as high-dimensional encodings of spatial data, represent a compelling way to capture that complexity; and that convolutional neural networks (CNNs) can act as a bridge to connect the power of images with the power of machine learning.

By feeding a CNN tens of thousands of colourised map images representing the locations where crashes have and have not taken place in Great Britain, the hope was that the model would learn to distinguish dangerous visual motifs.

Generating these images was a big technical challenge. It meant integrating a variety of data sources, including the Department for Transport's (DfT) road traffic accident (RTA) data, OpenStreetMap (OSM) road shape data, Shuttle Radar Topography Mission (SRTM) elevation data, and traffic data compiled by local authorities from around Great Britain. It also meant performance optimisation - I needed to generate tens of thousands of images, not just on a one-off basis, but again and again and again, with various parameters tweaked and innovations encoded, as part of a drive to optimise the model by optimising the training data.

At the core of the software solution was a tool for generating an image from a pair of geographic coordinates, using OSM and SRTM data. Streetscape provides an interactive web interface to this tool. Streetscape and my training data generation process both ride on the back of the same code under the hood; the difference is that in Streetscape, the user provides a single place name that is geocoded to a set of geographic coordinates; while in the training data generation process, those coordinates were either taken from real-world collisions (crashes) as per DfT, or my bespoke negative sampling algorithm, which aimed to produce a dataset representative of real-world driving patterns, to contrast the collision data.

Happy generating!