Home

Awesome

PyTorch Implementation of KPRN

Introduction

This repository is Pytorch implementation of Knowledge-guided Pairwise Reconstruction Network for Weakly Supervised Referring Expression Grounding in ACM MM 2019. Check our paper for more details.

Prerequisites

Installation

  1. Please refer to MattNet to install mask-faster-rcnn, REFER and refer-parser2. Follow Step 1 & 2 in Training to prepare the data and features.

  2. Calculate semantic similarity as supervision infotmation.

cache/word_embedding/download_embed_matrix.sh
python tools/prepro_sub_obj_wds.py --dataset ${DATASET} --splitBy ${SPLITBY}
python tools/prepro_sim.py --dataset ${DATASET} --splitBy ${SPLITBY}

Training

Train KPRN with ground-truth annotation:

CUDA_VISIBLE_DEVICES=${GPU_ID} python ./tools/train.py --dataset ${DATASET} --splitBy ${SPLITBY} --exp_id ${EXP_ID} --sub_filter_type ${SUBJECT_FILTER_TYPE} --sub_filter_thr ${SUBJECT_FILTER_THRESHOLD}

Evaluation

Evaluate KPRN with ground-truth annotation:

CUDA_VISIBLE_DEVICES=${GPU_ID} python ./tools/eval.py --dataset ${DATASET} --splitBy ${SPLITBY} --split ${SPLIT} --id ${EXP_ID}

Citation

@inproceedings{lxj2019kprn,
  title={Knowledge-guided Pairwise Reconstruction Network for Weakly Supervised Referring Expression Grounding},
  author={Xuejing Liu, Liang Li, Shuhui Wang, Zheng-Jun Zha, Li Su, and Qingming Huang},
  booktitle={ACM MM},
  year={2019}
}

Acknowledgement

Thanks for the work of Licheng Yu. Our code is based on the implementation of MattNet.

Authorship

This project is maintained by Xuejing Liu.