Papers › Generalized Focal Loss: Learning Qualified and Distributed Bounding Boxes for Dense...

Generalized Focal Loss: Learning Qualified and Distributed Bounding Boxes for Dense Object Detection

8 Jun 2020NeurIPS 2020 12arXiv:2006.04388archive 2025-07-28

Xiang Li, Wenhai Wang, Lijun Wu, Shuo Chen, Xiaolin Hu, Jun Li, Jinhui Tang, Jian Yang

One-stage detector basically formulates object detection as dense classification and localization. The classification is usually optimized by Focal Loss and the box location is commonly learned under Dirac delta distribution. A recent trend for one-stage detectors is to introduce an individual prediction branch to estimate the quality of localization, where the predicted quality facilitates the classification to improve detection performance. This paper delves into the representations of the above three fundamental elements: quality estimation, classification and localization. Two problems are discovered in existing practices, including (1) the inconsistent usage of the quality estimation and classification between training and inference and (2) the inflexible Dirac delta distribution for localization when there is ambiguity and uncertainty in complex scenes. To address the problems, we design new representations for these elements. Specifically, we merge the quality estimation into the class prediction vector to form a joint representation of localization quality and classification, and use a vector to represent arbitrary distribution of box locations. The improved representations eliminate the inconsistency risk and accurately depict the flexible distribution in real data, but contain continuous labels, which is beyond the scope of Focal Loss. We then propose Generalized Focal Loss (GFL) that generalizes Focal Loss from its discrete form to the continuous version for successful optimization. On COCO test-dev, GFL achieves 45.0\% AP using ResNet-101 backbone, surpassing state-of-the-art SAPD (43.5\%) and ATSS (43.6\%) with higher or comparable inference speed, under the same backbone and training settings. Notably, our best model can achieve a single-model single-scale AP of 48.2\%, at 10 FPS on a single 2080Ti GPU. Code and models are available at https://github.com/implus/GFocal.

PaperPDFConference PDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2006.04388")

Code

Syntology Ran 1 of 24 code samples harvested from 3 repositories linked to this paper; 23 have no recorded run. Of those that ran: 1 ran with no contract checked.

By repository: community (archive-listed): 24 samples from 3 repositories, 1 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

implus/GFocal officialmentioned in papermentioned on GitHubpytorchnot reachable when probed 2026-09-17 — repositories for recent papers often appear after camera-ready report
RangiLyu/nanodet mentioned on GitHubpytorch report
Yuxiang1995/ICDAR2021_MFD mentioned on GitHubpytorchApache-2.0 report
gau-nernst/CenterNet mentioned on GitHubpytorchMIT report
mszpc/nanodet mindsporeApache-2.0 report
open-mmlab/mmdetection pytorchApache-2.0 report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

24 samples harvested; 1 ran; 0 honoured the contract we drafted; 23 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran
23unverified

Licence: 0 of the 24 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 3 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

