FastReIDJD AI Research笔记(一)paper部分

更新中。。。comming soon

  • github: JDAI-CV/fast-reid [link.]
  • paper: FastReID: A Pytorch Toolbox for General Instance Re-identification [link.]

paper笔记

简介

  • FastReID: A Pytorch Toolbox for General Instance Re-identification
  • FastReID是一个用于一般实例ReID的Pytorch工具箱。
  • FastReID具有模块化和可扩展性。
  • FastReID为训练、评估、微调和模型部署提供了一个完整的工具包。
  • FastReID提供了很多strong baselines。

    什么是baseline?
    baseline一词应该指的是对照组,基准线,就是你这个实验有提升,那么你的提升是对比于什么的提升,被对比的就是baseline。

  • 可以对系统配置进行管理。FastReID将training,testing写在YAML文件上。FastReID可以对backbone,head aggreation layer and lossfunction,and traning strategy这些组件作为可选选项。
  • 评价系统。FastReID提供了很多评价标准:ROC,mINP能更好的反映模型的性能。
  • FastReId提供知识蒸馏模块,将复杂模型得到更高效,轻量化模型。
  • FastReID提供了一个转换工具,如PyTorch→Caffe和PyTorch→TensorRT实现快速模型部署。
  • FastReID提供了先进的预训练模型包括person re-id,partial re-id, cross-domain re-id and vehicle re-id.(下文project部分会讲到这些模型)

结构


他的结构如图1。

各部分详解

以1.3.0版本详解
详解ReID的各部分组成及Trick——基于FastReID
1。3。0版本提供了以下的结合trick的baseline的模型

BoT:

Bag of Tricks and A Strong Baseline for Deep Person Re-identification. CVPRW2019, Oral.
文章中作者认为影响ReID效果很大程度上与trick相关,所以对影响ReID的trick做出了探究,并提出了一种Strong Baseline。


这个是说在baseline下添加这些trick对map的提升。

  • warmup是一种学习率优化方法,BoT学习率如图所示。Figure3(红色虚线部分)warmup有很多种,详细内容参考【调优方法】——warmup 黑白象
  • REA:随机擦除数据扩展(Random Erasing Augmentation)
  • LS:标签平滑(Label Smoothing)

AGW:

ReID-Survey with a Powerful AGW Baseline.

MGN:

Learning Discriminative Features with Multiple Granularities for Person Re-Identification

他们都是ResNet50作为backbone

SBS:

stronger baseline on top of BoT:

Bag of Freebies(BoF):

  1. Circle loss
  2. Freeze backbone training
  3. Cutout data augmentation & Auto Augmentation
  4. Cosine annealing learning rate decay
  5. Soft margin triplet loss

Bag of Specials(BoS):

  1. Non-local block
  2. GeM pooling

Projects

Person Re-identification 人员重识别

数据集: Market1501, DukeMTMC, MSMT17

Setting.
We use flipping, random erasing and auto-augment to process the training image.
The IBNResNet101 with a Non-local module is used as the backbone.
The gem pooling and bnneck are used as the head and
aggregation layer, respectively.
For the batch hard triplet loss function, one batch consists of 4 subjects, and each subject has 16 different images, and we use circle loss and triplet loss to train the whole network.
图片预处理:我们使用翻转,随机擦除和自动增强对训练图像的处理。
backbone:Non-local module(IBN-ResNet101)
Aggregation layer:gem pooling
Head:bnneck
loss function:circle loss和triplet loss
Result.
结果就是在上面三个数据集上和CVPR,ICCV,ECCV上的SOTA算法相比,比他们效果好。

Cross-domain Person Re-identification 跨域人员重识别

跨域人员再识别的目的是将经过标记的源域数据集训练的模型适应到没有标记的目标域数据集
进行标记。

Setting.
We propose a cross-domain method FastReID-MLT that adopts mixture label transport to learn pseudo
label by multi-granularity strategy.
We first train a model with a source-domain dataset and then finetune on the pre-trained model with pseudo labels of the target-domain dataset.
FastReID-MLT is implemented by ResNet50 backbone, gem pooling and bnneck head.
For the batch hard triplet loss function, one batch consists of 4 ubjects, and each subject has 16 different images, and we use circle loss and triplet loss to train the whole network.
FastReID-MLT通过多粒度策略采用混合标签运输来学习伪标签(pesudo label)。
先在源数据集训练模型,然后将预训练模型和目标数据集的伪标签进行整合。

伪标签(pseudo label):半监督学习的一种方法,先将没有标签的数据使用通过其他监督学习得到的模型给他打上伪标签。然后将这些伪标签数据集和打标签的数据集混在一起对模型进行训练。
FastReID-MLT网络结构见图7

backbone:ResNet50
Aggregation layer:gem pooling
Head:bnneck
loss function:circle loss和triplet loss
Result.
FastReID-MLT也SOTA了。

Partial Person Re-identification 有部分遮挡的行人的重识别

被跟踪目标有遮挡,并且只有少量的跟踪图像。

Setting.
FastReID-DSR网络结构见图8

Result.
FastReID-DSR也SOTA了。

Vehicle Re-identification 车辆重识别

数据集:VeRi,VehicleID and VERI-Wild.

Setting.
网络结构见图9

Result.
SOTA了

References

  • Distill:FastReID: 一个面向学术界和工业界的 ReID Toolbox。link.

代码

fast-reid的项目结构参考了PyTorch-Project-Template, 我之后也会记录一下PyTorch Project Template的结构笔记。 这个项目结构作者描述的很清晰,直接看就行。

先根据INSTALL.md准备好了运行环境后,查看GETTING_STARTED.md,执行

python3 tools/train_net.py --config-file ./configs/Market1501/bagtricks_R50.yml MODEL.DEVICE "cuda:0"

出现了段错误(核心已转储),也没有查到原因;
windows空跑没有报错,但也没任何反应。
后来继续看文档可能是没有数据集的原因。

然后开始看文档

  • datasets/README.md写了数据集的文件结构。
  • MODEL_ZOO.md写了fast-reid提供的模型和baseline还有训练好的模型的下载链接。
  • Docker可以不用

这时该项目的文件结构及使用已经差不多了解了。我先下载一个数据集和模型,再试试。

TODO:。。。

heroes never die!
原文地址:https://www.cnblogs.com/daiSir/p/15581319.html