Giter Club home page Giter Club logo

aic2020_reid's Introduction

Implementation of Vehicle Re-Identification Based on Complementary Features for 2020 AICity Challenge Track2

This repository contains the source codes of vehicle Re-ID of our implementation for 2020 AICity Challenge, and we got 5-th place in the vehicle Re-ID track of AIC2020. Our paper

Dependencies

python 2.7 / python 3.6

pytorch 1.0 +

torchvision 0.2.1 +

metric_learn 0.5.0 +

cv2 3.0 + refer to our source codes for other dependencies

Datasets

Datasets used in our implementation are avialable at

Datasets Description Download link
Original train set CityFlow train set and Simulation Set by VehicleX link
Crop train set for cityflow CityFlow train set cropped by 2019 1st Baidu's detector link
All images with fake label test test CityFlow train set & test set(fake label) and Simulation Set by VehicleX link

Models

Notes: You can directly use our trained model and extracted features for implementation, the link is as follows:

Models Usage Description Download link
ImageNet pretrained models Train for global_model/pretrain_models link
ImageNet pretrained models Train for mgn_model/weights link
Vehicle ReID models trained by us Test contain four models checkpoint mentioned in our paper link
Features Usage Description Download link
Pkls for features Test features extracted by each model and performed by several post-processing link

Code Structure

Each part has its own README file.

  • global_model contains source codes of training vehicle reid models including se_resnext101, se_resnet152, resnet152, hrnet_48w, se_resnet152_ibnb, densenet161, dpn107, senet154 etc.

  • mgn_mode contains source codes of training vehicle reid models including resnet152 with MGN, resnet152 with SAC.

  • post_processing contains several post-processing methods for Re-ID task.

Running Code orderly

  1. Train each single model in global_model and mgn_model.

  2. Extract features for test set using each single model in global_model and mgn_model.

  3. Move all pkls of features to the same directory and utilize several post-processing methods to improve single model performence.

Detail steps to reproduce our result

Trainng

Train each single model in global_model and mgn_model.

see global_models/README.md and mgn_model/README.md for detailed training steps.

Testing

1 Download the vehicle ReID models trained by us from the google-drive(link).

2 unzip the downloaded file ckpt.tar in the current directory, and make a link in both global_model and mgn_model directory

3 download imagenet pretrained models(link) for global_model/pretrain_models and unzip in global_mddel directory

4 download imagenet pretrained models(link) for mgn_model/weights and unzip in mgn_mddel directory

5 enter global_model directory, modify query_path and gallery_path in extract_feature_val.sh

6 extract features using global models, the features will be saved in post_processing/val_pkl_final

sh extract_feature_val.sh

7 enter mgn_model directory, modify query_path and gallery_path in extract_feature_val.sh

8 extract features using mgn model, the features will be saved in post_processing/val_pkl_final

sh extract_feature_val.sh

9 enter post_processing directory , run

sh test_final.sh

you will get track2.txt which is the final result


Basic framework

  • The basic framework of our approach .
    image

  • Results generated by our method. image

aic2020_reid's People

Contributors

gggcy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.