Coder Social home page Coder Social logo

levyfan / reid-mgn Goto Github PK

View Code? Open in Web Editor NEW
153.0 9.0 50.0 487 KB

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

License: MIT License

Python 100.00%
computer-vision pattern-recognition person-reidentification person-reid pytorch

reid-mgn's People

Contributors

levyfan 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  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  avatar  avatar  avatar

reid-mgn's Issues

RuntimeError: dimension out of range (expected to be in range of [-1, 0], but got 1)

how can I solve the problem?????

(pytorch-mgn) [xxx@localhost reid-mgn]$ python mgn/mgn.py
cuda

Namespace(model='mgn', root='/home/xiaozhenzhen/data/reid-mgn/mgn/../Market-1501-v15.09.15', workers=28.0)

Traceback (most recent call last):
File "mgn/mgn.py", line 313, in
run()
File "mgn/mgn.py", line 257, in run
mgn = MGN(num_classes=len(train_dataset.unique_ids)).to(DEVICE)
File "mgn/mgn.py", line 115, in init
self.fc_id_2048_0 = nn.Linear(2048, num_classes)
File "/home/xiaozhenzhen/anaconda2/envs/pytorch-mgn/lib/python3.6/site-packages/torch/nn/modules/linear.py", line 46, in init
self.reset_parameters()
File "/home/xiaozhenzhen/anaconda2/envs/pytorch-mgn/lib/python3.6/site-packages/torch/nn/modules/linear.py", line 49, in reset_parameters
stdv = 1. / math.sqrt(self.weight.size(1))
RuntimeError: dimension out of range (expected to be in range of [-1, 0], but got 1)

ImportError: No module named 'mock'

非常感谢您的复现,让我重新认识了这篇论文。有一个问题,我在运行的过程中表示并没有mock这个文件,这个mock的文件出现在train_market1501.py文件的第6行。希望您有空的时候可以帮助我解答,我将不胜感激~~

baseline

i also try this, the result is very bad.

do you try table 5 in paper? I try, but the result of table 5 the first line only 68, far away to 87.5....

TypeError: to() received an invalid combination of arguments - got (device), but expected one of: * (torch.device device, torch.dtype dtype) * (torch.dtype dtype) didn't match because some of the arguments have invalid types: (device) * (Tensor other) didn't match because some of the arguments have invalid types: (device)

When I carried out the project I got this promblem:
Traceback (most recent call last):
File "/home/bruce/mgn/mgn/mgn.py", line 300, in
run()
File "/home/bruce/mgn/mgn/mgn.py", line 243, in run
mgn = MGN(num_classes=len(train_dataset.unique_ids)).to(DEVICE)
File "/home/bruce/.conda/envs/snowflake/lib/python3.6/site-packages/torch/nn/modules/module.py", line 393, in to
return self._apply(lambda t: t.to(device))
File "/home/bruce/.conda/envs/snowflake/lib/python3.6/site-packages/torch/nn/modules/module.py", line 176, in _apply
module._apply(fn)
File "/home/bruce/.conda/envs/snowflake/lib/python3.6/site-packages/torch/nn/modules/module.py", line 176, in _apply
module._apply(fn)
File "/home/bruce/.conda/envs/snowflake/lib/python3.6/site-packages/torch/nn/modules/module.py", line 182, in _apply
param.data = fn(param.data)
File "/home/bruce/.conda/envs/snowflake/lib/python3.6/site-packages/torch/nn/modules/module.py", line 393, in
return self._apply(lambda t: t.to(device))
TypeError: to() received an invalid combination of arguments - got (device), but expected one of:

  • (torch.device device, torch.dtype dtype)
  • (torch.dtype dtype)
    didn't match because some of the arguments have invalid types: (device)
  • (Tensor other)
    didn't match because some of the arguments have invalid types: (device)
    What can I do to solve it?

What about the progress?

Hi, I have been working on this for few weeks and unfortunately, I still can't reproduce the result with the setting presented in the paper. how about your latest progress?

RuntimeError: cuda runtime error (2) : out of memory at /pytorch/aten/src/THC/THCTensorRandom.cu:25

I also met the issue:
RuntimeError: cuda runtime error (2) : out of memory at /pytorch/aten/src/THC/THCTensorRandom.cu:25

the details:
(pytorch-mgn) [xxx@localhost mgn]$ python mgn.py
cuda

Namespace(model='mgn', root='/home/xiaozhenzhen/data/reid-mgn/mgn/dataset/Market-1501-v15.09.15', workers=28.0)

THCudaCheck FAIL file=/pytorch/aten/src/THC/THCTensorRandom.cu line=25 error=2 : out of memory
Traceback (most recent call last):
File "mgn.py", line 314, in
run()
File "mgn.py", line 258, in run
mgn = MGN(num_classes=len(train_dataset.unique_ids)).to(DEVICE)
File "/home/xiaozhenzhen/anaconda2/envs/pytorch-mgn/lib/python3.6/site-packages/torch/nn/modules/module.py", line 393, in to
return self._apply(lambda t: t.to(device))
File "/home/xiaozhenzhen/anaconda2/envs/pytorch-mgn/lib/python3.6/site-packages/torch/nn/modules/module.py", line 176, in _apply
module._apply(fn)
File "/home/xiaozhenzhen/anaconda2/envs/pytorch-mgn/lib/python3.6/site-packages/torch/nn/modules/module.py", line 176, in _apply
module._apply(fn)
File "/home/xiaozhenzhen/anaconda2/envs/pytorch-mgn/lib/python3.6/site-packages/torch/nn/modules/module.py", line 182, in _apply
param.data = fn(param.data)
File "/home/xiaozhenzhen/anaconda2/envs/pytorch-mgn/lib/python3.6/site-packages/torch/nn/modules/module.py", line 393, in
return self._apply(lambda t: t.to(device))
File "/home/xiaozhenzhen/anaconda2/envs/pytorch-mgn/lib/python3.6/site-packages/torch/cuda/init.py", line 161, in _lazy_init
torch._C._cuda_init()
RuntimeError: cuda runtime error (2) : out of memory at /pytorch/aten/src/THC/THCTensorRandom.cu:25

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.