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.
I did some quick research at the time, but couldnāt find any useful information. It seems that those parameters already existed in RT-DETR (not v2), but I couldnāt figure out why they were implemented.