Comments (7)
Hi @ZhangYuef , thanks for your attention.
As you can see, in fact the pretraining is simply using a softmax classification loss, with every identity being a unique class. I didn't pay much attention on it or tune it, so I didn't remember the exact values of the hyperparameters. But it should be somewhere around:
epoch: 40
batchsize: 64 (not sure)
lr: 1e-2
wd: 1e-2
You may tune a bit and obtain some reasonable results.
from mar.
Hi @KovenYu ,thanks for your sharing.
According to your settings, I reproduced the results of your pretrained model. but I found that I can't get the results in the paper when I train this pretrained model in the second-stage training. I think the parameter distribution of the pretrained model is very important for the parameter setting of the second-stage training. can you share the pretrained model code?
Thank you very much.
from mar.
hi @moodom thank you for your attention. Did you try using the provided pretrained model and is that working?
from mar.
HI,@KovenYu. I had used the provided pretrained model and got a good result. But when I used the LAL loss as described in the paper and remove the unit norm constraint to train a pretrained model. After that, I used the pretrained model in the second stage of training and the rank 1 can only reach about 56. I tried to adjust LR and WD. the results were the same. I tested the average parameters of the provided pretrained model in the FC layer and the Euclidean distance between the FC layer column vector. The results are as follows:
Average parameters of FC layer: - 0.00755771
Column Vector Euclidean Distance Mean: - 413379.0
Standard deviation of column vector Euclidean distance: 1.8415+08
I think it's a very good result. The parameters are very small, but the distance is very large. But the pretrained model I trained did not reach that level.
Do you use any other training skills?
from mar.
@moodom thank you for your detailed description!
I looked at the pretrained code and I find two notable points:
- By "without the unit norm constraint" it means both
a
andf(x)
are not normalized, and the scale factor 30 is also not used. - I find that I actually tried a few different pretraining strategies, and chose a best baseline obtained by using ImageNet initialized weights (downloaded from here), then trained for 60 epochs with batchsize=256 (256 SOURCE images without any target images, unlike in the current code), and increase LR to 1e-3. Other settings (incl. data augmentation, lr strategy, etc.) were the same as in the code.
from mar.
Thank you for sharing the code. I set the corresponding parameters according to your description and want to re-loss_al pre-training. However, the pre-training weights obtained in the second stage of training appeared a large number of nan cases. The following is my pre-training code: https://github.com/pzhren/Papers/blob/master/%E7%9B%AE%E6%A0%87%E6%A3%80%E6%B5%8B%E4%B8%8Ere-id%E4%BB%BB%E5%8A%A1/MAR-master/src/pretrain.py#L6
from mar.
The following are the hyperparameter settings during pre-training.
python version : 3.5.4 |Continuum Analytics, Inc.| (default, Aug 14 2017, 13:26:58) [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)]
torch version : 1.1.0
------------------------------------------------------- options --------------------------------------------------------
batch_size: 256 beta: 0.2 crop_size: (384, 128)
epochs: 60 gpu: 0 img_size: (384, 128)
lamb_1: 0.0002 lamb_2: 50.0 lr: 0.001
margin: 1.0 mining_ratio: 0.005 ml_path: ../data/ml_Market.dat
padding: 7 pretrain: True pretrain_path: ../data/resnet50-19c8e357.pth
print_freq: 100 resume: save_path: ../runs/debug
scala_ce: 30.0 source: MSMT17 target: Market
wd: 0.025
do not use pre-trained model. train from scratch.
loaded pre-trained model from ../data/resnet50-19c8e357.pth
==>>[2020-03-20 18:12:12] [Epoch=000/060] Stage 1, [Need: 00:00:00]
Iter: [000/969] Freq 37.5 loss_total 8.316 loss_source 8.316
from mar.
Related Issues (20)
- Checkpoint resume error HOT 4
- continue: checkpint resume error HOT 3
- Released code reproduce result with default parameters lower than publish one HOT 4
- Issue in utils _update_centers function HOT 3
- Question about MDL loss in paper HOT 1
- MSMT17 preprocessed data HOT 1
- MSMT17.mat can't read HOT 2
- labels_target = target_tuple[1].cuda() HOT 4
- Some question about the loss and code HOT 1
- set_storage_offset error HOT 2
- change the batchsize got low performance HOT 3
- RuntimeWarning: invalid value encountered in greater is_positive = p_agree[similar_idx] > self.threshold.item() HOT 1
- Could you please share me the MSMT17 original dateset? the official dateset url is missed. Thanks! HOT 2
- Thank you for your sharing. I wonder what the results is in source dataset HOT 1
- Lower r1, r5, r10 and MAP results HOT 3
- Need pretrained_Duke.pth HOT 2
- nan error HOT 1
- loss target could not decrease
- ValueError: axes don't match array
- About the MSMT17 dataset
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mar.