Giter VIP home page Giter VIP logo

apelearning's Introduction

APE Learning for Person Re-identification

Installation

pytorch
ignite=0.1.2
yacs

Data

We use GMS and APE learning on three Re-ID datasets:
Market1501
DukeMTMC
CUHK03

Evaluation

The evaluation criteria Market1501 and DukeMTMC are provided by the baseline.
We use the new training/test protocal for CUHK03 (CUHK03-NP), which can calculate mAP and CMC similar to the above two datasets.

Train

You can run the ./*.sh files according to the different datasets directly or run these codes in the .sh files as follows:

  1. Market1501
    APE Loss
python3 tools/train.py --config_file='configs/APE_Learning.yml'  OUTPUT_DIR "/data/Checkpoints/ReID_Strong_BL/Market1501" LOG_NAME "log_test.txt" OURS.ALPHA "20.0" OURS.BETA "0.5" MODEL.DEVICE_ID "'0'" MODEL.ADJUST_LR "off"   MODEL.METRIC_LOSS_TYPE "ours" DATALOADER.SAMPLER "ours" MODEL.NECK "APE" DATASETS.NAMES "'market1501'"  INPUT.RE_PROB "0.7"  MODEL.LAST_STRIDE "1" DATALOADER.NUM_INSTANCE "8" SOLVER.BASE_LR "3.5e-4" SOLVER.WARMUP_ITERS "0" MODEL.IF_TRIPLET "no"
  1. DukeMTMC
    APE Loss
python3 tools/train.py --config_file='configs/APE_Learning.yml' OUTPUT_DIR "/data/Checkpoints/ReID_Strong_BL/Duke" LOG_NAME "log_test.txt" OURS.ALPHA "18.0" OURS.BETA "0.5" MODEL.DEVICE_ID "'1'" MODEL.ADJUST_LR "off" MODEL.METRIC_LOSS_TYPE "ours" DATALOADER.SAMPLER "ours" MODEL.NECK "APE" DATASETS.NAMES "'dukemtmc'"  INPUT.RE_PROB "0.5"  MODEL.LAST_STRIDE "1" DATALOADER.NUM_INSTANCE "8" SOLVER.BASE_LR "3.5e-4" SOLVER.WARMUP_ITERS "0" MODEL.IF_TRIPLET "no"
  1. CUHK03-Detected
    APE Loss
python3 tools/train.py --config_file='configs/APE_Learning.yml' OUTPUT_DIR "/data/Checkpoints/ReID_Strong_BL/cuhk03" LOG_NAME "log_test.txt" OURS.ALPHA "8.0" OURS.BETA "0.5" MODEL.DEVICE_ID "'1'" MODEL.ADJUST_LR "off" MODEL.METRIC_LOSS_TYPE "ours" DATALOADER.SAMPLER "ours" MODEL.NECK "APE" DATASETS.NAMES "'cuhk03'"  INPUT.RE_PROB "0.5"  MODEL.LAST_STRIDE "1" DATALOADER.NUM_INSTANCE "8" SOLVER.BASE_LR "3.5e-4" SOLVER.WARMUP_ITERS "0" MODEL.IF_TRIPLET "no"
  1. Main Parameters in training
'--config_file': the base configuration file
OUTPUT_DIR: the output path to save model and log
LOG_NAME: the name of the output log
OURS.ALPHA: the hyper-parameter tn in Equation (21)
OURS.BETA: the hyper-parameter \alpha in Equation (21)
MODEL.DEVICE_ID: the gpu number to train the network
MODEL.ADJUST_LR: to determine how to adjust the learning rate
MODEL.METRIC_LOSS_TYPE: the type of loss
DATALOADER.SAMPLER: the sampling stategy
MODEL.NECK: the nect architecture of network ("APE", "bnneck", "no")
DATASETS.NAMES: the dataset
INPUT.RE_PROB: the probability of random erasing
MODEL.LAST_STRIDE: the stride of the last convolutional layer
DATALOADER.NUM_INSTANCE: the number of instance in a batch
SOLVER.BASE_LR: the base/initial learning rate
SOLVER.WARMUP_ITERS: controlling warmup of the learning rate ("0" means no warmup)
MODEL.IF_TRIPLET: "1" means training with the combination of APE loss and triplet loss; "0" means training with the individual APE loss

Notes

The codes are expanded on a Re-ID Strong Baseline. Thus, the baseline has some authors information, which are not belong to any author in our paper.

apelearning's People

Contributors

cv-anonymous avatar

Stargazers

Thor avatar  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.