This work modifies original YOLOv5 work for hard example mining via our proposed combination of Balanced Focal Loss and Loss Rank Mining (LRM) approach. Original loss.py file is modified for LRM implementation.
Tested on YOLOv5s of v5.0 release and verified on YOLOv5l of v6.0 release.
Use LRM_ignore flag for LRM activation and fl_gamma and obj flags for Balanced Focal Loss.
Related paper: https://arxiv.org/abs/2202.13080
Please consider citing our paper and YOLOv5 while using our algorithm.