Git Product home page Git Product logo

crf_affinity's People

Contributors

dapengchen123 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

crf_affinity's Issues

test part

Is there no test part in the code? I only see the training part.And why did 'prec_score' always 0.00%

run script appears, many nans

Hello,
Thank you!!
Environment: Pytorch 0.4.1 Python3.5 CUDA 8.0 GPU: Taitan xp
Problem: trainers.py print('gallery scores') print(gallery_scores4)
appear: gallery scores
tensor([nan,nan,.....nan],
..............................)
RuntimeError: cudaEventSynchronize in future:: wait: device-side assert triggered, Last program crash
Please help me, thanks.

The dist_mat value is approximately equal to 0.25

Why I calculated dist_mat values near 0.25, whether or not the same person.But in the work, both local similarity and group similarity are assumed to be within the range(0, 1).The higher values the similarities are, the more likely the two images belong to a same person.

OUT OF MEMORY with MsEvaluator

Hi, Thanks for releasing the code.
To whomever is using this software, may you share the hardware environment you have when you run the standard_batch.sh?
The code I run is
CUDA_VISIBLE_DEVICES=0,1,2,3 python3 crfjointlossfpn.py -b 66 --epoch 43 --instances_num 6 --cnnlr 1e-2 --logs-dir logs/evaluate_feature-66-6

I have 4 Titan Xp GPUs, each of which has 12GB. I am using pytorch 0.4.
However, I always have out of memory error when evaluating.
It throws the error when extracting features using the ResNetFPN backbone as shown in the following messages.
The weird thing is CUDA_VISIBLE_DEVICES=0,1 or 0,1,2,3 both gave me the same error at the same place.

BTW, in the crfjointlossfpn.py file, from line 124-150, if I do not understand wrongly, the best model is selected based on test performance not the validation performance, which is a little bit disobeying what people normally do.

THCudaCheck FAIL file=/opt/conda/conda-bld/pytorch_1524584710464/work/aten/src/THC/generic/THCStorage.cu line=58 error=2 : out of memory
Traceback (most recent call last):
File "crfjointlossfpn.py", line 217, in
main(parser.parse_args())
File "crfjointlossfpn.py", line 125, in main
top1 = evaluator.evaluate(query_loader, gallery_loader, dataset.query, dataset.gallery)
File "/home/test/Development/PersonReID/crf_affinity/reid/evaluator/msevaluator.py", line 140, in evaluate
distmat = self.compute_distmat(queryloader, galleryloader)
File "/home/test/Development/PersonReID/crf_affinity/reid/evaluator/msevaluator.py", line 192, in compute_distmat
queryfeat1, queryfeat2, queryfeat3 = self.extractfeature(queryloader)
File "/home/test/Development/PersonReID/crf_affinity/reid/evaluator/msevaluator.py", line 114, in extractfeature
query_feat1, query_feat2, query_feat3 = self.cnnmodel(imgs)
File "/home/test/miniconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/test/miniconda3/lib/python3.6/site-packages/torch/nn/parallel/data_parallel.py", line 114, in forward
outputs = self.parallel_apply(replicas, inputs, kwargs)
File "/home/test/miniconda3/lib/python3.6/site-packages/torch/nn/parallel/data_parallel.py", line 124, in parallel_apply
return parallel_apply(replicas, inputs, kwargs, self.device_ids[:len(replicas)])
File "/home/test/miniconda3/lib/python3.6/site-packages/torch/nn/parallel/parallel_apply.py", line 65, in parallel_apply
raise output
File "/home/test/miniconda3/lib/python3.6/site-packages/torch/nn/parallel/parallel_apply.py", line 41, in _worker
output = module(*input, **kwargs)
File "/home/test/miniconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/test/Development/PersonReID/crf_affinity/reid/models/resfpnnet.py", line 117, in forward
x = module(x)
File "/home/test/miniconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/test/miniconda3/lib/python3.6/site-packages/torch/nn/modules/container.py", line 91, in forward
input = module(input)
File "/home/test/miniconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/test/miniconda3/lib/python3.6/site-packages/torchvision-0.2.1-py3.6.egg/torchvision/models/resnet.py", line 84, in forward
File "/home/test/miniconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/test/miniconda3/lib/python3.6/site-packages/torch/nn/modules/conv.py", line 301, in forward
self.padding, self.dilation, self.groups)
RuntimeError: cuda runtime error (2) : out of memory at /opt/conda/conda-bld/pytorch_1524584710464/work/aten/src/THC/generic/THCStorage.cu:58

model selection based on test accuracy!

Hi, @dapengchen123 , We see that the reported accuracy is based on the model validated on the test set(query_loader,gallery_loader), which is very confusing. If i understand correctly, it seems like you violate the training protocol for person reid task where the norm is to utilize the validation set(disjoint from the test set) for the model selection. Can you please update the issue regarding this.
This will be much appreciated. Thank you so much.

Computation of local similarities for two gallery images

Thanks for releasing your code and it runs smoothly!

There is some details in the implementation about the local similarities that I don't fully understand. As mentioned in your paper the local similarities are computed by the LS module (FC+BN ...) but I found in the code that local similarities between all pairs of gallery images are computed by naive Feature distance as:
https://github.com/dapengchen123/crf_affinity/blob/master/reid/train/trainers.py#L573-L588

And I don't get the meaning of 'gamma=3' term in the above code. Could you kindly give more explanations? Thx

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.