Papers › Striking the Right Balance: Recall Loss for Semantic Segmentation

Striking the Right Balance: Recall Loss for Semantic Segmentation

28 Jun 2021arXiv:2106.14917archive 2025-07-28

Junjiao Tian, Niluthpol Mithun, Zach Seymour, Han-Pang Chiu, Zsolt Kira

Class imbalance is a fundamental problem in computer vision applications such as semantic segmentation. Specifically, uneven class distributions in a training dataset often result in unsatisfactory performance on under-represented classes. Many works have proposed to weight the standard cross entropy loss function with pre-computed weights based on class statistics, such as the number of samples and class margins. There are two major drawbacks to these methods: 1) constantly up-weighting minority classes can introduce excessive false positives in semantic segmentation; 2) a minority class is not necessarily a hard class. The consequence is low precision due to excessive false positives. In this regard, we propose a hard-class mining loss by reshaping the vanilla cross entropy loss such that it weights the loss for each class dynamically based on instantaneous recall performance. We show that the novel recall loss changes gradually between the standard cross entropy loss and the inverse frequency weighted loss. Recall loss also leads to improved mean accuracy while offering competitive mean Intersection over Union (IoU) performance. On Synthia dataset, recall loss achieves 9% relative improvement on mean accuracy with competitive mean IoU using DeepLab-ResNet18 compared to the cross entropy loss. Code available at https://github.com/PotatoTian/recall-semseg.

PaperPDFCodeCode 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="2106.14917")

Code

Syntology Ran 2 of 11 code samples harvested from 1 repository linked to this paper; 9 have no recorded run. Of those that ran: 2 ran with no contract checked.

By repository: official repository: 11 samples from 1 repository, 2 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

PotatoTian/recall-semseg officialmentioned in paperpytorchMIT 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

11 samples harvested; 2 ran; 0 honoured the contract we drafted; 9 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.

2ran
9unverified

Licence: 0 of the 11 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 PotatoTian/recall-semseg. “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.

get_interp_size PotatoTian/recall-semseg/ptsemseg/models/utils.py official repository ran MIT (permissive) · 80a82d5149279cdf · report
recursive_glob PotatoTian/recall-semseg/ptsemseg/utils.py official repository ran fingerprinted MIT (permissive) · f1e67bfcea91df50 · report
RecallCrossEntropy PotatoTian/recall-semseg/ptsemseg/loss/loss.py official repository unverified MIT (permissive) · 7026f6e0f1e1099b · report
RecallPreCrossEntropy PotatoTian/recall-semseg/ptsemseg/loss/loss.py official repository unverified MIT (permissive) · 4cfe5787eb0e75e1 · report
alpha_blend PotatoTian/recall-semseg/ptsemseg/utils.py official repository unverified MIT (permissive) · 3a8e7e1d2e1dc425 · report
convert_state_dict PotatoTian/recall-semseg/ptsemseg/utils.py official repository unverified MIT (permissive) · ec475f26f39c14b0 · report
cross_entropy2d PotatoTian/recall-semseg/ptsemseg/loss/loss.py official repository unverified MIT (permissive) · c76dc561618f7c2e · report
get_upsampling_weight PotatoTian/recall-semseg/ptsemseg/models/utils.py official repository unverified MIT (permissive) · 68f02849ad3eb678 · report
interp PotatoTian/recall-semseg/ptsemseg/models/utils.py official repository unverified MIT (permissive) · aed5a907c8821d6d · report
lovasz_grad PotatoTian/recall-semseg/ptsemseg/loss/lovasz_loss.py official repository unverified MIT (permissive) · 4f9d5382c285dae8 · report
lovasz_softmax_flat PotatoTian/recall-semseg/ptsemseg/loss/lovasz_loss.py official repository unverified MIT (permissive) · 41a1c4fba0ea8662 · report

Tasks

Semantic Segmentation

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

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