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

Related tags

Deep LearningVANET
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]
Owner
EMDATA-AILAB
EMDATA-AILAB
Learned Initializations for Optimizing Coordinate-Based Neural Representations

Learned Initializations for Optimizing Coordinate-Based Neural Representations Project Page | Paper Matthew Tancik*1, Ben Mildenhall*1, Terrance Wang1

Matthew Tancik 127 Jan 03, 2023
The coda and data for "Measuring Fine-Grained Domain Relevance of Terms: A Hierarchical Core-Fringe Approach" (ACL '21)

We propose a hierarchical core-fringe learning framework to measure fine-grained domain relevance of terms – the degree that a term is relevant to a broad (e.g., computer science) or narrow (e.g., de

Jie Huang 14 Oct 21, 2022
Chess reinforcement learning by AlphaGo Zero methods.

About Chess reinforcement learning by AlphaGo Zero methods. This project is based on these main resources: DeepMind's Oct 19th publication: Mastering

Samuel 2k Dec 29, 2022
Implementation of EMNLP 2017 Paper "Natural Language Does Not Emerge 'Naturally' in Multi-Agent Dialog" using PyTorch and ParlAI

Language Emergence in Multi Agent Dialog Code for the Paper Natural Language Does Not Emerge 'Naturally' in Multi-Agent Dialog Satwik Kottur, José M.

Karan Desai 105 Nov 25, 2022
DirectVoxGO reconstructs a scene representation from a set of calibrated images capturing the scene.

DirectVoxGO reconstructs a scene representation from a set of calibrated images capturing the scene. We achieve NeRF-comparable novel-view synthesis quality with super-fast convergence.

sunset 709 Dec 31, 2022
Official repository for the paper, MidiBERT-Piano: Large-scale Pre-training for Symbolic Music Understanding.

MidiBERT-Piano Authors: Yi-Hui (Sophia) Chou, I-Chun (Bronwin) Chen Introduction This is the official repository for the paper, MidiBERT-Piano: Large-

137 Dec 15, 2022
Analyzing basic network responses to novel classes

novelty-detection Analyzing how AlexNet responds to novel classes with varying degrees of similarity to pretrained classes from ImageNet. If you find

Noam Eshed 34 Oct 02, 2022
How Effective is Incongruity? Implications for Code-mix Sarcasm Detection.

Code for the paper: How Effective is Incongruity? Implications for Code-mix Sarcasm Detection - ICON ACL 2021

2 Jun 05, 2022
Code for the paper "Unsupervised Contrastive Learning of Sound Event Representations", ICASSP 2021.

Unsupervised Contrastive Learning of Sound Event Representations This repository contains the code for the following paper. If you use this code or pa

Eduardo Fonseca 81 Dec 22, 2022
CT Based COVID 19 Diagnose by Image Processing and Deep Learning

This project proposed the deep learning and image processing method to undertake the diagnosis on 2D CT image and 3D CT volume.

1 Feb 08, 2022
alfred-py: A deep learning utility library for **human**

Alfred Alfred is command line tool for deep-learning usage. if you want split an video into image frames or combine frames into a single video, then a

JinTian 800 Jan 03, 2023
Cross-Modal Contrastive Learning for Text-to-Image Generation

Cross-Modal Contrastive Learning for Text-to-Image Generation This repository hosts the open source JAX implementation of XMC-GAN. Setup instructions

Google Research 94 Nov 12, 2022
Implementation of SiameseXML (ICML 2021)

SiameseXML Code for SiameseXML: Siamese networks meet extreme classifiers with 100M labels Best Practices for features creation Adding sub-words on to

Extreme Classification 35 Nov 06, 2022
Large Scale Fine-Grained Categorization and Domain-Specific Transfer Learning. CVPR 2018

Large Scale Fine-Grained Categorization and Domain-Specific Transfer Learning Tensorflow code and models for the paper: Large Scale Fine-Grained Categ

Yin Cui 187 Oct 01, 2022
Official Pytorch implementation of Scene Representation Networks: Continuous 3D-Structure-Aware Neural Scene Representations

Scene Representation Networks This is the official implementation of the NeurIPS submission "Scene Representation Networks: Continuous 3D-Structure-Aw

Vincent Sitzmann 365 Jan 06, 2023
Apply AnimeGAN-v2 across frames of a video clip

title emoji colorFrom colorTo sdk app_file pinned AnimeGAN-v2 For Videos 🔥 blue red gradio app.py false AnimeGAN-v2 For Videos Apply AnimeGAN-v2 acro

Nathan Raw 36 Oct 18, 2022
Just playing with getting VQGAN+CLIP running locally, rather than having to use colab.

Just playing with getting VQGAN+CLIP running locally, rather than having to use colab.

Nerdy Rodent 2.3k Jan 04, 2023
Contrastive Multi-View Representation Learning on Graphs

Contrastive Multi-View Representation Learning on Graphs This work introduces a self-supervised approach based on contrastive multi-view learning to l

Kaveh 208 Dec 23, 2022
CurriculumNet: Weakly Supervised Learning from Large-Scale Web Images

CurriculumNet Introduction This repo contains related code and models from the ECCV 2018 CurriculumNet paper. CurriculumNet is a new training strategy

156 Jul 04, 2022
Source code for the BMVC-2021 paper "SimReg: Regression as a Simple Yet Effective Tool for Self-supervised Knowledge Distillation".

SimReg: A Simple Regression Based Framework for Self-supervised Knowledge Distillation Source code for the paper "SimReg: Regression as a Simple Yet E

9 Oct 15, 2022