ifzhang / FairMOT

[IJCV-2021] FairMOT: On the Fairness of Detection and Re-Identification in Multi-Object Tracking
MIT License
4.01k stars 934 forks source link

A question about L2 norm #196

Open xs020420 opened 4 years ago

xs020420 commented 4 years ago

Thanks for greate job. I have a question about L2 norm. In the file src/lib/tracker/multitracker.py (line 245)

id_feature = F.normalize(id_feature, dim=1)

It seems a L2 normalization after get id_feature from model.But in the file src/lib/tracker/multitracker.py (line 39)

feat /= np.linalg.norm(feat)

It seems to apply L2 nomaliztion again before update feature.

I 'm doubt that why using L2 nomalization twice?

ifzhang commented 4 years ago

I think it might be a mistake and only add once is OK. You can try to comment feat /= np.linalg.norm(feat) in multitracker.py and I think the results remain the same.