GithubHelp home page GithubHelp logo

mgn-reid's Introduction

Mutiple Granularity Network(MGN)-ReId

Reproduction of paper:Learning Discriminative Features with Multiple Granularitiesfor Person Re-Identification

The architecture of MGN

The architecture of MGN

Composition

MGN based on Tensorflow:

  • export_pb.py : export tensorflow pb file;
  • export_pb_with_pre _post.py : export tensorflow pb file containing preprocess and postprocess;
  • export_tf_serving_model.py : export the tensorflow serving model from tensorflow pb;
  • export_tf_serving_with_pre_post.py : export the tensorflow serving model containing preprocess and postprocess from tensorflow pb;

Train

  • Download dataset Market1501
  • Parameter initialization using the pytorch model which is trained by seathiefwang(Optional);
  • Set training parameters and training paths in train.py and start training;

Inference

The architecture of MGN export_pb_with_pre _post.py and export_tf_serving_with_pre_post.py pack these operations into the model.

result

Results without re-ranking on Market-1501

map rank@1 rank@3 rank@5 rank@10
0.874288 0.947150 0.975653 0.984857 0.990499

Reference

https://github.com/seathiefwang/MGN-pytorch

https://github.com/lwplw/reid-mgn

@ARTICLE{2018arXiv180401438W,
    author = {{Wang}, G. and {Yuan}, Y. and {Chen}, X. and {Li}, J. and {Zhou}, X.},
    title = "{Learning Discriminative Features with Multiple Granularities for Person Re-Identification}",
    journal = {ArXiv e-prints},
    archivePrefix = "arXiv",
    eprint = {1804.01438},
    primaryClass = "cs.CV",
    keywords = {Computer Science - Computer Vision and Pattern Recognition},
    year = 2018,
    month = apr,
    adsurl = {http://adsabs.harvard.edu/abs/2018arXiv180401438W},
    adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

mgn-reid's People

Contributors

joehammer934 avatar

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

Watchers

 avatar  avatar

mgn-reid's Issues

Tensorflow Version

Can you please tell me which tensorflow version you are using in this code?

inference

During evaluation, we both extractthe features corresponding to original images and the horizontallyflipped versions, then use the average of these as the final features.What are the benefits of doing this? @joehammer934

About Tensorflow and CUDA, GPU

Hi, I run your train,py code with Tensorflow1.14 and CUDA10.0 version, and got the issue:
`2019-10-17 14:47:22.499384: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1763] Adding visible gpu devices: 0
2019-10-17 14:47:28.415586: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1181] Device interconnect StreamExecutor with strength 1 edge matrix:
2019-10-17 14:47:28.415647: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1187] 0
2019-10-17 14:47:28.415662: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1200] 0: N
2019-10-17 14:47:28.418205: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1326] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 10440 MB memory) -> physical GPU (device: 0, name: TITAN V, pci bus id: 0000:42:00.0, compute capability: 7.0)
2019-10-17 14:47:37.414226: F ./tensorflow/core/kernels/random_op_gpu.h:227] Non-OK-status: CudaLaunchKernel(FillPhiloxRandomKernelLaunch, num_blocks, block_size, 0, d.stream(), gen, data, size, dist) status: Internal: invalid configuration argument

Process finished with exit code 134 (interrupted by signal 6: SIGABRT)`

I am not sure if it is the code or the tensorflow bug, could you please give me some advices ?

池化问题

原始论文在分支层使用的是全局maxpool,博主代码中用的是全局avgpool,想问一下博主是不是实测这样效果更好

KeyError: 'reduction_0.2.weight'

Hi, I run your train.py code with the model named "model_best.pt" to train and got the issue
Traceback (most recent call last):

  File "G:/shenda/project/juesai/MGN-ReId/train.py", line 251, in <module>
    train()
  File "G:/shenda/project/juesai/MGN-ReId/train.py", line 166, in train
    pt_name_path)
  File "G:/shenda/project/juesai/MGN-ReId/train.py", line 97, in restore_model_v2
    value = pt_dict[tf2pt[str(var)]].numpy()
KeyError: 'reduction_0.2.weight'

Maybe I dont't have the pre train model, Could you provide the ptr-train model?
thanks!!

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.