This repository provides the Matlab code for Jointly Attentive Spatial-Temporal Pooling Networks for video-based person re-identification as presented in the paper 'Jointly Attentive Spatial-Temporal Pooling Networks for Video-based Person Re-Identification' (ICCV 2017). If you use this code, please cite the following paper:

@inproceedings{shuangjiejointly, title={Jointly Attentive Spatial-Temporal Pooling Networks for Video-based Person Re-Identification}, author={Shuangjie Xu, Yu Cheng, Kang Gu, Yang, Shiyu Chang and Pan Zhou}, booktitle={ICCV}, year={2017} }

Dependencies: The following libraries are required: nn, nnx, optim, cunn, cutorch, image, rnn, and inn. Ensure that you have Nvidia GPU support with CUDA enabled.

Data Preparation: Download and extract the dataset, then navigate to the data/ directory. The dataset is stored under data/iLIDS-VID. Modify and run the script data/computeOpticalFlow.m in Matlab to generate the optical flow features.