Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


Code used for the paper: Measuring social, environmental and health inequalities using deep learning and street imagery

Data preperation

1. Get labels /data-prep/

The initial data download for labels (for each Lower Super Output Area - LSOA) need to be completed from the corresponding websites (as described below with links). The script reads these downloaded files in, and computes the deciles from the input values that are used in training as labels.

2. Exctract features from images /data-prep/

This script uses VGG16 pre-trained network weights to extract 4096D vectors (i.e. codes) from each of the street level images used.

3. Create HDF5 data for training /data-prep/

Creating hdf5 files from VGG16 features and pickle files for labels to be used in training.

Reads in: (i) features (codes) extracted from images using VGG16 (, (ii) metadata containing labels, and input image ids

Outputs: (i) HDF5 file with features (4096D codes extracted from VGG16), (ii) labels file with corresponding variable values

Ordinal classification (deep learning based assignment to deciles)


The assignment of each postcode to an outcome decile is an ordinal classification task, for which we used the network shown below. We used pre-trained weights of the VGG16, and only trained for the weights of the fully connected layers.



Ground truth data for our analysis was only available at the Lower Super Output Area (LSOA) level for the cities we focused on. To test the performance of our networks, we needed predictions at the LSOA level and not image level. The mean continuous output value for each LSOA was computed by averaging postcode-level continuous outputs generated by the final layer of trained networks before the application of the fore-mentioned sigmoid function. The mean value computed for each LSOA was then converted to a decile category, and compared to the LSOA’s actual decile.

Pre-trained models in Tensorflow

Will be made available soon for trained networks using London images


No description, website, or topics provided.






No releases published


No packages published