Code reproduce for paper "Vehicle Re-identification with Viewpoint-aware Metric Learning"

Related tags

Deep Learning VANET
Overview

VANET

Code reproduce for paper "Vehicle Re-identification with Viewpoint-aware Metric Learning"

Introduction

This is the implementation of article VANet "Vehicle Re-identification with Viewpoint-aware Metric Learning", which support both single-branch training and two branch training.

Implementation details

The whole implementation is based on PVEN project(https://github.com/silverbulletmdc/PVEN). The key code block added and modified are mainly distributed as follows:

For network construction:
    This project provide two version of backbone, namely 'googlenet' and 'resnet50' respectively. There the corresponding configuration files 
    as well as other corresponding code interfence are all provided completely.
    code location: vehicle_reid_pytorch/models/vanet.py

For training:
    This project provide two mode of training, namely 'single branch(baseline of VANet)' and 'two branch(VANet)' respectively
    code location: examples/parsing_reid/main_vanet_single_branch.py
    code location: examples/parsing_reid/main_vanet_two_branch.py

Configuration files:
    code location: examples/parsing_reid/configs/veri776_b64_baseline_vanet_single_branch_resnet.yml
    code location: examples/parsing_reid/configs/veri776_b64_baseline_vanet_two_branch_resnet.yml
    code location: examples/parsing_reid/configs/veri776_b64_baseline_vanet_two_branch_googlenet.yml

For loss calculation:
    code location: vehicle_reid_pytorch/loss/triplet_loss.py

For evaluation:
    mAP, cmc, ..., hist distribution figure drawing function are included.
    code location: examples/parsing_reid/math_tools.py

Results comparasion

We have achieved the following preformance by using the method this paper 'VANET' provided.

     -------------------------- -----------------------------------
                  |    mAP    |   rank-1  |   rank-5  |  rank-10  |
     --------------------------------- ----------------------------
      VANET+BOT   |   80.1%   |   96.5    |   98.5    |    99.4   | 
     --------------------------------------------------------------
      BOT(ours)   |   77.8%   |   95.3    |   97.8    |    98.8   |
     --------------------------------------------------------------
      BOT[1]      |   78.2%   |   95.5    |   97.9    |      *    |
     --------------------------------------------------------------

Note: The 'BOT', which means "bag of tricks" proposed by paper[2]. With respect to the two branch implementation of the above "VANET+BOT", we adopted the first 6 layers of the official resnet50 as the shared_conv network, the remaining two layers as the branch_conv network.There are also instructions in the corresponding code when you use.

Also, four type data's(similar-view_same-id, similar-view_different-id, different-view_different-id, different-view_same-id) distribution are drawn based on paper's aspect. note: this visualization code can be founded at examples/parsing_reid/math_tools.py

1. Get started

All the results are tested on VeRi-776 dstasets. Please reference to the environment implementation of other general reid projects, this project reference to fast-reid's.

2. Training

Reference to folder run_sh/run_main_XXX.sh Note: If you want to use your own dataset for training, remember to keep your data's structure be consistent with the veri776 dataloader's output in this project, reference to realted code for more details.

Example:

  sh ./run_sh/run_main_vanet_two_branch_resnet.sh

3. evaluation

Reference to folder run_sh/run_eval_XXX.sh Note: We have add 'drawing hist graph' function in evaluated stage, if you needn't this statistic operation temporarily, remember to shut down this function, for the operation is to some extent time-consuming, detail code block are located in examples/parsing_reid/math_tools.py.

Example:

  sh ./run_sh/run_eval_two_branch_resnet.sh

reference

[1] Khorramshahi, Pirazh, et al. "The devil is in the details: Self-supervised attention for vehicle re-identification." European Conference on Computer Vision. Springer, Cham, 2020.

[2] Luo, Hao, et al. "Bag of tricks and a strong baseline for deep person re-identification." Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops. 2019.

Contact

For any question, please file an issue or contact

Shichao Liu (Shanghai Em-Data Technology Co., Ltd.) [email protected]
You might also like...
Official codebase for "B-Pref: Benchmarking Preference-BasedReinforcement Learning" contains scripts to reproduce experiments.

B-Pref Official codebase for B-Pref: Benchmarking Preference-BasedReinforcement Learning contains scripts to reproduce experiments. Install conda env

Reproduce ResNet-v2(Identity Mappings in Deep Residual Networks) with MXNet
Reproduce ResNet-v2(Identity Mappings in Deep Residual Networks) with MXNet

Reproduce ResNet-v2 using MXNet Requirements Install MXNet on a machine with CUDA GPU, and it's better also installed with cuDNN v5 Please fix the ran

Reproduce partial features of DeePMD-kit using PyTorch.
Reproduce partial features of DeePMD-kit using PyTorch.

DeePMD-kit on PyTorch For better understand DeePMD-kit, we implement its partial features using PyTorch and expose interface consuing descriptors. Tec

In this repo we reproduce and extend results of Learning in High Dimension Always Amounts to Extrapolation by Balestriero et al. 2021
In this repo we reproduce and extend results of Learning in High Dimension Always Amounts to Extrapolation by Balestriero et al. 2021

In this repo we reproduce and extend results of Learning in High Dimension Always Amounts to Extrapolation by Balestriero et al. 2021. Balestriero et

The LaTeX and Python code for generating the paper, experiments' results and visualizations reported in each paper is available (whenever possible) in the paper's directory
The LaTeX and Python code for generating the paper, experiments' results and visualizations reported in each paper is available (whenever possible) in the paper's directory

This repository contains the software implementation of most algorithms used or developed in my research. The LaTeX and Python code for generating the

Inference code for "StylePeople: A Generative Model of Fullbody Human Avatars" paper. This code is for the part of the paper describing video-based avatars.

NeuralTextures This is repository with inference code for paper "StylePeople: A Generative Model of Fullbody Human Avatars" (CVPR21). This code is for

This is the official source code for SLATE. We provide the code for the model, the training code, and a dataset loader for the 3D Shapes dataset. This code is implemented in Pytorch.

SLATE This is the official source code for SLATE. We provide the code for the model, the training code and a dataset loader for the 3D Shapes dataset.

Code for paper ECCV 2020 paper: Who Left the Dogs Out? 3D Animal Reconstruction with Expectation Maximization in the Loop.
Code for paper ECCV 2020 paper: Who Left the Dogs Out? 3D Animal Reconstruction with Expectation Maximization in the Loop.

Who Left the Dogs Out? Evaluation and demo code for our ECCV 2020 paper: Who Left the Dogs Out? 3D Animal Reconstruction with Expectation Maximization

TensorFlow code for the neural network presented in the paper:
TensorFlow code for the neural network presented in the paper: "Structural Language Models of Code" (ICML'2020)

SLM: Structural Language Models of Code This is an official implementation of the model described in: "Structural Language Models of Code" [PDF] To ap

Owner
EMDATA-AILAB
EMDATA-AILAB
Code to reproduce experiments in the paper "Explainability Requires Interactivity".

Explainability Requires Interactivity This repository contains the code to train all custom models used in the paper Explainability Requires Interacti

Digital Health & Machine Learning 5 Apr 7, 2022
Code to reproduce the experiments from our NeurIPS 2021 paper " The Limitations of Large Width in Neural Networks: A Deep Gaussian Process Perspective"

Code To run: python runner.py new --save <SAVE_NAME> --data <PATH_TO_DATA_DIR> --dataset <DATASET> --model <model_name> [options] --n 1000 - train - t

Geoff Pleiss 5 Dec 12, 2022
Code to reproduce the results in the paper "Tensor Component Analysis for Interpreting the Latent Space of GANs".

Tensor Component Analysis for Interpreting the Latent Space of GANs [ paper | project page ] Code to reproduce the results in the paper "Tensor Compon

James Oldfield 4 Jun 17, 2022
The codes reproduce the figures and statistics in the paper, "Controlling for multiple covariates," by Mark Tygert.

The accompanying codes reproduce all figures and statistics presented in "Controlling for multiple covariates" by Mark Tygert. This repository also pr

Meta Research 1 Dec 2, 2021
Applications using the GTN library and code to reproduce experiments in "Differentiable Weighted Finite-State Transducers"

gtn_applications An applications library using GTN. Current examples include: Offline handwriting recognition Automatic speech recognition Installing

Facebook Research 68 Dec 29, 2022
This repo will contain code to reproduce and build upon understanding transfer learning

What is being transferred in transfer learning? This repo contains the code for the following paper: Behnam Neyshabur*, Hanie Sedghi*, Chiyuan Zhang*.

null 4 Jun 16, 2021
PyTorch Implementation of Fully Convolutional Networks. (Training code to reproduce the original result is available.)

pytorch-fcn PyTorch implementation of Fully Convolutional Networks. Requirements pytorch >= 0.2.0 torchvision >= 0.1.8 fcn >= 6.1.5 Pillow scipy tqdm

Kentaro Wada 1.6k Jan 7, 2023
Code to reproduce the results for Compositional Attention: Disentangling Search and Retrieval.

Compositional-Attention This repository contains the official implementation for the paper Compositional Attention: Disentangling Search and Retrieval

Sarthak Mittal 17 Oct 23, 2021
Source code and notebooks to reproduce experiments and benchmarks on Bias Faces in the Wild (BFW).

Face Recognition: Too Bias, or Not Too Bias? Robinson, Joseph P., Gennady Livitz, Yann Henon, Can Qin, Yun Fu, and Samson Timoner. "Face recognition:

Joseph P. Robinson 41 Dec 12, 2022
Code to reproduce the results for Statistically Robust Neural Network Classification, published in UAI 2021

Code to reproduce the results for Statistically Robust Neural Network Classification, published in UAI 2021

null 1 Jun 2, 2022