Coder Social home page Coder Social logo

cnsuhao / person-search-with-natural-language-description Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shuangli59/person-search-with-natural-language-description

0.0 1.0 0.0 24 KB

Person Search with Natural Language Description

Lua 86.94% Python 13.06%

person-search-with-natural-language-description's Introduction

Person Search with Natural Language Description

This project aims at searching person using natural language description. Mainly based on our CVPR 2017 paper Person Search with Natural Language Description. The code is modified from the Neuraltalk2 written by Andrej Karpathy.

Installation

This code is written in Lua and requires Torch. See the Torch installation documentation for more details. To run this code, the following packages must be installed:

Data Preparation

  1. Request the dataset from sli [at] ee.cuhk.edu.hk or xiaotong [at] ee.cuhk.edu.hk (academic only).

  2. Save data into a json file that contains a list of image paths, person ID, and raw captions for each image, of the form:

[{"split": "train", "captions": ["A woman is wearing a gray shirt, a pair of brown pants and a pair of shoes.", "She is wearing a dark grey top and light colored pants."], "file_path": "train_query/p11600_s14885.jpg", "id": 11003}]

You can also directly download the json file and save it to "data/reid_raw.json"

  1. Run prepro_data.py as follows:

    python prepro_data.py --input_json data/reid_raw.json --images_root data/imgs --max_length 50 --word_count_threshold 2 --output_json data/reidtalk.json --output_h5 data/reidtalk.h5
    

Testing

  1. Download the pretrained model from snapshot.

  2. Run Retrieval.lua. The result should be around:

    top- 1 = 19.71%
    top- 5 = 43.20%
    top-10 = 55.24%

Training

  1. Download the VGG-16 network pre-trained model from model.

  2. Run train.lua.

Citation

@article{li2017person,
  title={Person search with natural language description},
  author={Li, Shuang and Xiao, Tong and Li, Hongsheng and Zhou, Bolei and Yue, Dayu and Wang, Xiaogang},
  journal={arXiv preprint arXiv:1702.05729},
  year={2017}
}

person-search-with-natural-language-description's People

Contributors

shuangli59 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.