Comments (2)
Hi,
I have just re-trained my code again to find if there exist any issues in the pre-training stage (./scripts/pretrain.sh dukemtmc market1501 resnet50 1
). And the results are satisfactory, i.e. on dukemtmc
Mean AP: 69.5%
CMC Scores:
top-1 85.0%
top-5 92.0%
top-10 94.3%
and on market1501
Mean AP: 29.6%
CMC Scores:
top-1 58.2%
top-5 73.5%
top-10 79.3%
Although 29.6% is not as high as 31.8% (as reported), I don't think it would affect the performance of the following MMT stage. And the reasons for such a slight drop may be due to the fact that (1) randomness of training and (2) the decreased iter number (200->100). The reason for the decreased iter number refers to the below.
As for the phenomenons you provided, I think the value of triplet loss is abnormal. The triplet loss is about 0.024 in my experiments, e.g.
Epoch: [79][100/100] Time 0.253 (0.277) Data 0.000 (0.014) Loss_ce 1.086 (1.076) Loss_tr 0.037 (0.024) Prec 100.00% (99.98%)
Maybe you need to check the convergence of the network. Did you modify anywhere of the code?
As for your questions,
margin
: in the section 3.1 of the paper, the margin=0.5 is for the conventional triplet loss. And here in my pre-training code, we use hard-version softmax-triplet loss (Eq. (6) in the paper), so margin=0 is better.iters
: I use iters=200 in the original paper's experiments. And later, I found that iters=100 could achieve similar pre-training performance but with much faster speed than iters=200. So I modify the scripts.
from mmt.
Hi, thank you for your reply.
I have finally found the problem and achieve 30.1%/58.3% on target dataset (Market1501).
As you suggest, the convergence of the network went wrong due to the reset of the initialization.
For some reasons, I had to load the pretrained backbone of ResNet50 from the local (self-defined path). Therefore, I set the parameter "pretrained" as False in Class "models", and manually loaded the pretrained backbone of ResNet50.
I revised "mmt/models/resnet.py" like this for loading the pretrained backbone of ResNet50 from the local
if depth not in ResNet.__factory:
raise KeyError("Unsupported depth:", depth)
resnet = ResNet.__factorydepth
resnet.load_state_dict(torch.load(LOCAL_PATH+ 'resnet50-19c8e357.pth'))
However, when the "pretrained" is set False, it will lead to the reset of the initialization
if not pretrained:
self.reset_params()
Thus, the network will be randomly initialized and not loaded from the pretrained backbone, and finally lead to the poor convergence.
Thanks again for the reply of my questions, it is really helpful.
from mmt.
Related Issues (20)
- Low accuracy in Sysu HOT 17
- some
- question about "delete anything about model_2 and model_2_ema" HOT 2
- No module named 'mmt' HOT 2
- If the classifier C^t need to be re-set after each clustering? HOT 5
- AttributeError: 'ResNetIBN' object has no attribute 'module' HOT 9
- RuntimeError: bool value of Tensor with more than one value is ambiguous HOT 4
- about classifier weight initial HOT 2
- an error in evaluator HOT 1
- About sampler HOT 2
- About experimental result HOT 2
- why linear classifier with random initialization (normal distribution) work so well?
- About GPUs and batch size
- A question about clustering HOT 4
- A question about precision
- Question about test feature
- the link of ImageNet pre-trained model failure
- 请问是否可以公布weights文件,想基于本工作在模型推理加速方面进行探索
- GPU number
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 mmt.