Bucketing Ranking-Based Losses For Efficient Training of Object Detectors

2025-1-10
Yavuz, Feyza
Object detection is a fundamental computer vision task that focuses on classifying and locating objects in an image. Classification and localization of objects are commonly supervised with score-based loss functions, e.g., Cross-entropy Loss for classification and L1 Loss for localization. On the other hand, ranking-based loss functions, such as Average Precision Loss and Rank&Sort Loss, better align with the evaluation criteria, have fewer hyperparameters, and offer robustness against the imbalance between positive and negative samples. However, they require pairwise comparisons among P positive and N negative predictions, introducing a time complexity of O(PN), which is prohibitive since N is often large. Despite their advantages, the widespread adoption of ranking-based losses has been hindered by their high time and space complexities. In this thesis, we focus on improving the efficiency of ranking-based loss functions. To this end, we propose Bucketed Ranking-based (BR) Losses which group negatives into B buckets to reduce the number of pairwise comparisons. Thanks to bucketing, our method reduces the time complexity to O(Nlog(N)). To validate our approach, we conducted experiments on two different tasks, three different datasets, seven different detectors. We show that BR Losses yield the same accuracy with their unbucketed versions and provide 2x faster training on average. Lower complexity of BR Losses enable us to train, for the first time, transformer-based object detectors using a ranking-based loss. When we train CoDETR, a state-of-the-art transformer-based object detector, we consistently outperform its original results over several different backbones.
Citation Formats
F. Yavuz, “Bucketing Ranking-Based Losses For Efficient Training of Object Detectors,” M.S. - Master of Science, Middle East Technical University, 2025.