Hi,
I’ve been studying the RTDetrLoss implementation in the transformers library and noticed something interesting. The class implements several loss functions:
- loss_labels_vfl
- loss_labels (cross-entropy)
- loss_cardinality
- loss_boxes
- loss_masks
- loss_labels_bce
- loss_labels_focal
However, looking at the code, it seems only “vfl” and “boxes” losses are actually used in practice (these are the only ones included in self.losses = ["vfl", "boxes"]
).
I’m curious about why the other loss functions are implemented but not utilized. Is this consistent with the RT-DETR paper’s implementation? Or perhaps were the other losses tested empirically but found to be less effective?
Has anyone experimented with enabling the other loss functions like the focal loss or BCE loss? I’d appreciate any insights about the design choices here.
Hope you guys can help! Thank you.