Giter Site home page Giter Site logo

tinhtn1508 / top-dropblock Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rquispec/top-dropblock

0.0 1.0 0.0 2.14 MB

Official implementation of "Top Batch DropBlock for Person Re-Identification" ICPR 2020

License: MIT License

Python 99.98% Makefile 0.02%

top-dropblock's Introduction

https://arxiv.org/abs/2010.05435 PWC PWC PWC PWC

Top-DB-Net: Top DropBlock for Activation Enhancement in Person Re-Identification

This repository implements 'Top-DB-Net: Top DropBlock for Activation Enhancement in Person Re-Identification' presented at International Conference in Pattern Recognition (ICPR 2020)

Installation

Make sure your conda is installed.

# cd to your preferred directory and clone this repo
git clone https://github.com/RQuispeC/top-dropblock.git

# create environment
cd top-dropblock/
conda create --name topdropblock python=3.7
conda activate topdropblock

# install dependencies
# make sure `which python` and `which pip` point to the correct path
pip install -r requirements.txt

# install torch and torchvision (select the proper cuda version to suit your machine)
conda install pytorch torchvision cudatoolkit=9.0 -c pytorch

Train and Test

We made available config files for training and testing inside configs. For instance, to train Top-DBnet on Market-1501, run:

python main.py \
--config-file configs/im_top_bdnet_train_market1501.yaml \
--root $PATH_TO_DATA

To test Top-DBnet, update configs/im_top_bdnet_test.yaml with the dataset name and path to saved model:

model:
    load_weights: $PATH_TO_MODEL

test:
    rerank: False # Update this if you want to use re-ranking
    visrank: False # Update this if you want to visualize activation maps
    targets: ['cuhk03'] # Dataset name, e.g. ('cuhk03', 'market1501', 'dukemtmcreid')

Then do

python main.py \
--config-file configs/im_top_bdnet_test.yaml \
--root $PATH_TO_DATA

Trained models are available here

To output activations maps update visrankactivthr: True or visrankactiv: True on the config files.

drawing

Results

Dataset mAP Rank-1 mAP (RK) Rank-1 (RK)
Market1501 85.8 94.9 94.1 95.5
DukeMTMC-ReID 73.5 87.5 88.6 90.9
CUHK03(L) 75.4 79.4 88.5 86.7
CUHK03(D) 74.2 77.3 86.9 85.7

Citation

If you find this work useful to your research, please cite the following publication.

@article{quispe2020topdnet,
  title={Top-DB-Net: Top DropBlock for Activation Enhancement in Person Re-Identification},
  author={Quispe, Rodolfo and Pedrini, Helio},
  journal={25th International Conference on Pattern Recognition},
  year={2020}
}

This repo is based on deep-person-reid, for further questions regarding data setup and others take a look to their documentation.

News

  • Updated figure of architecture to match code implementation (refer to #4)

top-dropblock's People

Contributors

rquispec avatar

Watchers

James Cloos 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.