Giter Club home page Giter Club logo

mgn-pytorch's People

Contributors

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

mgn-pytorch's Issues

Have this paper released?

Thank you for your sharing. And I wonder if this paper have already released? I didn't find any relative informations on arxiv. Thank you again and waiting for your reply.

Test the model

Hi, seathiefwang.
Your work is good, but I have a problem. If I just want to test this model on cpu, how do I need to modify demo.sh?

re-ranking

你这是re-ranking之后的结果吗?

ValueError: zero-dimensional arrays cannot be concatenated

when I run sh demo.sh
[INFO] Making loss...
1.000 * CrossEntropy
1.000 * Triplet
[INFO] Epoch: 1 Learning rate: 2.00e-04

[INFO] Test:
Traceback (most recent call last):
File "main.py", line 22, in
trainer.test()
File "/media/data2/chenghj/RE-ID/MGN-pytorch-master/trainer.py", line 74, in test
dist = re_ranking(q_g_dist, q_q_dist, g_g_dist)
File "/media/data2/chenghj/RE-ID/MGN-pytorch-master/utils/re_ranking.py", line 44, in re_ranking
[np.concatenate([q_q_dist, q_g_dist], axis=1),
ValueError: zero-dimensional arrays cannot be concatenated

please tell me how to correct it . thanks!

new dataset with some problem

i run your code with new dataset(MSMT17),but it occured :
[INFO] Making model...
[INFO] Making loss...
1.000 * CrossEntropy
1.000 * Triplet
[INFO] Epoch: 1 Learning rate: 2.00e-04
[INFO] [1/160] 65/66 [CrossEntropy: 9.6161][Triplet: 3.0369][Total: 12.6529]Traceback (most recen
t call last):
File "main.py", line 20, in
trainer.train()
File "G:\code2\MGN-pytorch-master\trainer.py", line 50, in train
loss.backward()
File "D:\Anaconda3\lib\site-packages\torch\tensor.py", line 93, in backward
torch.autograd.backward(self, gradient, retain_graph, create_graph)
File "D:\Anaconda3\lib\site-packages\torch\autograd_init_.py", line 89, in backward
allow_unreachable=True) # allow_unreachable flag
RuntimeError: The expanded size of the tensor (1) must match the existing size (0) at non-singleton
dimension 0
how to solve it.

Is the model structure different from the original paper?

In your code, you use the global feature with 256d to do classification, and the paper said they use global features before reduction which is 2048d. Is that a mistake? or you did that for a reason?And by the way, in your code , you use adam with lr 0.0002 which is also different from the paper. Can you tell me why,? In my attemption , it seems like your setting is better than what the paper says.

about evaluation

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? @seathiefwang

跑模型时出现问题

您好,我在跑您的网络时出现了这种错误(我的环境是python3.5,pytorch 0.4.1)
File "main.py", line 20, in
trainer.train()
File "/opt/share0/luchen/MGN/MGN-pytorch-master/trainer.py", line 49, in train
loss = self.loss(outputs, labels)
File "/usr/local/lib/python3.5/dist-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/opt/share0/luchen/MGN/MGN-pytorch-master/loss/init.py", line 70, in forward
self.log[-1, i] += effective_loss.item()
RuntimeError: cuda runtime error (59) : device-side assert triggered at /pytorch/aten/src/THC/generic/THCStorage.c:36

辛苦您帮忙解答一下,谢谢!

experiment hyper-parameters

Hi~ can you reproduce the results with the proposed experiment hyper-parameters in this paper ?
example:
train 80 epoches with re_ranking, but just got 86.7% mAP, 91.8% rank-1.

the question of test code's extract_feature

hellow, the class Trainer's function, extract_feature, in trainer.py has a code,
for (inputs, labels) in loader:
ff = torch.FloatTensor(inputs.size(0), 2048).zero_()
for i in range(2):
if i==1:
inputs = self.fliphor(inputs)
input_img = inputs.to(self.device)
outputs = self.model(input_img)
f = outputs[0].data.cpu()
ff = ff + f
why the feature extraction outputs take twice, What's function of the second progress ,outputs = self.model(input_img)?

exit code 139 error

Thanks for your great job.
when i test your code in Market datasets using re-rangking , this error just happened , Do anyone meet the same question ?
Maybe the following reasons? but i am not sure.
1)memory is not enough , but is not possible ,cause i have lots of them
2)package version is not suitable , but according to the conda , the version is the latest
image
the code with red line should be the error code,
i really can not figure out why i meet this error.thanks

Query regarding y_score calculation

In MGN-pytorch/utils/functions.py file, while calculating the average precision score, I noticed you are taking negation of dist ( y_score = -distmat[i][indices[i]][valid] (line 107)).
In normal practice, we do not take negation of the score. Could you please help me in understanding it.

main.py error: argument --nThread: expected one argument

Hellow,
I used GX1080*1 8G and ran demo.sh. Got this problem:
usage: main.py [-h] [--nThread NTHREAD] [--cpu] [--nGPU NGPU]
[--datadir DATADIR] [--data_train DATA_TRAIN]
[--data_test DATA_TEST] [--reset] [--epochs EPOCHS]
[--test_every TEST_EVERY] [--batchid BATCHID]
[--batchimage BATCHIMAGE] [--batchtest BATCHTEST] [--test_only]
[--model MODEL] [--loss LOSS] [--act ACT] [--pool POOL]
[--feats FEATS] [--height HEIGHT] [--width WIDTH]
[--num_classes NUM_CLASSES] [--lr LR]
[--optimizer {SGD,ADAM,ADAMAX,RMSprop}] [--momentum MOMENTUM]
[--dampening DAMPENING] [--nesterov] [--beta1 BETA1]
[--beta2 BETA2] [--amsgrad] [--epsilon EPSILON] [--gamma GAMMA]
[--weight_decay WEIGHT_DECAY] [--decay_type DECAY_TYPE]
[--lr_decay LR_DECAY] [--margin MARGIN] [--re_rank]
[--random_erasing] [--probability PROBABILITY]
[--savedir SAVEDIR] [--outdir OUTDIR] [--resume RESUME]
[--save SAVE] [--load LOAD] [--save_models]
[--pre_train PRE_TRAIN]
main.py: error: argument --nThread: expected one argument

What can I do to solve it?

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.