This repository implements the network described in An Improved Deep Learning Architecture for Person Re-Identification by Ahmed et al. The main deep learning library used to do this is the dlib machine learning library.
This code has only been built and tested on Ubuntu 16.04.
- dlib v19.0+
- Requirements:
C++11
-compatible compilerCUDA 7.5
or greatercuDNN v5
or greater
- Requirements:
- CMake v2.8.12+
- HDF5 v1.8.16+
- Used for loading the
CUHK03
dataset from a MATLABmat
file.
- Used for loading the
The build is managed using CMake. In order to build this code, open a terminal and enter the following commands.
cd $THIS_REPOSITORY
mkdir build
cd build
cmake .. -DDLIB_DIR=$PATH_TO_DLIB -DGPU_ARCHITECTURE=sm_30
# ccmake . # Set BUILD_TEST to ON for unit testing. dlib flags can also be set here.
make && make install
The DLIB_DIR
variable informs CMake where it should look to find dlib. This must be defined as an environment variable or passed into CMake through -DDLIB_DIR
.
The optional variable GPU_ARCHITECTURE
specifies what compute capability the CUDA code should be built for. By default, this variable is set to sm_30
, i.e. a compute capability of 3.0. This flag is only valid if dlib detects CUDA (i.e. DLIB_USE_CUDA=ON
).
Global contrast normalization is applied to each image at the input layer.
- Each
5x5
convolutional layer, except for the "patch summary features" layer, has been replaced by two3x3
convolutional layers, with batch normalization after each. - Batch normalization was added after the fully connected layer.
- Minibatches consist of 128 image pairs, with an even split between positive and negative examples.
- No hard negative and data augmentation were used for training.
Below is a cumulative match curve (CMC) produced by the network implemented in this repository. The criteria uses the evaluation as described here (repository for Domain Guided Dropout for Person Re-ID).
Currently, only CUHK03
training and testing has been implemented (in cuhk03.cpp
).