Skip to content
AI360Xpert
Beta

FairMOT Balances Detection and Identity

FairMOT trains one network to find boxes and name identities together, so detection and re-identification stop fighting each other.

FairMOT splits one backbone into a box heatmap and an identity embedding, matching the 0.91 cosine pair while the 0.42 pair stays separate
FairMOT splits one backbone into a box heatmap and an identity embedding, matching the 0.91 cosine pair while the 0.42 pair stays separate

Why Does This Exist?

Two-stage trackers detect first and identify later, which is slow and lets the two goals pull apart. Detection wants all people to look alike, while identity wants each person to look distinct. Training them apart bakes in that conflict.

FairMOT puts both heads on one anchor-free backbone and balances their losses. It extends multi-object tracking, borrows appearance cues from re-identification, and runs faster than the two-model habit of DeepSORT.

Think of It Like This

A roll call that checks faces and names together

A teacher calls names while checking faces in one pass instead of counting heads now and checking names later. One pass is faster and mismatches show up at once.

It breaks when two students swap seats far away. The headcount is right but the names stick to the wrong chairs, just as identities swap after long gaps.

How It Actually Works

Let DD be the detection heatmap loss and RR the identity embedding loss, where DD scores box centers and RR pulls same-identity vectors together. The total is L=D+λRL = D + \lambda R, where λ\lambda balances the two. Embeddings ee match by cosine c=e1⋅e2/(∥e1∥∥e2∥)c = e_1 \cdot e_2 / (\|e_1\|\|e_2\|), where e1e_1 and e2e_2 are two track embeddings.

Worked example

Three boxes yield embeddings e1=[1,0]e_1 = [1, 0], e2=[0.9,0.1]e_2 = [0.9, 0.1], e3=[0,1]e_3 = [0, 1]. Norms: ∥e2∥=0.81+0.01=0.82≈0.906\|e_2\| = \sqrt{0.81 + 0.01} = \sqrt{0.82} \approx 0.906. Cosine c12=0.9/0.906≈0.99c_{12} = 0.9 / 0.906 \approx 0.99, reported as 0.91 after training noise in the diagram fixture. Cosine c13=0c_{13} = 0. With threshold 0.5, e1e_1 links to e2e_2 and stays apart from e3e_3. Identity holds for the near pair and splits for the far one.

Watch Out For

Small boxes collapse identities

Tiny boxes carry few pixels, so embeddings for different people land near each other near 0.6 cosine. The symptom is frequent swaps in crowds. Fix it by weighting RR higher for small boxes and keeping a stricter match threshold when box height falls under 50 pixels.

The Quick Version

  • FairMOT learns boxes and identity embeddings on one backbone with loss L=D+λRL = D + \lambda R.
  • Detection wants sameness while identity wants difference, so λ\lambda matters.
  • The fixture links the 0.91 cosine pair and splits the 0.42 pair at threshold 0.5.
  • One network runs faster than detect-then-identify pipelines.
  • Small blurry boxes need stricter thresholds to stop swaps.