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 View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

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

For agents, on Syntology's MCP service (how to connect):

Code

The archive's official repository (implus/GFocal) was not harvested; the 24 samples below come from 3 community repositories.

Syntology 24 code samples harvested from 3 repositories linked to this paper: 22 ran (of which 0 constructed an object rather than computing a result; 21 with no instrument failure: 1 honoured, 0 violated, 20 with no contract checked; 1 where Syntology's instrument failed) · 2 unverified. Where Syntology's instrument failed: 1 where our contract draft was wrong; failures of Syntology's instrument, not of the code.

By repository: community (archive-listed): 24 samples from 3 repositories, 22 ran (21 with no instrument failure; 1 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

No sample is linked to this paper from 2 of its repositories that Syntology harvested for other papers:

Levels written between 2026-09-24 and 2026-09-25 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed.

implus/GFocal officialmentioned in papermentioned on GitHubpytorchnot reachable when probed 2026-09-17 — repositories for recent papers often appear after camera-readySyntology: not harvested report
RangiLyu/nanodet mentioned on GitHubpytorchSyntology: not harvested report
Yuxiang1995/ICDAR2021_MFD mentioned on GitHubpytorchApache-2.0Syntology: 6 samples, 5 ran (1 instrument-failed) · 1 unverified report
gau-nernst/CenterNet mentioned on GitHubpytorchMITSyntology: 7 samples, 7 ran (0 instrument-failed) · 0 unverified report
PaddlePaddle/PaddleDetection paddleSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to PP-YOLOE: An evolved version of YOLO (arXiv:2203.16250; that paper's own run record: 22 ran (of which 0 constructed an object rather than computing a result; 19 with no instrument failure: 2 honoured, 0 violated, 17 with no contract checked; 3 where Syntology's instrument failed) · 5 unverified); nothing checks that they implement this paper's method. report
mszpc/nanodet mindsporeApache-2.0Syntology: 11 samples, 10 ran (0 instrument-failed) · 1 unverified report
open-mmlab/mmdetection pytorchApache-2.0Syntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to An Open and Comprehensive Pipeline for Unified Object Grounding and Detection (arXiv:2401.02361; that paper's own run record: 4 ran (of which 0 constructed an object rather than computing a result; 2 with no instrument failure: 0 honoured, 0 violated, 2 with no contract checked; 2 where Syntology's instrument failed) · 2 unverified); nothing checks that they implement this paper's method. 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.

A paper named beside a repository with no sample linked to this paper is shown with that paper's own run record, not this paper's: “ran” means executed on a synthesized input, not that the code is correct, and “where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Papers are listed in arXiv-id order, at most three per repository.

Code Syntology ran Syntology

