Code Monkey home page Code Monkey logo

sesefficientcam's Introduction

Socioeconomic correlations of urban patterns inferred from aerial images: interpreting activation maps of Convolutional Neural Networks

This repository contains code related to the paper Socioeconomic correlations of urban patterns inferred from aerial images: interpreting activation maps of Convolutional Neural Networks (currently in submission).

This repository contains the code needed to prepare the data, train the SES inference model and project the activation maps unto the land cover maps.

Setup

This project uses mostly Python . To replicate our results, using Anaconda, set up the environment with the provided with conda env create -f environment/environment.yml (this builds the Rust extensions in this package, and installs them locally).

Datasets folders

This project relies upon three datasets:

  • 2019 Socioeconomic Census: Automatically crawled in the provided data_setup.sh and containing the shapefiles tiling the whole country into individual cells with socioeconomic data. Requires to run data_setup.sh.

  • Urban Atlas Dataset: In order to collect this dataset, you'll need to create an account in the ESA Copernicus register and download the files corresponding to the 5 cities in our study, namely, Paris, Lyon, Nice, Marseille and Lille. These should all be placed in ./data/UA_data/ and unzipped.

  • Aerial Dataset: In order to collect this dataset, you'll need to create an account within the IGN register and then proceed to download the links provided in aerial_links. These should be placed in ./data/aerial_data/ and unzipped with 7z.

As a result, your dataset folder should look like the following:

data
├── census_data
├── aerial_data
├── UA_data     

code
├── data_setup.sh                                   #Setup data
├── generate_fr_ua_aerial_data.py  #Extract images for training
├── aerial_training_utils.py  #Helper methods for data handling
├── efficientnet_training.py          #Train CNN for given city
├── gradcaming_urban_areas.py #Project GradCAM onto UA polygons
└── run.sh 							  #Run all methods together

results
├── imagery_out
├── model_data                   
└── tmp

Analysis

Once the datasets are compiled, you are now able to run the whole pipeline, as follows:

  • Execute first generate_fr_ua_aerial_data.py . This will extract all the images (png) corresponding to individual census cells into the results directory.

  • Then, run efficientnet_training.py. This will train by default the CNN proposed in the paper with the same parametrization for the city of Paris. Separate runs are needed for all other four cities.

  • Finally, run gradcaming_urban_areas.py to compute the activation maps and the corresponding statistics for the city of Paris. Separate runs for other cities are needed as well.

Citation

If you use the code, data, or analysis results in this paper, we kindly ask that you cite the paper above as:

Socioeconomic correlations of urban patterns inferred from aerial images: interpreting activation maps of Convolutional Neural Networks , J. Levy Abitbol, M. Karsai, 2020, arxiv-preprint.

sesefficientcam's People

Contributors

jaklevab avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.