Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.

GitHub license GitHub issues PyPI version PWC Tweet


To reduce the amount of manual labour required for human-rights-related image analysis, we introduce DisplaceNet, a novel model which infers potential displaced people from images by integrating the dominance level of the situation and a CNN classifier into one framework.

Grigorios Kalliatakis     Shoaib Ehsan     Maria Fasli     Klaus McDonald-Maier    

1st CVPR Workshop on
Computer Vision for Global Challenges (CV4GC)    

[pdf] [poster]


  • Python 2.7+
  • Keras 2.1.5+
  • TensorFlow 1.6.0+
  • HDF5 and h5py (required if you plan on saving/loading Keras models to disk)


Before installing DisplaceNet, please install one of Keras backend engines: TensorFlow, Theano, or CNTK. We recommend the TensorFlow backend - DisplaceNet has not been tested on Theano or CNTK backend engines.

More information can be found at the official Keras installation instructions.

Then, you can install DisplaceNet itself. There are two ways to install DisplaceNet:

Install DisplaceNet from the GitHub source (recommended):

$ git clone

Alternatively: install DisplaceNet from PyPI (not tested):

$ pip install DisplaceNet

Getting started

Inference on new data with pretrained models

To make a single image inference using DisplaceNet, run the script below. See for a list of selectable parameters.

$ python --img_path test_image.jpg \
                            --hra_model_backend_name VGG16 \
                            --emotic_model_backend_name VGG16 \
                            --nb_of_conv_layers_to_fine_tune 1

Generate predictions on new data: DisplaceNet vs vanilla CNNs

Make a single image inference using DisplaceNet and display the results against vanilla CNNs (as shown in the paper). For example to reproduce image below, run the following script. See for a list of selectable parameters.

$ python --img_path test_image.jpg \
                                   --hra_model_backend_name VGG16 \
                                   --emotic_model_backend_name VGG16 \
                                   --nb_of_conv_layers_to_fine_tune 1

Training DisplaceNet's branches from scratch

  1. If you need to, you can train displaced people branch on the HRA subset, by running the training script below. See for a list of selectable parameters.

    $ python --pre_trained_model vgg16 \
                                	     --nb_of_conv_layers_to_fine_tune 1 \
                                	     --nb_of_epochs 50
  2. To train human-centric branch on the EMOTIC subset, run the training script below. See for a list of selectable parameters.

    $ python --body_backbone_CNN VGG16 \
                                     --image_backbone_CNN VGG16_Places365 \
                                     --modelCheckpoint_quantity val_loss \
                                     --earlyStopping_quantity val_loss \
                                     --nb_of_epochs 100 \

    Please note that for training the human-centric branch yourself, the HDF5 file containing the preprocessed images and their respective annotations is required (10.4GB).

Data of DisplaceNet

Human Rights Archive is the core set of the dataset which has been used to train DisplaceNet.

The constructed dataset contains 609 images of displaced people and the same number of non displaced people counterparts for training, as well as 100 images collected from the web for testing and validation.

Results (click on images to enlarge)

Performance of DisplaceNet

The performance of displaced people recognition using DisplaceNet is listed below. As comparison, we list the performance of various vanilla CNNs trained with various network backbones, for recognising displaced people. We report comparisons in both accuracy and coverage-the proportion of a data set for which a classifier is able to produce a prediction- metrics

Citing DisplaceNet

If you use our code in your research or wish to refer to the baseline results, please use the following BibTeX entry:

author = {Kalliatakis, Grigorios and Ehsan, Shoaib and Fasli, Maria and D McDonald-Maier, Klaus},
title = {DisplaceNet: Recognising Displaced People from Images by Exploiting Dominance Level},
booktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR) Workshops},
month = {June},
year = {2019}

Also if you use our code in a publicly available project/repository, please add the link by posting an issue or creating a PR

We use GitHub issues to track public bugs. Report a bug by opening a new issue.