24 samples harvested: 22 ran (of which 0 constructed an object rather than computing a result; 21 with no instrument failure: 1 honoured, 0 violated, 20 with no contract checked; 1 where Syntology's instrument failed) · 2 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page last changed ; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

1ran · honoured contract
1ran · our draft was wrong
20ran
2unverified

Licence: 2 of the 24 samples are pointer only, meaning Syntology does not serve that copy's text. For 2 of them, this paper's copy is under a permissive licence and cleared, but the stored copy of the same code that Syntology serves is not; the licence label's tooltip gives Syntology's recorded reason. 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; the list below is grouped by repository, each group headed by its name and what it is to the paper. “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. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (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 are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. 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 six 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; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. 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.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity.

Yuxiang1995/ICDAR2021_MFD community (archive-listed) 6 samples, 5 ran (1 instrument-failed) · 1 unverified
IoU in 13 papers evaluate.py ran fingerprinted Apache-2.0 (permissive) · b91d549254b2a59b · report fixture: signature boxA:list/1/int, boxB:list/1/int · returned float · level recorded 2026-09-24
get_final_epoch in 36 papers .dev_scripts/gather_models.py ran · honoured contract fingerprinted Apache-2.0 (permissive) here; the stored copy is pointer only · e86ae414e2afc197 · report fixture: signature config:str/0/str · returned int · level recorded 2026-09-25
get_final_results in 23 papers .dev_scripts/gather_models.py ran Apache-2.0 (permissive) here; the stored copy is pointer only · fee6fb3d147348e3 · report fixture: signature log_json_path:str/0/str, epoch:int/0/int · returned dict · level recorded 2026-09-25
load_predicted evaluate.py ran Apache-2.0 (permissive) · 2b8f4c5e5fe0ce7e · report fixture: signature path:str/0/str · returned dict · level recorded 2026-09-24
process_checkpoint in 87 papers .dev_scripts/gather_models.py ran · our draft was wrong Apache-2.0 (permissive) · e76a491553cf9fcf · report fixture: signature in_file:str/0/str, out_file:str/0/str · returned str · level recorded 2026-09-24
load_gt in 6 papers evaluate.py unverified Apache-2.0 (permissive) · eecbba9b0cb09860 · report
gau-nernst/CenterNet community (archive-listed) 7 samples, 7 ran (0 instrument-failed) · 0 unverified
coco_detection_collate_fn centernet_lightning/datasets/coco.py ran MIT (permissive) · 1c502073f07e4cee · report fixture: signature batch:list/1/tuple · returned tuple · level recorded 2026-09-24
gather_and_merge centernet_lightning/eval/coco.py ran fingerprinted MIT (permissive) · e96a127893eaee62 · report fixture: signature data:list/1/dict · returned list · level recorded 2026-09-24
get_default_detection_transforms centernet_lightning/datasets/utils.py ran MIT (permissive) · 848d74abab4b027b · report fixture: signature box_format:str/0/str · returned Compose · level recorded 2026-09-24
get_default_tracking_transforms centernet_lightning/datasets/utils.py ran MIT (permissive) · f93dd0c8fe12d34e · report fixture: signature box_format:str/0/str · returned Compose · level recorded 2026-09-24
get_default_transforms centernet_lightning/datasets/utils.py ran MIT (permissive) · 897e22a6f6e6b5f3 · report fixture: signature resize_height:int/0/int, resize_width:int/0/int, box_format:str/0/str, label_fields:list/1/str · returned Compose · level recorded 2026-09-24
parse_transforms centernet_lightning/datasets/builder.py ran MIT (permissive) · 9c971c77b77a1514 · report fixture: signature config:list/1/dict, format:str/0/str, task:str/0/str · returned Compose · level recorded 2026-09-24
process_voc_xml centernet_lightning/datasets/voc.py ran MIT (permissive) · 75b6eb0293a69f4e · report fixture: signature ann_file:str/0/str, original_bboxes:bool/0/bool · returned dict · level recorded 2026-09-24
mszpc/nanodet community (archive-listed) 11 samples, 10 ran (0 instrument-failed) · 1 unverified
apply_nms nanodet/evaluator.py ran Apache-2.0 (permissive) · 9009230480b50bc0 · report fixture: signature all_boxes:ndarray/2/float, all_scores:ndarray/1/float, thres:float/0/float, max_boxes:int/0/int · returned list · level recorded 2026-09-24
get_imageId_from_fileName nanodet/src/dataset.py ran Apache-2.0 (permissive) · 923d5e079649e00c · report fixture: signature filename:str/0/str · returned int · level recorded 2026-09-24
intersect in 33 papers nanodet/src/box_utils.py ran fingerprinted Apache-2.0 (permissive) · 320960c2db6c2963 · report fixture: signature box_a:ndarray/2/float, box_b:ndarray/1/float · returned ndarray · level recorded 2026-09-24
jaccard_numpy in 7 papers nanodet/src/box_utils.py ran fingerprinted Apache-2.0 (permissive) · 3fe3b77a594bbd68 · report fixture: signature box_a:ndarray/2/float, box_b:ndarray/1/float · returned ndarray · level recorded 2026-09-24
linear_warmup_lr in 10 papers nanodet/src/lr_schedule.py ran fingerprinted Apache-2.0 (permissive) · 56d39004d57cb3a2 · report fixture: signature current_step:int/0/int, warmup_steps:int/0/int, base_lr:float/0/float, init_lr:float/0/float · returned float · level recorded 2026-09-24
merge in 85 papers nanodet/src/model_utils/config.py ran Apache-2.0 (permissive) · b2108b927c53418b · report fixture: signature args:SimpleArgs/0/?, cfg:dict/0/? · returned dict · level recorded 2026-09-24
multi_step_lr nanodet/src/lr_schedule.py ran Apache-2.0 (permissive) · 574e3947b96f2084 · report fixture: signature lr:float/0/float, milestones:list/1/int, steps_per_epoch:int/0/int, warmup_epochs:int/0/int, max_epoch:int/0/int, gamma:float/0/float · returned ndarray · level recorded 2026-09-24
parse_cli_to_yaml in 29 papers nanodet/src/model_utils/config.py ran Apache-2.0 (permissive) · 3498f707d22460cd · report fixture: signature parser:ArgumentParser/0/?, cfg:dict/0/?, helper:dict/0/?, choices:dict/0/?, cfg_path:str/0/str · returned Namespace · level recorded 2026-09-24
parse_yaml in 32 papers nanodet/src/model_utils/config.py ran Apache-2.0 (permissive) · c8d98ae32946f6f0 · report fixture: signature yaml_path:str/0/str · returned tuple · level recorded 2026-09-24
warmup_step_lr in 7 papers nanodet/src/lr_schedule.py ran Apache-2.0 (permissive) · 830fa82177642209 · report fixture: signature lr:float/0/float, lr_epochs:list/1/int, steps_per_epoch:int/0/int, warmup_epochs:int/0/int, max_epoch:int/0/int, gamma:float/0/float · returned ndarray · level recorded 2026-09-24
random_sample_crop nanodet/src/dataset.py unverified Apache-2.0 (permissive) · de3d6c82feeafe6b · 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