process_checkpoint Yuxiang1995/ICDAR2021_MFD/.dev_scripts/gather_models.py community (archive-listed) ran Apache-2.0 (permissive) · e76a491553cf9fcf · report
IoU Yuxiang1995/ICDAR2021_MFD/evaluate.py community (archive-listed) unverified Apache-2.0 (permissive) · b91d549254b2a59b · report
apply_nms mszpc/nanodet/nanodet/evaluator.py community (archive-listed) unverified Apache-2.0 (permissive) · 9009230480b50bc0 · report
coco_detection_collate_fn gau-nernst/CenterNet/centernet_lightning/datasets/coco.py community (archive-listed) unverified MIT (permissive) · 1c502073f07e4cee · report
gather_and_merge gau-nernst/CenterNet/centernet_lightning/eval/coco.py community (archive-listed) unverified MIT (permissive) · e96a127893eaee62 · report
get_default_detection_transforms gau-nernst/CenterNet/centernet_lightning/datasets/utils.py community (archive-listed) unverified MIT (permissive) · 848d74abab4b027b · report
get_default_tracking_transforms gau-nernst/CenterNet/centernet_lightning/datasets/utils.py community (archive-listed) unverified MIT (permissive) · f93dd0c8fe12d34e · report
get_default_transforms gau-nernst/CenterNet/centernet_lightning/datasets/utils.py community (archive-listed) unverified MIT (permissive) · 897e22a6f6e6b5f3 · report
get_final_epoch Yuxiang1995/ICDAR2021_MFD/.dev_scripts/gather_models.py community (archive-listed) unverified Apache-2.0 (permissive) · e86ae414e2afc197 · report
get_final_results Yuxiang1995/ICDAR2021_MFD/.dev_scripts/gather_models.py community (archive-listed) unverified Apache-2.0 (permissive) · fee6fb3d147348e3 · report
get_imageId_from_fileName mszpc/nanodet/nanodet/src/dataset.py community (archive-listed) unverified Apache-2.0 (permissive) · 923d5e079649e00c · report
intersect mszpc/nanodet/nanodet/src/box_utils.py community (archive-listed) unverified Apache-2.0 (permissive) · 320960c2db6c2963 · report
jaccard_numpy mszpc/nanodet/nanodet/src/box_utils.py community (archive-listed) unverified Apache-2.0 (permissive) · 3fe3b77a594bbd68 · report
linear_warmup_lr mszpc/nanodet/nanodet/src/lr_schedule.py community (archive-listed) unverified Apache-2.0 (permissive) · 56d39004d57cb3a2 · report
load_gt Yuxiang1995/ICDAR2021_MFD/evaluate.py community (archive-listed) unverified Apache-2.0 (permissive) · eecbba9b0cb09860 · report
load_predicted Yuxiang1995/ICDAR2021_MFD/evaluate.py community (archive-listed) unverified Apache-2.0 (permissive) · 2b8f4c5e5fe0ce7e · report
merge mszpc/nanodet/nanodet/src/model_utils/config.py community (archive-listed) unverified Apache-2.0 (permissive) · b2108b927c53418b · report
multi_step_lr mszpc/nanodet/nanodet/src/lr_schedule.py community (archive-listed) unverified Apache-2.0 (permissive) · 574e3947b96f2084 · report
parse_cli_to_yaml mszpc/nanodet/nanodet/src/model_utils/config.py community (archive-listed) unverified Apache-2.0 (permissive) · 3498f707d22460cd · report
parse_transforms gau-nernst/CenterNet/centernet_lightning/datasets/builder.py community (archive-listed) unverified MIT (permissive) · 9c971c77b77a1514 · report
parse_yaml mszpc/nanodet/nanodet/src/model_utils/config.py community (archive-listed) unverified Apache-2.0 (permissive) · c8d98ae32946f6f0 · report
process_voc_xml gau-nernst/CenterNet/centernet_lightning/datasets/voc.py community (archive-listed) unverified MIT (permissive) · 75b6eb0293a69f4e · report
random_sample_crop mszpc/nanodet/nanodet/src/dataset.py community (archive-listed) unverified Apache-2.0 (permissive) · de3d6c82feeafe6b · report
warmup_step_lr mszpc/nanodet/nanodet/src/lr_schedule.py community (archive-listed) unverified Apache-2.0 (permissive) · 830fa82177642209 · report

Tasks

Dense Object DetectionGeneral ClassificationObject Detection

1 archive task tag without a task page not shown.

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Object Detection COCO test-dev GFL (X-101-32x4d-DCN, single-scale) AP50 67.4 #109 of 225 Archive leaderboard report
Object Detection COCO test-dev GFL (X-101-32x4d-DCN, single-scale) AP75 52.6 #109 of 225 Archive leaderboard report
Object Detection COCO test-dev GFL (X-101-32x4d-DCN, single-scale) APL 60.2 #109 of 225 Archive leaderboard report
Object Detection COCO test-dev GFL (X-101-32x4d-DCN, single-scale) APM 51.7 #109 of 225 Archive leaderboard report
Object Detection COCO test-dev GFL (X-101-32x4d-DCN, single-scale) APS 29.2 #109 of 225 Archive leaderboard report
Object Detection COCO test-dev GFL (X-101-32x4d-DCN, single-scale) box mAP 48.2 #109 of 225 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

Introduced by this paper: Generalized Focal Loss

1x1 ConvolutionATSSAverage PoolingBatch NormalizationConvolutionDeformable ConvolutionFocal LossGeneralized Focal LossGlobal Average PoolingGrouped ConvolutionKaiming InitializationReLUResNeXtResNeXt BlockResidual Connection

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections