2016_person_re-ID

授权协议 MIT License
开发语言
所属分类 应用工具、 科研计算工具
软件类型 开源软件
地区 不详
投 递 者 隗俊誉
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

A Discriminatively Learned CNN Embedding for Person Re-identification

In this package, we provide our training and testing code written in Matconvnet for the paper [A Discriminatively Learned CNN Embedding for Person Re-identification] (https://arxiv.org/abs/1611.05666).

We also include matconvnet-beta23 which has been modified for our paper. All codes have been test on Ubuntu14.04 and Ubuntu16.04 with Matlab R2015b.

This code is ONLY released for academic use.

Resources

~What's new: We add the data preparation and evaluation codes for CUHK03.

~What's new: We make the code of model structure more easy to follow.

~What's new: We provide a better code for extract feature.

~What's new: We provide a faster evaluation code for Market-1501.

Installation

  1. Clone this repo

    git clone https://github.com/layumi/2016_person_re-ID.git
    cd 2016_person_re-ID
    mkdir data
  2. Download the pretrained model.

    This model is ONLY released for academic use.You can find the pretrained model in GoogleDriver or [BaiduYun] (https://pan.baidu.com/s/1miG2OpM). Download and put them into the ./data.

    BaiduYun sometime changes the link. If you find the url fail, you can contact me to update it.

  3. Compile matconvnet(Note that I have included my Matconvnet in this repo, so you do not need to download it again. I has changed some codes comparing with the original version. For example, one of the difference is in /matlab/+dagnn/@DagNN/initParams.m. If one layer has params, I will not initialize it again, especially for pretrained model.)

    You just need to uncomment and modify some lines in gpu_compile.m and run it in Matlab. Try it~(The code does not support cudnn 6.0. You may just turn off the Enablecudnn or try cudnn5.1)

    If you fail in compilation, you may refer to http://www.vlfeat.org/matconvnet/install/

Dataset

  • Download Market1501 Dataset. [Google] [Baidu] The photos are taken in Tsinghua University.

  • DukeMTMC-reID is a larger dataset in the same format of Market1501. The photos are taken in Duke University.You can download it from DukeMTMC-reID Dataset. We also upload the result to DukeMTMC-reID leaderboard.

  • If you want to rehearsal our result on CUHK03 Dataset, you can simply change the number of kernel from 751 to 1367 in resnet52_market.m and recreate net.mat. Because there are 751 IDs in Market-1501 while 1367 training identities are in CUHK03. More information can be found in cuhk03-prepare-eval dir. We add the data preparation and evaluation codes for CUHK03.

  • Training dataset for Oxford5k (http://cmp.felk.cvut.cz/cnnimageretrieval/)

Test

  1. Run test/test_gallery_query_crazy.m to extract the features of images in the gallery and query set. They will store in a .mat file. Then you can use it to do evaluation.
  2. Evaluate feature on the Market-1501. Run evaluation/zzd_evaluation_res_faster.m. You can get the following Single-query Result.
Methods               Rank@1 mAP
Ours* (SQ) 80.82% 62.30%
Ours* (MQ-avg) 86.67% 70.16%
Ours* (MQ-max) 86.76% 70.68%
Ours* (MQ-max+rerank) 86.67% 72.55%

*Note that the result is slightly higher than the result reported in our paper.

*For multi-query result, you can use evaluation/zzd_evaluation_res_fast.m . It is slower than evaluation/zzd_evaluation_res_faster.m since it need to extract extra features. (The evaluation code is modified from the Market-1501 Baseline Code)

FQA

  1. What is multi-query setting?

Actually, we can get a sequence of the query under one camera instead of one image. Then we can use every image in this sequence to extract a query mean feature (mean of feature extracted from several images).We call it multi-query. If we use this feature to do person retrieval, we usually get a better result.But it use additional images (in 'Market-1501/gt_bboxes'). You can find more detail in the original paper.

Train

  1. Add your dataset path into prepare_data.m and run it. Make sure the code outputs the right image path.

  2. Run train_id_net_res_2stream.m to have fun.

Citation

Please cite this paper in your publications if it helps your research:

@article{zheng2016discriminatively,
  title={A Discriminatively Learned CNN Embedding for Person Re-identification},
  author={Zheng, Zhedong and Zheng, Liang and Yang, Yi},
  doi={10.1145/3159171},
  note={\mbox{doi}:\url{10.1145/3159171}},
  journal={ACM Transactions on Multimedia Computing Communications and Applications},
  year={2017}
}

Acknowledge

Thanks for Xuanyi Dong to realize our paper in Caffe.

Thanks for Weihang Chen to realize our paper in Keras.

Thanks for Weihang Chen to report the bug in prepare_data.m.

Related Repos

  1. Person re-ID with GAN
  2. Pedestrian Alignment Network
 相关资料
  • 问题内容: 我有桌子 我还有一张桌子 我要插入两个远程怪物:一个被称为 “弓箭妖精” ,攻击距离为 10 ,另一个被称为 “龙” ,攻击距离为 50 。我怎样才能在一条指令中做到这一点? 到目前为止,我已经尝试过了: 最坏的方法 这很不好,因为name列允许重复,并且检索到的记录可能不止一次。。。也不得不两次写出怪物的名字似乎不是一个好习惯。 插入…返回 如果表仅具有的列(外键),那么我可以使用以

  • 问题内容: 对于这样的表: 什么是正确的一次查询插入以下操作: 给定用户,插入新记录并返回新记录。但是,如果已经存在,则只需返回。 我知道PostgreSQL 9.5中针对的新语法,但是鉴于我需要返回,因此我无法弄清楚它是否有帮助(如果有的话)。 似乎和不属于在一起。 问题答案: UPSERT的实现非常复杂,以确保不会发生并发写访问。看一下这个Postgres Wiki ,它在最初的开发过程中用作

  • 问题内容: 我有一个Audit类的表,我们根据其他表中的某些触发器存储一些信息。 ID,Changed_Column,OldValue,NewValue将可用。现在有可能使用相同的ID,因为更改后的列将具有不同的值,所以我希望将其重复3-4次,我想将它们合并到单行中并获取数据。例如, 现在,当我们选择它时,它将把所有行显示为separte,但是我想自行加入并通过基于ID值的合并来仅检索一条记录 预

  • 问题内容: 我正在将一个应用程序从IntelliJ IDEA部署到本地Tomcat服务器。我以为您部署的应用程序放置在文件夹中,但是并没有出现在该文件夹中。 这样对吗?它在哪里? 问题答案: 是的,如果您使用的是IntelliJ IDEA,则该应用程序不会在Tomcat 目录中打开。您的工件在目录中,例如: 这是IntelliJ创建的默认目录。 Tomcat配置位于其他文件夹中。我正在使用Wind

  • 问题内容: 当我在Eclipse中编辑Java类时,当光标悬停在类变量上时,我可以使用+ 弹出框来显示其所有父级和子类。IntelliJ中的等效项是什么? 例: 管道是我的光标。 问题答案: 导航| 但是,在“面板”中,“ 类型 +” 将显示类似的信息。您可以 浮动 和 取消 固定面板,以使其仅在使用键盘快捷键时才出现在固定的显示位置。

  • 问题内容: 如何使用IntelliJ IDEA计算Java代码行数? 问题答案: 该统计插件为我工作。 要从Intellij安装它: 文件-设置-插件-浏览存储库…在列表中找到它,然后双击它。 从以下位置打开统计信息窗口: 查看->工具窗口->统计