mangye16 / cross-modal-re-id-baseline Goto Github PK
View Code? Open in Web Editor NEWPytorch Code for Cross-Modality Person Re-Identification (Visible Thermal/Infrared Re-ID)
License: MIT License
Pytorch Code for Cross-Modality Person Re-Identification (Visible Thermal/Infrared Re-ID)
License: MIT License
Hi, your work really inspires me and I have done a lot of work based on your code.
But today I find that the function 'eval_sysu' in eval_metric.py gives different results with the same model, and . I have not made any changes to this part of code, so it is absolutely identical with the original one in this repo.
I want to ask that have you met this problem before? I hope to get your reply soon, thanks!
When testing on RegDB, Rank-1, mAP, mINP seem right in the first round.
But in the next few rounds, the indexes are abnormally high.
So I checked test.py and found that the test_trial is changing in the testing process, which means that the train-test splitting is different from that of training process.
The images in the training process might be divided into test set if the train-test splitting changed, so the indexes are extremly high.
Is that right?
Hello,thanks for your work!
However, I met several errors (about the DataLoader) when running train.py:
Traceback (most recent call last):
File "train.py", line 382, in
train(epoch)
File "train.py", line 251, in train
for batch_idx, (input1, input2, label1, label2) in enumerate(trainloader):
TypeError: Caught TypeError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/home/cyhs/Cross-Modal-Re-ID-baseline/data_loader.py", line 29, in getitem
img1 = self.transform(img1)
File "/home/cyhs/anaconda3/envs/pytorchenv/lib/python3.6/site-packages/torchvision/transforms/transforms.py", line 61, in call
img = t(img)
File "/home/cyhs/anaconda3/envs/pytorchenv/lib/python3.6/site-packages/torchvision/transforms/transforms.py", line 172, in call
return F.to_pil_image(pic, self.mode)
File "/home/cyhs/anaconda3/envs/pytorchenv/lib/python3.6/site-packages/torchvision/transforms/functional.py", line 257, in to_pil_image
raise TypeError('Input type {} is not supported'.format(npimg.dtype))
TypeError: Input type bool is not supported
Waiting for your reply, thanks a lot!
hello!How do you implement it with pytorch?Can you open source the code of pytorch version?Thank you very much!!!
I have no RegDB Dataset,could you give me aprivate download link
Cross-Modal-Re-ID-baseline/train.py
Line 362 in 910c650
How to test RegDB in infrared to visible test mode?
@mangye16
Thanks for your code. Could you please provide the download link for RegDB dataset?
no checkpoint found at /home/../save_model/sysu_id_bn_relu_drop_0.0_lr_1.0e-02_dim_512_resnet50_epoch_60.t. Is this a problem in the training process?
Hi~
Is it the final version? Why only id loss can be found in train.py?
Cross-Modal-Re-ID-baseline/train.py
Line 362 in 910c650
I am a beginer in reid. When I use your code evalute model on sysu-mm01 dataset, i find 10 trial, does it mean the final result should be the average of 10 trials? And which one is the result on your paper, pool or fc?
Hi~
It is a nice job. The proposed WRT loss seems to be the improved version of the original Triplet loss. Did you carry out any ablation studies on the proposed AGW baseline for cross-modality visible-infrared Re-ID? If so, how much performance improved by the WRT comparing to the triplet?
Thanks
I don't have a GPU. Is there a CPU version of this weight of SYSU-MM01, thank you
Hello,thanks for your beautiful work!
but I get some error as follow in run your code:
"result = unpickler.load()
UnicodeDecodeError: 'ascii' codec can't decode byte 0xaf in position 0: ordinal not in range(128)"
maybe is beacause of python version,I use Python 3.6 and Pytorch 1.0.1(stable) with CUDA 10.
wait your reply,thanks
Is the number of images in the query smaller than the gallery? Thanks
Excuse me.
I ran the command python train.py --dataset sysu --lr 0.1 --method agw --gpu 1
and test on the best epoch(26, just the same as your best epoch), and got POOL: Rank-1: 49.60% | mAP: 49.08%
, it's a little better than the model you offered which written in your paper: POOL: Rank-1: 47.50% | mAP: 47.65%
However, when I observe the trainning log , I found the result of FC feature is better than POOL feature, while the test result is opposite:
In the training process:
Test Epoch: 26 POOL: Rank-1: 50.30% | Rank-5: 74.78% | Rank-10: 84.09%| Rank-20: 93.87%| mAP: 49.01%| mINP: 35.75% FC: Rank-1: 52.33% | Rank-5: 76.49% | Rank-10: 85.64%| Rank-20: 92.85%| mAP: 50.94%| mINP: 37.69%
In the testing process:
Test Trial: 0 POOL: Rank-1: 52.33% | Rank-5: 76.49% | Rank-10: 85.64%| Rank-20: 92.85%| mAP: 50.94%| mINP: 37.69% FC: Rank-1: 50.30% | Rank-5: 74.78% | Rank-10: 84.09%| Rank-20: 93.87%| mAP: 49.01%| mINP: 35.75%
Then I found you use the POOL performance as the FC output in test.py:
print('FC: Rank-1: {:.2%} | Rank-5: {:.2%} | Rank-10: {:.2%}| Rank-20: {:.2%}| mAP: {:.2%}| mINP: {:.2%}'.format( cmc_pool[0], cmc_pool[4], cmc_pool[9], cmc_pool[19], mAP_pool, mINP_pool))
So I think you actually used the FC performance which got Rank-1 47.50%. I'm little confused about it. Which one (POOL/FC feature) should be used in final model evaluation? Or both are OK?
Is the code only using CrossEntropyLoss?
Excuse me.
When I run test.py , there is an error that "ModuleNotFoundError: No module named 'model_base'". How can I solve the problem?
Thank you!!
Hi, Dr Ye, thanks for your released code. I have trained the model but got lower results ------only 28.03(map). I just run python pre_process_sysu.py
to prepare the dataset and 'python train_ext.py --dataset sysu --lr 0.1 --method adp --augc 1 --rande 0.5 --alpha 1 --square 1 --gamma 1 --gpu 4' to train the model. Could you please help me to find out why I get the wrong result,Thank you very much!
Hi,Dr.Ye,thanks for your released code,I‘m learning it,but when I run the test.py with model file
sysu_awg_p4_n8_lr_0.1_seed_0.t
,the result is very low------only 4.15(map) and2(rank-1), I just change the path of the data and model .Could you please help me to find out why i get the wrong result,Thank you very much!
您好,我在可视化过程当中遇到了维度问题ValueError: Found array with dim 4. Estimator expected <= 2.应该如何解决呢?
Thanks for your impressive work. In the ICCV21 CAJ paper, the grayscale transformation (CA) is used. But is seems that the codes don't use CA? Could you please describe what is grayscale transformation, and how apply it to data transform? Thanks.
Does this code only perform single-shot result?
Thanks for the source code, it helped me a lot. But when I train on RegDB dataset, the model does not converge. I used the following statement:
python train_ext.py --dataset regdb --lr 0.1 --method adp --augc 1 --rande 0.5 --alpha 1 --square 1 --gamma 1 --gpu 0
please tell me what should I do
Hello,thanks for your beautiful work!
But I can't get the result reported from paper, could you help me find why?
that's the training log.
sysu_adp_joint_co_nog_ch_nog_sq1_aug_G_erase_0.5_p4_n8_lr_0.1_seed_0_os.txt
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.