Cysu / open-reid

Open source person re-identification library in python
https://cysu.github.io/open-reid/
MIT License
1.33k stars 349 forks source link

I got worse performance in triplet_loss.py #55

Closed Niculuse closed 6 years ago

Niculuse commented 6 years ago

I ran the triplet_loss.py on market1501 as told in benchmark, but I got worse result that every item is about 5% lower than presented in bemchmark. BTW, I didn't change code. I do not understand why.Can you help me? Thanks!

zydou commented 6 years ago

Please provide as much information as possible. For example:

Niculuse commented 6 years ago

@zydou sorry! I ran it in Ubuntu system with python 2.7.6, pytorch version 0.2.0_3 and open-reid version 0.2.0.

zydou commented 6 years ago

Try to use python3.

xizero00 commented 6 years ago

Hi @zydou I changed my python version from 2.7 to 3.5 But I still cannot achieve the best results in the benchmark table The triplet loss on the market-1501 has 67.9 mAP, but I got the 60.5 mAP. Here is my results on the test set

Mean AP: 60.5%
CMC Scores    allshots      cuhk03  market1501
  top-1          33.2%       62.9%       78.2%
  top-5          50.4%       88.0%       91.2%
  top-10         59.1%       93.3%       94.4%

I trained the model for market-1501 dataset using the following parameters:

batchsize=64
lr=0.00005
epochs=600

I have one GPU, so I modified the batchsize from 256 to 64, changed the learning rate from 0.0002 to 0.00005 and changed the epochs from 150 to 600 according to tips-and-tricks I used the triplet loss and resnet-50 network. What's wrong with my training? Would you please help me?

zydou commented 6 years ago

Larger batch size is better for hard mining, and gives better performance. Please refer to #28 and #43 for more information.

xizero00 commented 6 years ago

Thank you for your help.

Cysu commented 6 years ago

@zydou thanks a lot for your detailed explanations!