Giter Site home page Giter Site logo

reid-pcb_rpp's Introduction

ReID-PCB_RPP

This repository tries to implement the paper:Beyond Part Models: Person Retrieval with Refined Part Pooling and I almost follow the training details at the origin paper.

Market-1501 Results

  • The result of PCB is little higher than paper.
  • The result of PCB+RPP is little lower than paper.
  • I think if we do more augmentation with the training data, the performance will be better.
Feature mAP(%) Rank-1(%)
PCB(paper) G 77.4 92.3
PCB(paper) H 77.3 92.4
PCB(ours) G 78.6 92.7
PCB(ours) H 78.5 92.1
PCB+RPP(paper) G 81.6 93.8
PCB+RPP(paper) H 81.0 93.1
PCB+RPP(ours) G 80.7 92.8
PCB+RPP(ours) H 79.8 92.4

Prerequisites

  • Python 2.7 or 3.5
  • Pytorch 0.4
  • GPU Memory

Getting started

Dataset

  • Dwonload Market1501 Dataset and extract the files to the current folder
  • Change the download_path in the prepare.py and run python prepare.py to prepare the dataset

Train

Train the model:

python train.py --gpu_ids 0,1 --batchsize 64 --data_dir your_data_path --save_dir your_model_save_path --RPP True
  • --gpu_ids: single GPU or mutil-GPUs
  • --batchsize: batch size
  • --data_dir: the path of the preparing data
  • --save_dir: the path to save the training model
  • --RPP: whether to train with RPP I train the model on the two GPUs with 64 batchsize

Test

Test the model(extract the features):

python test.py --gpu_ids 0 --which_epoch select the model --stage PCB or full --RPP True or False --feature_H True or False
  • --gpu_ids: just single GPU
  • --which_epoch: select the i-th model
  • --stage: select the training model : PCB or full(PCB+RPP)
  • --RPP: if you choose the PCB model, RPP to False; if you choose the full model, RPP to True
  • --feature_H: whether to extract the low-dims features

Evaluate

Evaluate the model

  • Evaluate on GPU:
python evaluate_gpu.py --gpu_ids 0 --reslut_mat the path of  the features mat
  • Evaluate on CPU:
python evaluate_gpu.py --reslut_mat the path of  the features mat

Reference resources

Thanks to the layumi/Person_reID_baseline_pytorch. This repository only implements the part of PCB, I make some modifications on it and then add the RPP part.

reid-pcb_rpp's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

reid-pcb_rpp's Issues

Errors accur when running test.py

File "test.py", line 157, in
model = load_network(model_structure)
File "test.py", line 80, in load_network
network.load_state_dict(torch.load(save_path))
File "/home/lingck/.local/lib/python3.7/site-packages/torch/nn/modules/module.py", line 777, in load_state_dict
self.class.name, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for PCB:
Missing key(s) in state_dict: "avgpool.add_block.0.weight", "avgpool.norm_block.0.weight", "avgpool.norm_block.0.bias", "avgpool.norm_block.0.running_mean", "avgpool.norm_block.0.running_var".

train loss equals 0.0000 ,what is the problem?

when i train the model, only change the dataset path of Market-1501, the train loss equals 0.0000 ,what is the problem? thanks for your answer.

{'train': 12936, 'val': 19732} ['bounding_box_train']
Epoch 0/59

train Loss: 0.0000 Acc: 1.0000

Epoch 1/59

train Loss: 0.0000 Acc: 1.0000

Epoch 2/59

--RPP True 出错

您好,我运行您的代码出现了下面这个问题
为什么我使用这个--RPP True 命令的时候,提示True是无效?
error: unrecognized arguments: True
不使用--RPP True程序运行正常
请问这是什么问题?

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.