ReID阅读笔记

ViT ReID算法和OS_Net算法

#ViT_reid建模
#代码地址:
https://github.com/damo-cv/TransReID

#创建conda虚拟环境
conda create -n tran_reid python=3.5

#conda激活虚拟环境
conda activate tran_reid

#安装所有环境
pip install -r requirements.txt

#所需数据集
[Market-1501](https://drive.google.com/file/d/0B8-rUzbwVRk0c054eEozWG9COHM/view),
[MSMT17](https://arxiv.org/abs/1711.08565),
[DukeMTMC-reID](https://arxiv.org/abs/1609.01775),
[Occluded-Duke](https://github.com/lightas/Occluded-DukeMTMC-Dataset), and the vehicle datasets [VehicleID](https://www.pkuml.org/resources/pku-vehicleid.html),
[VeRi-776](https://github.com/JDAI-CV/VeRidataset)

#预训练模型
[ViT-Base](https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-vitjx/jx_vit_base_p16_224-80ecf9dd.pth),
[ViT-Small](https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-weights/vit_small_p16_224-15ec54c9.pth),
[DeiT-Small](https://dl.fbaipublicfiles.com/deit/deit_small_distilled_patch16_224-649709d9.pth),
[DeiT-Base](https://dl.fbaipublicfiles.com/deit/deit_base_distilled_patch16_224-df68dfff.pth)

#下载预训练模型
#后台下载
nohup wget https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-vitjx/jx_vit_base_p16_224-80ecf9dd.pth > log.out 2>& 1&

#遇到问题
ImportError: cannot import name 'container_abcs' from 'torch._six'
#解决方案
1.8以下版本使用 from torch._six import container_abcs;
1.8以上版本使用import collections.abc as container_abcs

#数据训练
python train.py --config_file configs/DukeMTMC/vit_base.yml MODEL.DEVICE_ID "('0')"
#后台训练
nohup python train.py --config_file configs/DukeMTMC/vit_base.yml MODEL.DEVICE_ID "('0,1')"> log.out 2>& 1&

#数据训练
nohup python train.py --config_file configs/DukeMTMC/vit_transreid_stride.yml MODEL.DEVICE_ID "('0,1')"> log.out 2>& 1&


#进行推理
python test.py --config_file configs/DukeMTMC/vit_transreid_stride.yml MODEL.DEVICE_ID "('0,1')" TEST.WEIGHT '../logs/duke_vit_transreid_stride/transformer_120.pth'


#拷贝OSNET地址
#代码地址
#https://github.com/mikel-brostrom/Yolov5_StrongSORT_OSNet
git clone https://github.com/mikel-brostrom/Yolov5_StrongSORT_OSNet.git

#创建osnet_reid虚拟环境
conda create -n osnet_reid python=3.8

#激活虚拟环境
conda activate osnet_reid

#安装必要文件
pip install -r requirements.txt

#对人进行追踪
python track.py --source 0 --yolo-weights yolov5/weights/crowdhuman_yolov5m.pt --classes 0 # tracks persons, only

#重新下载代码
git clone --recurse-submodules https://github.com/mikel-brostrom/Yolov5_StrongSORT_OSNet.git


#程序运行遇到问题
解决方案:https://www.nhooo.com/note/qa377j.html

论文解读:

ECCV2020 ReID文章阅读 - 知乎 (zhihu.com)

2021 ICCV person re-identification(行人重识别)论文总结 part2 - 知乎 (zhihu.com)

视频行人重识别:Spatio-Temporal Representation Factorization for Video-based Person Re-Identification - 知乎 (zhihu.com)

  • 9
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Transformer REID是指在人物重识别(Person Re-Identification,简称ReID)领域中使用Transformer模型进行特征提取和匹配的方法。Transformer是一种基于自注意力机制的神经网络模型,它在自然语言处理领域取得了巨大成功,近年来也被应用于计算机视觉任务中,包括人物重识别。 在Transformer REID中,通过将图像输入Transformer模型,将图像的特征嵌入到一个高维向量空间中。这个向量表示了图像中的人物特征,例如外貌、姿态等。通过计算不同图像之间的向量距离,可以进行人物的匹配和检索。 Transformer REID的优势在于能够捕捉到图像中的全局关系和上下文信息,从而提高人物重识别的准确性和鲁棒性。通过利用Transformer模型的自注意力机制,可以有效地建模图像中的长距离依赖关系,并且能够自适应地学习不同特征之间的关联。 参考文献: TransReID Transformer在ReID领域的第一次全面探索!为更好的利用ReID的数据特性与Transformer的信息嵌入特征,本文提出了两种模块改进SIE与JPM,将ReID的提升到了新的高度。 后台回复:Transformer综述,即可下载两个最新的视觉Transformer综述PDF,肝起来!<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* *3* [Transformer再下一城!ReID各项任务全面领先,阿里&浙大提出TransReID](https://blog.csdn.net/amusi1994/article/details/113787801)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 100%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值