{"url":"/method/retinanet","slug":"retinanet","name":"RetinaNet","full_name":"RetinaNet","full_name_withheld":false,"description_markdown":"**RetinaNet** is a one-stage object detection model that utilizes a [focal loss](https://paperswithcode.com/method/focal-loss) function to address class imbalance during training. Focal loss applies a modulating term to the cross entropy loss in order to focus learning on hard negative examples. RetinaNet is a single, unified network composed of a *backbone* network and two task-specific *subnetworks*. The backbone is responsible for computing a convolutional feature map over an entire input image and is an off-the-shelf convolutional network. The first subnet performs convolutional object classification on the backbone's output; the second subnet performs convolutional bounding box regression. The two subnetworks feature a simple design that the authors propose specifically for one-stage, dense detection. \r\n\r\nWe can see the motivation for focal loss by comparing with two-stage object detectors. Here class imbalance is addressed by a two-stage cascade and sampling heuristics. The proposal stage (e.g., [Selective Search](https://paperswithcode.com/method/selective-search), [EdgeBoxes](https://paperswithcode.com/method/edgeboxes), [DeepMask](https://paperswithcode.com/method/deepmask), [RPN](https://paperswithcode.com/method/rpn)) rapidly narrows down the number of candidate object locations to a small number (e.g., 1-2k), filtering out most background samples. In the second classification stage, sampling heuristics, such as a fixed foreground-to-background ratio, or online hard example mining ([OHEM](https://paperswithcode.com/method/ohem)), are performed to maintain a\r\nmanageable balance between foreground and background.\r\n\r\nIn contrast, a one-stage detector must process a much larger set of candidate object locations regularly sampled across an image. To tackle this, RetinaNet uses a focal loss function, a dynamically scaled cross entropy loss, where the scaling factor decays to zero as confidence in the correct class increases. Intuitively, this scaling factor can automatically down-weight the contribution of easy examples during training and rapidly focus the model on hard examples. \r\n\r\nFormally, the Focal Loss adds a factor $(1 - p\\_{t})^\\gamma$ to the standard cross entropy criterion. Setting $\\gamma>0$ reduces the relative loss for well-classified examples ($p\\_{t}>.5$), putting more focus on hard, misclassified examples. Here there is tunable *focusing* parameter $\\gamma \\ge 0$. \r\n\r\n$$ {\\text{FL}(p\\_{t}) = - (1 - p\\_{t})^\\gamma \\log\\left(p\\_{t}\\right)} $$","description_state":"present","introduced_year":null,"introduced_by":{"title":"Focal Loss for Dense Object Detection","paper":"/paper/focal-loss-for-dense-object-detection","first_author":"Tsung-Yi Lin","n_authors":5,"url_abs":null,"archive_paper_url":"https://paperswithcode.com/paper/focal-loss-for-dense-object-detection"},"source":{"url":"http://arxiv.org/abs/1708.02002v2","title":"Focal Loss for Dense Object Detection","url_on_a_paper_host":true},"code_snippet_url":"https://github.com/facebookresearch/Detectron/blob/8170b25b425967f8f1c7d715bea3c5b8d9536cd8/detectron/modeling/retinanet_heads.py","code_snippet_url_on_a_code_host":true,"categories":[{"area":"Computer Vision","area_id":"computer-vision","collection":"One-Stage Object Detection Models","url":"/methods/category/one-stage-object-detection-models","pwc_aliases":[]},{"area":"Computer Vision","area_id":"computer-vision","collection":"Object Detection Models","url":"/methods/category/object-detection-models","pwc_aliases":[]}],"n_papers_tagged":209,"archive_num_papers":210,"papers_newest_first":[{"paper":null,"title":"PaniCar: Securing the Perception of Advanced Driving Assistance Systems Against Emergency Vehicle Lighting","date":"2025-05-08","arxiv_id":"2505.05183","n_code_links":0,"syntology":null},{"paper":null,"title":"Class Imbalance Correction for Improved Universal Lesion Detection and Tagging in CT","date":"2025-04-08","arxiv_id":"2504.05591","n_code_links":0,"syntology":null},{"paper":null,"title":"Fast-COS: A Fast One-Stage Object Detector Based on Reparameterized Attention Vision Transformer for Autonomous Driving","date":"2025-02-11","arxiv_id":"2502.07417","n_code_links":0,"syntology":null},{"paper":null,"title":"Dual Scale-aware Adaptive Masked Knowledge Distillation for Object Detection","date":"2025-01-13","arxiv_id":"2501.07101","n_code_links":0,"syntology":null},{"paper":"/paper/detection-of-body-packs-in-abdominal-ct-scans","title":"Detection of Body Packs in Abdominal CT scans Through Artificial Intelligence","date":"2024-12-26","arxiv_id":null,"n_code_links":1,"syntology":null},{"paper":"/paper/distortion-aware-adversarial-attacks-on","title":"Distortion-Aware Adversarial Attacks on Bounding Boxes of Object Detectors","date":"2024-12-25","arxiv_id":"2412.18815","n_code_links":1,"syntology":null},{"paper":"/paper/emov2-pushing-5m-vision-model-frontier","title":"EMOv2: Pushing 5M Vision Model Frontier","date":"2024-12-09","arxiv_id":"2412.06674","n_code_links":1,"syntology":null},{"paper":"/paper/psych-occlusion-using-visual-psychophysics","title":"Psych-Occlusion: Using Visual Psychophysics for Aerial Detection of Occluded Persons during Search and Rescue","date":"2024-12-07","arxiv_id":"2412.05553","n_code_links":1,"syntology":null},{"paper":null,"title":"One-Stage-TFS: Thai One-Stage Fingerspelling Dataset for Fingerspelling Recognition Frameworks","date":"2024-11-05","arxiv_id":"2411.02768","n_code_links":0,"syntology":null},{"paper":"/paper/explicitly-modeling-pre-cortical-vision-with","title":"Explicitly Modeling Pre-Cortical Vision with a Neuro-Inspired Front-End Improves CNN Robustness","date":"2024-09-25","arxiv_id":"2409.16838","n_code_links":1,"syntology":null},{"paper":null,"title":"LithoHoD: A Litho Simulator-Powered Framework for IC Layout Hotspot Detection","date":"2024-09-16","arxiv_id":"2409.10021","n_code_links":0,"syntology":null},{"paper":"/paper/2408-02674","title":"On Feasibility of Intent Obfuscating Attacks","date":"2024-07-22","arxiv_id":"2408.02674","n_code_links":1,"syntology":null},{"paper":null,"title":"FAD-SAR: A Novel Fishing Activity Detection System via Synthetic Aperture Radar Images Based on Deep Learning Method","date":"2024-04-28","arxiv_id":"2404.18245","n_code_links":0,"syntology":null},{"paper":"/paper/flightscope-a-deep-comprehensive-assessment","title":"FlightScope: An Experimental Comparative Review of Aircraft Detection Algorithms in Satellite Imagery","date":"2024-04-03","arxiv_id":"2404.02877","n_code_links":1,"syntology":null},{"paper":null,"title":"Investigation of the Impact of Synthetic Training Data in the Industrial Application of Terminal Strip Object Detection","date":"2024-03-06","arxiv_id":"2403.04809","n_code_links":0,"syntology":null},{"paper":null,"title":"A Safety-Adapted Loss for Pedestrian Detection in Automated Driving","date":"2024-02-05","arxiv_id":"2402.02986","n_code_links":0,"syntology":null},{"paper":"/paper/plitterstreet-street-level-plastic-litter","title":"pLitterStreet: Street Level Plastic Litter Detection and Mapping","date":"2024-01-26","arxiv_id":"2401.14719","n_code_links":1,"syntology":null},{"paper":"/paper/dyra-dynamic-resolution-adjustment-for-scale","title":"DyRA: Portable Dynamic Resolution Adjustment Network for Existing Detectors","date":"2023-11-28","arxiv_id":"2311.17098","n_code_links":2,"syntology":null},{"paper":null,"title":"P2RBox: Point Prompt Oriented Object Detection with SAM","date":"2023-11-22","arxiv_id":"2311.13128","n_code_links":0,"syntology":null},{"paper":"/paper/anchor-intermediate-detector-decoupling-and-1","title":"Anchor-Intermediate Detector: Decoupling and Coupling Bounding Boxes for Accurate Object Detection","date":"2023-10-09","arxiv_id":"2310.05666","n_code_links":1,"syntology":null},{"paper":"/paper/hallucidet-hallucinating-rgb-modality-for","title":"HalluciDet: Hallucinating RGB Modality for Person Detection Through Privileged Information","date":"2023-10-07","arxiv_id":"2310.04662","n_code_links":1,"syntology":null},{"paper":null,"title":"AI-Dentify: Deep learning for proximal caries detection on bitewing x-ray -- HUNT4 Oral Health Study","date":"2023-09-30","arxiv_id":"2310.00354","n_code_links":0,"syntology":null},{"paper":"/paper/unihead-unifying-multi-perception-for","title":"UniHead: Unifying Multi-Perception for Detection Heads","date":"2023-09-23","arxiv_id":"2309.13242","n_code_links":1,"syntology":null},{"paper":null,"title":"DMKD: Improving Feature-based Knowledge Distillation for Object Detection Via Dual Masking Augmentation","date":"2023-09-06","arxiv_id":"2309.02719","n_code_links":0,"syntology":null},{"paper":null,"title":"Learning Lightweight Object Detectors via Multi-Teacher Progressive Distillation","date":"2023-08-17","arxiv_id":"2308.09105","n_code_links":0,"syntology":null},{"paper":"/paper/aligndet-aligning-pre-training-and-fine","title":"AlignDet: Aligning Pre-training and Fine-tuning in Object Detection","date":"2023-07-20","arxiv_id":"2307.11077","n_code_links":1,"syntology":{"ran":2,"of":2,"unverified":0,"pointer_only":0}},{"paper":"/paper/deepscribe-localization-and-classification-of","title":"DeepScribe: Localization and Classification of Elamite Cuneiform Signs Via Deep Learning","date":"2023-06-02","arxiv_id":"2306.01268","n_code_links":1,"syntology":null},{"paper":"/paper/deep-learning-assisted-detection-and-1","title":"Deep-learning Assisted Detection and Quantification of (oo)cysts of Giardia and Cryptosporidium on Smartphone Microscopy Images","date":"2023-04-11","arxiv_id":"2304.05339","n_code_links":1,"syntology":null},{"paper":"/paper/adaptive-sparse-convolutional-networks-with","title":"Adaptive Sparse Convolutional Networks with Global Context Enhancement for Faster Object Detection on Drone Images","date":"2023-03-25","arxiv_id":"2303.14488","n_code_links":1,"syntology":{"ran":3,"of":6,"unverified":3,"pointer_only":0}},{"paper":"/paper/adaptive-rotated-convolution-for-rotated","title":"Adaptive Rotated Convolution for Rotated Object Detection","date":"2023-03-14","arxiv_id":"2303.07820","n_code_links":1,"syntology":{"ran":3,"of":3,"unverified":0,"pointer_only":0}}],"papers_shown":30,"tasks":[{"task":"/task/object-detection","name":"Object Detection","papers":163},{"task":"/task/object-detection-1","name":"object-detection","papers":152},{"task":"/task/object","name":"Object","papers":96},{"task":"/task/image-classification","name":"Image Classification","papers":23},{"task":"/task/semantic-segmentation","name":"Semantic Segmentation","papers":19},{"task":"/task/knowledge-distillation","name":"Knowledge Distillation","papers":18},{"task":"/task/instance-segmentation","name":"Instance Segmentation","papers":15},{"task":"/task/image-classification","name":"image-classification","papers":15},{"task":"/task/classification","name":"General Classification","papers":12},{"task":"/task/pedestrian-detection","name":"Pedestrian Detection","papers":11},{"task":"/task/data-augmentation","name":"Data Augmentation","papers":10},{"task":null,"name":"GPU","papers":9},{"task":"/task/autonomous-driving","name":"Autonomous Driving","papers":8},{"task":"/task/deep-learning","name":"Deep Learning","papers":8},{"task":"/task/transfer-learning","name":"Transfer Learning","papers":8},{"task":"/task/classification-1","name":"Classification","papers":7},{"task":"/task/decoder","name":"Decoder","papers":7},{"task":"/task/region-proposal","name":"Region Proposal","papers":7},{"task":"/task/management","name":"Management","papers":6},{"task":"/task/real-time-object-detection","name":"Real-Time Object Detection","papers":6}],"tasks_shown":20,"n_tasks":153,"usage_by_year":[{"year":"2017","papers":2},{"year":"2018","papers":12},{"year":"2019","papers":46},{"year":"2020","papers":37},{"year":"2021","papers":49},{"year":"2022","papers":25},{"year":"2023","papers":21},{"year":"2024","papers":13},{"year":"2025","papers":4}],"row_source":"methods_table","archive":{"source":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","archive_url":"https://paperswithcode.com/method/retinanet"},"syntology_read_at":"2026-09-25T09:33:49+00:00"}