重识别代码执行记录

网友投稿 287 2022-09-13

重识别代码执行记录

Person reid代码记录

reid-strong-baseline

代码地址:原始训练代码python3 tools/train.py --config_file='configs/softmax_triplet.yml' MODEL.DEVICE_ID "('your device id')" DATASETS.NAMES "('market1501')" OUTPUT_DIR "('your path to save checkpoints and logs')"# 我的代码python tools/train.py --config_file='configs/softmax_triplet_supermicro.yml' MODEL.DEVICE_ID "('0')" DATASETS.NAMES "('market1501')" OUTPUT_DIR "/mnt/data/scm/reid/reid-strong-baseline/logs/mark1501"id: 8571 0号卡

Duke训练,使用交叉熵损失、三元组损失和centerloss

python3 tools/train.py --config_file='configs/softmax_triplet_with_center.yml' MODEL.DEVICE_ID "('your device id')" DATASETS.NAMES "('dukemtmc')" OUTPUT_DIR "('your path to save checkpoints and logs')"python tools/train.py --config_file='configs/softmax_triplet_with_center_supermicro.yml' MODEL.DEVICE_ID "('0')" DATASETS.NAMES "('dukemtmc')" OUTPUT_DIR "('/mnt/data/scm/reid/reid-strong-baseline/logs/duke')"id: 8316 0号卡

reid代码执行流程

行人重识别的代码训练结束,代码保存在以下目录中

duke: /mnt/data/scm/reid/reid-strong-baseline/logs/dukemarket1501:/mnt/data/scm/reid/reid-strong-baseline/logs/mark1501

以下是原文的内容:

You can test your model’s performance directly by running these commands in ​​.sh​​files after your custom modification. You can also change the configuration to determine which feature of BNNeck is used and whether the feature is normalized (equivalent to use Cosine distance or Euclidean distance) for testing.

Please replace the data path of the model and set the ​​PRETRAIN_CHOICE​​ as ‘self’ to avoid time consuming on loading ImageNet pretrained model.

Test with Euclidean distance using feature before BN without re-ranking,.

python3 tools/test.py --config_file='configs/softmax_triplet_with_center.yml' MODEL.DEVICE_ID "('your device id')" DATASETS.NAMES "('market1501')" TEST.NECK_FEAT "('before')" TEST.FEAT_NORM "('no')" MODEL.PRETRAIN_CHOICE "('self')" TEST.WEIGHT "('your path to trained checkpoints')"# 自己的测试代码CUDA_VISIBLE_DEVICES=1 python tools/test.py --config_file='configs/softmax_triplet_supermicro.yml' MODEL.DEVICE_ID "('0')" DATASETS.NAMES "('market1501')" TEST.NECK_FEAT "('before')" TEST.FEAT_NORM "('no')" MODEL.PRETRAIN_CHOICE "('self')" TEST.WEIGHT "('/mnt/data/scm/reid/reid-strong-baseline/logs/mark1501/resnet50_model_120.pth')"# 虚拟环境 reidpython tools/test.py --config_file='configs/softmax_triplet_supermicro.yml' MODEL.DEVICE_ID "('0')" DATASETS.NAMES "('market1501')" TEST.NECK_FEAT "('before')" TEST.FEAT_NORM "('no')" MODEL.PRETRAIN_CHOICE "('self')" TEST.WEIGHT "('/mnt/data/scm/reid/reid-strong-baseline/logs/mark1501/resnet50_optimizer_120.pth')"成功执行!CUDA_VISIBLE_DEVICES=1 python tools/test.py --config_file='configs/softmax_triplet_supermicro.yml' MODEL.DEVICE_ID "('0')" DATASETS.NAMES "('market1501')" TEST.NECK_FEAT "('before')" TEST.FEAT_NORM "('no')" MODEL.PRETRAIN_CHOICE "('self')" TEST.WEIGHT "('/mnt/data/scm/reid/reid-strong-baseline/logs/mark1501/resnet50_model_120.pth')"CUDA_VISIBLE_DEVICES=1 python tools/test.py --config_file='configs/softmax_triplet_with_center_supermicro.yml' MODEL.DEVICE_ID "('0')" DATASETS.NAMES "('dukemtmc')" TEST.NECK_FEAT "('before')" TEST.FEAT_NORM "('no')" MODEL.PRETRAIN_CHOICE "('self')" TEST.WEIGHT "('/mnt/data/scm/reid/reid-strong-baseline/logs/duke/resnet50_model_120.pth')"

Test with Cosine distance using feature after BN without re-ranking,.

python3 tools/test.py --config_file='configs/softmax_triplet_with_center.yml' MODEL.DEVICE_ID "('your device id')" DATASETS.NAMES "('market1501')" TEST.NECK_FEAT "('after')" TEST.FEAT_NORM "('yes')" MODEL.PRETRAIN_CHOICE "('self')" TEST.WEIGHT "('your path to trained checkpoints')"

Test with Cosine distance using feature after BN with re-ranking

python3 tools/test.py --config_file='configs/softmax_triplet_with_center.yml' MODEL.DEVICE_ID "('your device id')" DATASETS.NAMES "('dukemtmc')" TEST.NECK_FEAT "('after')" TEST.FEAT_NORM "('yes')" MODEL.PRETRAIN_CHOICE "('self')" TEST.RE_RANKING "('yes')" TEST.WEIGHT "('your path to trained checkpoints')"

车辆重识别基线

​​https://github.com/DTennant/reid_baseline_with_syncbn​​

代码运行

由于服务器的卡比较少,这里只测试一个GPU下的效果,首先要进行编译,环境还是使用reid

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:使用windows命令行能做哪些趣事
下一篇:微信派:新冠疫苗接种,微信里这样约!
相关文章

 发表评论

暂时没有评论,来抢沙发吧~