$$\mathcal{L}{\text{match}}(y{i}, \hat{y}{\sigma(i)}) = -\mathbb{1}{{c_{i} \neq \phi}}\hat{p}{\sigma(i)}(c{i}) + \mathbb{1}{{c{i} \neq \phi}}\mathcal{L}{\text{box}}(b{i}, \hat{b}_{\sigma(i)})$$
PyTorch implementation of 'DETR' (Carion et al., 2020) from scratch.
$$\mathcal{L}{\text{match}}(y{i}, \hat{y}{\sigma(i)}) = -\mathbb{1}{{c_{i} \neq \phi}}\hat{p}{\sigma(i)}(c{i}) + \mathbb{1}{{c{i} \neq \phi}}\mathcal{L}{\text{box}}(b{i}, \hat{b}_{\sigma(i)})$$
PyTorch implementation of 'DETR' (Carion et al., 2020) from scratch.