{"notes":[{"id":"object-detection/atss","category":"object-detection","legacyPath":"object-detection/1912-atss","legacySlug":"1912-atss","legacyPaths":[],"title":"ATSS","subtitle":"The Death of Anchors","author":"Z. Yuan","paperDate":"2019-12-05","publishedOn":"2025-08-24","paperTitle":"Bridging the Gap Between Anchor-Based and Anchor-Free Detection via Adaptive Training Sample Selection","paperUrl":"https://arxiv.org/abs/1912.02424","bibliography":{"title":"Bridging the Gap Between Anchor-Based and Anchor-Free Detection via Adaptive Training Sample Selection","authors":["Shifeng Zhang","Cheng Chi","Yongqiang Yao","Zhen Lei","Stan Z. Li"],"url":"https://arxiv.org/abs/1912.02424","pdfUrl":"https://openaccess.thecvf.com/content_CVPR_2020/papers/Zhang_Bridging_the_Gap_Between_Anchor-Based_and_Anchor-Free_Detection_via_Adaptive_CVPR_2020_paper.pdf","codeUrl":"https://github.com/sfzhang15/ATSS","preprint":{"id":"1912.02424","submittedOn":"2019-12-05","url":"https://arxiv.org/abs/1912.02424"},"publication":{"venue":"CVPR","year":2020,"kind":"conference","url":"https://openaccess.thecvf.com/content_CVPR_2020/html/Zhang_Bridging_the_Gap_Between_Anchor-Based_and_Anchor-Free_Detection_via_Adaptive_CVPR_2020_paper.html"},"citation":"@misc{objectdetectionatss2019,\n  title = {{Bridging the Gap Between Anchor-Based and Anchor-Free Detection via Adaptive Training Sample Selection}},\n  author = {Shifeng Zhang and Cheng Chi and Yongqiang Yao and Zhen Lei and Stan Z. Li},\n  year = {2019},\n  eprint = {1912.02424},\n  archivePrefix = {arXiv},\n  url = {https://arxiv.org/abs/1912.02424}\n}\n","citationPath":"/content/papers/citations/object-detection/atss.052abb306ebc.bib"},"thumbnail":{"src":"/content/papers/assets/eb5c0893f72157017487005de8070c2d3c2ff90c1a7a263974a20c056a2385dd.jpg","width":1224,"height":552},"locale":"en","path":"/content/papers/en/object-detection/atss.d092d7e19747.md","headings":[{"id":"problem-definition","text":"Problem Definition","depth":2},{"id":"problem-solving","text":"Problem Solving","depth":2},{"id":"removing-unfair-factors","text":"Removing Unfair Factors","depth":3},{"id":"pinpointing-the-true-difference","text":"Pinpointing the True Difference","depth":3},{"id":"adaptive-training-sample-selection","text":"Adaptive Training Sample Selection","depth":3},{"id":"discussion","text":"Discussion","depth":2},{"id":"comparison-with-existing-methods","text":"Comparison with Existing Methods","depth":3},{"id":"discussion-on-number-of-anchors","text":"Discussion on Number of Anchors","depth":3},{"id":"conclusion","text":"Conclusion","depth":2}],"anchorAliases":{"defining-the-problem":"problem-definition","solving-the-problem":"problem-solving","separate-assignment-from-regression-origin":"pinpointing-the-true-difference","give-each-object-its-own-threshold":"adaptive-training-sample-selection","discussing-the-results":"discussion","does-atss-help-both-boxes-and-points":"discussion","leaderboard-results-and-nine-anchors":"comparison-with-existing-methods"},"guide":null,"tags":["object-detection","label-assignment","model-evaluation","cas"],"relatedReading":[{"id":"object-detection/fcos","relation":"background","topic":"Dense detection and sample assignment"}]},{"id":"object-detection/fcos","category":"object-detection","legacyPath":"object-detection/1904-fcos","legacySlug":"1904-fcos","legacyPaths":[],"title":"FCOS","subtitle":"A World Without Anchors","author":"Z. Yuan","paperDate":"2019-04-02","publishedOn":"2025-08-31","paperTitle":"FCOS: Fully Convolutional One-Stage Object Detection","paperUrl":"https://arxiv.org/abs/1904.01355","bibliography":{"title":"FCOS: Fully Convolutional One-Stage Object Detection","authors":["Zhi Tian","Chunhua Shen","Hao Chen","Tong He"],"url":"https://arxiv.org/abs/1904.01355","pdfUrl":"https://openaccess.thecvf.com/content_ICCV_2019/papers/Tian_FCOS_Fully_Convolutional_One-Stage_Object_Detection_ICCV_2019_paper.pdf","codeUrl":null,"preprint":{"id":"1904.01355","submittedOn":"2019-04-02","url":"https://arxiv.org/abs/1904.01355"},"publication":{"venue":"ICCV","year":2019,"kind":"conference","url":"https://openaccess.thecvf.com/content_ICCV_2019/html/Tian_FCOS_Fully_Convolutional_One-Stage_Object_Detection_ICCV_2019_paper.html"},"citation":"@misc{objectdetectionfcos2019,\n  title = {{FCOS: Fully Convolutional One-Stage Object Detection}},\n  author = {Zhi Tian and Chunhua Shen and Hao Chen and Tong He},\n  year = {2019},\n  eprint = {1904.01355},\n  archivePrefix = {arXiv},\n  url = {https://arxiv.org/abs/1904.01355}\n}\n","citationPath":"/content/papers/citations/object-detection/fcos.00e1b4c82339.bib"},"thumbnail":{"src":"/content/papers/assets/23edca5ceca50cfcadbf6fd9cb8e8720100daff3135c951a4554454e3b9c69e7.jpg","width":1508,"height":668},"locale":"en","path":"/content/papers/en/object-detection/fcos.098144f33a61.md","headings":[{"id":"problem-definition","text":"Problem Definition","depth":2},{"id":"solution","text":"Solution","depth":2},{"id":"discussion","text":"Discussion","depth":2},{"id":"multi-level-fpn-and-recall-upper-bound","text":"Multi-Level FPN and Recall Upper Bound","depth":3},{"id":"ambiguous-samples-caused-by-overlaps","text":"Ambiguous Samples Caused by Overlaps","depth":3},{"id":"the-necessity-and-effectiveness-of-center-ness","text":"The Necessity and Effectiveness of Center-ness","depth":3},{"id":"fair-comparison-with-anchor-based-methods","text":"Fair Comparison With Anchor-based Methods","depth":3},{"id":"overall-comparison-with-contemporary-sota","text":"Overall Comparison With Contemporary SOTA","depth":3},{"id":"conclusion","text":"Conclusion","depth":2}],"anchorAliases":{"one-location-four-distances":"solution","fpn-levels-reduce-overlap-ambiguity":"solution","center-ness-discounts-edge-predictions":"solution","experimental-results-and-discussion":"discussion","assignment-coverage-and-overlapping-positions":"multi-level-fpn-and-recall-upper-bound","center-ness-and-a-controlled-baseline":"the-necessity-and-effectiveness-of-center-ness","the-test-dev-leaderboard-uses-another-schedule":"overall-comparison-with-contemporary-sota"},"guide":null,"tags":["object-detection","feature-fusion","label-assignment","adelaide"],"relatedReading":[{"id":"object-detection/retinanet","relation":"background","topic":"Dense detection and sample assignment"},{"id":"object-detection/atss","relation":"next","topic":"Dense detection and sample assignment"},{"id":"object-detection/gfl","relation":"comparison","topic":"Aligning classification and localization quality"}]}],"text":"In recent years, the development of object detection has split into two major factions: **Anchor-based** and **Anchor-free**.\n\n**Anchor-based Methods**\n\n- **Two-stage detectors** (e.g., Faster R-CNN) use **RPN proposal regions + R-CNN refinement**, maintaining a lead in accuracy over time through multiple iterations of regression.\n- **One-stage detectors** (e.g., SSD, RetinaNet) lay anchors across multiple feature maps, directly performing classification and regression. This approach is extremely efficient and has gradually caught up with two-stage performance.\n\n**Anchor-free Methods**\n\n- **Keypoint-based**: Reformulate detection as a keypoint localization problem. For example, CornerNet determines boxes by \"top-left + bottom-right\" corners, while ExtremeNet directly locates four extreme points and the center.\n- **Center-based**: Use the object’s center or region as the positive sample, then regress to the boundaries (e.g., YOLO, FCOS, FoveaBox).\n\n## Problem Definition\n\nThough these two schools appear divergent, they are essentially answering the same question:\n\n> **Which locations should be considered \"positive samples,\" and which as \"negative samples\"?**\n\nTake **RetinaNet (anchor-based)** and **FCOS (anchor-free, center-based)** as examples. Their main differences lie in three areas:\n\n1. **Sampling Unit**: RetinaNet places multiple anchors at each location; FCOS places only a single point per location.\n2. **Sample Definition**: RetinaNet uses IoU thresholds to distinguish positives and negatives; FCOS relies on spatial and scale rules.\n3. **Regression Origin**: RetinaNet starts from anchor boxes; FCOS predicts outward from a single point.\n\nHowever, through rigorous alignment experiments, the authors found:\n\n> **What truly determines performance differences is not \"box vs. point,\" but how positive and negative samples are defined.**\n\nIf both methods use the same sample selection strategy during training, the final results are actually quite similar! In other words, the divide between anchor-based and anchor-free isn't about architecture—it's about assignment: **the sample allocation strategy is the key!**\n\nThus, a few crucial questions remain at the heart of object detection:\n\n- Why rely on hand-crafted IoU thresholds or manually designed rules to divide positives and negatives?\n- Is it possible for the model to automatically select the right samples based on each object's statistical properties?\n\nAnd then, you can't help but ask: \"What about anchors?\"\n\nOh, they're already dead.\n\nAs witnesses to history, let's frame them and put them in a museum.\n\n## Problem Solving\n\nThe authors selected two representative methods for comparison: **RetinaNet** (anchor-based) and **FCOS** (anchor-free, center-based). On the surface, they have many structural differences, but to make a fair comparison, all \"unnecessary distractions\" must be eliminated one by one.\n\n### Removing Unfair Factors\n\nTo focus on the core difference, the authors modified RetinaNet so that each location has **only one square anchor** (referred to as RetinaNet #A=1), making its structure as close as possible to FCOS.\n\nEven so, there was still a clear gap on COCO minival: RetinaNet (#A=1) achieved **32.5% AP**, while FCOS had **37.1% AP**.\n\nAt this point, the authors noticed that FCOS introduced many \"general improvements\":\n\n- GroupNorm normalization\n- GIoU loss\n- Centerness branch\n- Requiring positive anchors' centers to lie inside the GT box\n- A learnable scalar for each feature pyramid layer\n\nThese techniques are not exclusive to anchor-free approaches and can also be applied to RetinaNet.\n\n\n\n![Analysis of implementation inconsistencies](/content/papers/assets/be7fbc5cba45aa660b9b0fbe789713697ce0057fa620417970820e74b143685d.jpg)\n\n\n\nAfter adding these improvements, RetinaNet (#A=1) improved to **37.0% AP**, nearly catching up with FCOS at **37.8% AP**.\n\nThis alignment closes the original **5.3-AP** gap to **0.8 AP**, showing that many apparent differences came from implementation settings shared by both detectors.\n\n### Pinpointing the True Difference\n\nAfter eliminating all \"external advantages,\" only two differences remained:\n\n1. **Sample Definition** (classification)\n2. **Regression Origin** (regression)\n\nLet's first look at the **sample definition** aspect.\n\n\n\n![Definition of positives and negatives](/content/papers/assets/eb5c0893f72157017487005de8070c2d3c2ff90c1a7a263974a20c056a2385dd.jpg)\n\n\nBlue cells marked 1 are positives, blue question marks are spatial candidates awaiting the scale filter, and gray cells marked 0 are negatives.\n\n\n\n\n\n---\n\n- RetinaNet selects positives and negatives via **IoU thresholds**: each GT's best anchor and anchors with IoU $>\\theta_p$ are positives, anchors with IoU $<\\theta_n$ are negatives, and the intermediate range is ignored.\n- FCOS uses **spatial + scale conditions**: points inside the box are candidate positives, then filtered by scale range at each layer, with the final survivors as positive samples.\n\nExperimental results show:\n\n- When RetinaNet (#A=1) switches to the \"spatial + scale\" rules of FCOS, AP increases from **37.0% → 37.8%**.\n- Conversely, when FCOS adopts the IoU threshold, AP drops from **37.8% → 36.9%**.\n\nUnder these aligned conditions, changing the sample definition affects AP more than changing the box-versus-point regression origin.\n\n---\n\nNext is the **regression origin** aspect.\n\n\n\n![RetinaNet vs FCOS](/content/papers/assets/117a7cdc51430c63fc5f3a01e95ed40de8aed866d4c72eb725ddf604a40cdc06.jpg)\n\n\n\n- RetinaNet predicts offsets from the anchor box.\n- FCOS predicts four distances outward from a single point.\n\nWhen both use the same sample assignment strategy in this controlled experiment, the regression-origin difference has little effect on AP:\n\n- Under the IoU rule, box and point regression reach **37.0 and 36.9 AP**; under spatial-and-scale assignment, both reach **37.8 AP**.\n\nThus, the authors conclude:\n\n- **In this controlled comparison, sample definition affects AP more than starting regression from a box or a point.**\n\n### Adaptive Training Sample Selection\n\nBefore introducing ATSS, let's define some notation:\n\n- $\\mathcal{G}$: the set of all ground-truth (GT) boxes in the image.\n- $\\mathcal{A}$: the set of all anchors; $L$ is the number of FPN layers, and anchors on each layer are $\\mathcal{A}_i$.\n- $k$: the main selection hyperparameter, the number of **anchors nearest the GT center** chosen per FPN level as candidates.\n- $C_g$: for a GT $g$, the collected candidate anchors ($k \\times L$ in total).\n- $D_g$: the IoU distribution between candidates and the GT.\n- $m_g$, $v_g$: the mean and standard deviation of $D_g$.\n- $t_g$: the adaptive IoU threshold for GT $g$ set by ATSS, defined as\n\n  $$\n  t_g = m_g + v_g\n  $$\n\n---\n\nTo address the aforementioned issues, ATSS proposed a new idea:\n\n> **Let each ground-truth object decide the boundary between positives and negatives for itself, instead of relying on manual settings.**\n\nThe procedure is as follows:\n\n1. **Select Candidates**: For each GT $g$, pick $k$ anchors per layer that are closest to its center, forming the candidate set $C_g$.\n2. **Compute Statistics**: Calculate the IoU distribution $D_g$ among the candidates, and obtain $m_g$ and $v_g$.\n3. **Adaptive Threshold**: Set $t_g = m_g + v_g$.\n4. **Select Positives**: Any anchor with IoU ≥ $t_g$ and center inside the box is added to the positive set $\\mathcal{P}_g$. If an anchor is chosen by multiple GTs, it is assigned to the GT with the highest IoU.\n5. All other anchors are negatives $\\mathcal{N}$.\n\n---\n\nThis design brings many benefits:\n\n- **Center-based candidate selection**: Whether anchor-based or anchor-free, candidates closer to the center are usually higher quality.\n\n- **Using $m_g+v_g$ as the threshold**:\n\n  - High $m_g$ → overall candidate quality is good → threshold should be high.\n  - Low $m_g$ → overall candidate quality is poor → threshold should be low to avoid missing GTs.\n  - High $v_g$ → only certain layers are suitable → raise the threshold, keeping only samples from those layers.\n  - Low $v_g$ → multiple layers are suitable → lower threshold, allowing more layers to participate.\n\n- **Reducing differences in sample counts**: In the authors' data, each GT has about $0.2\\times kL$ positives, relatively stable across object size, aspect ratio, and position. This is an empirical observation.\n\n- **Fewer main selection parameters**: Results are similar for $k$ from about 7 to 17 in this experiment. Computing IoU with box-shaped anchors still requires their size; the authors also test size and aspect-ratio sensitivity.\n\n---\n\nTo verify the effectiveness of ATSS **on anchor-based detectors**, the authors replaced the traditional sample assignment in **RetinaNet (#A=1)** with ATSS.\n\nAll evaluation metrics improved, as shown in the table below:\n\n\n\n![retinanet](/content/papers/assets/69916173ca687c362c237f151c593ebf474ba7de3602107f0b6777c94fb14904.jpg)\n\n\n\nThe authors attribute these improvements to each GT being able to adaptively select suitable positive samples based on its own statistical properties.\n\nATSS changes training-time sample assignment without changing the inference network, so it adds **no inference overhead**. Training still computes candidate IoUs and statistics.\n\nNext, the authors applied ATSS to the **anchor-free detector** FCOS, leading to two versions:\n\n1. **Lite Version (Center Sampling)**\n\n   - In original FCOS, all points inside the box are candidates, which introduces many low-quality positives.\n   - ATSS Lite: Select the $k=9$ nearest locations per layer as **candidate positives**, then retain the existing scale-range rule.\n   - This method has been integrated into official FCOS code as **center sampling**.\n   - Experimental results: AP improved **37.8 → 38.6** (as shown above).\n   - Downside: Still retains the scale range hyperparameter, not fully eliminated.\n\n2. **Full Version (Complete ATSS)**\n\n   - Temporarily treat FCOS points as square anchors with side length $8S$ ($S$ is the layer stride), then assign positives using the ATSS method.\n   - During regression, prediction is still from the point to the four boundaries, same as original FCOS.\n   - Experimental results:\n\n     | AP   | $AP_{50}$ | $AP_{75}$ | $AP_S$ | $AP_M$ | $AP_L$ |\n     | ---- | --------- | --------- | ------ | ------ | ------ |\n     | +1.4 | +1.7      | +1.7      | +0.6   | +1.3   | +2.7   |\n\nAlthough **Lite and Full** use similar spatial candidates, they differ in how they select samples across scales. Full reaches **39.2 AP**, above Lite's **38.6 AP**, but Lite has **57.4 AP50** versus Full's **57.3**; not every metric improves. The comparison supports the adaptive threshold over a fixed scale range for overall AP in this setup.\n\n## Discussion\n\nTo verify the final effectiveness of ATSS, the authors compared it with other mainstream detectors on **MS COCO test-dev**.\n\nThe experimental setup was as follows:\n\n- Used **multi-scale training** (randomly scaling the short side of images to between $640$ and $800$).\n- Doubled the total training steps to **180K**, with learning rate reductions at **120K / 160K**.\n- All other settings were consistent with previous experiments.\n\n### Comparison with Existing Methods\n\n\n\n![result](/content/papers/assets/002f13312ecd64c33dea0fdcfd683dfeecb263dfa9a48c74f1eb55cf72181e65.jpg)\n\n\n\n- With **ResNet-101** as the backbone, ATSS achieved **43.6% AP**, surpassing all other detectors using the same backbone:\n\n  - Cascade R-CNN: 42.8%\n  - C-Mask R-CNN: 42.0%\n  - RetinaNet: 39.1%\n  - RefineDet: 36.4%\n\n- With larger backbones:\n\n  - ResNeXt-32x8d-101 → **45.1%**\n  - ResNeXt-64x4d-101 → **45.6%**\n\n- ATSS is **0.1 percentage points** below the table's **SNIP (45.7 AP)** row. SNIP uses a different backbone and multi-scale training/testing, so this compares reported scores under different conditions.\n- With **DCN (Deformable Convolutional Networks)**:\n\n  - ResNet-101 → **46.3%**\n  - ResNeXt-32x8d-101 → **47.7%**\n  - ResNeXt-64x4d-101 → **47.7%**\n\nThe strongest listed ATSS model with DCN reaches **47.7 AP** in a single-model, single-scale test, above the other rows shown. With multi-scale testing it reaches **50.7 AP**. These rows also change backbone, DCN, and test scale; their gains cannot all be attributed to sample assignment alone.\n\nATSS changes positive/negative assignment. Several backbone configurations with ATSS achieve strong AP and can combine with DCN and multi-scale testing, while cross-model rows alone do not quantify ATSS's isolated gain.\n\n### Discussion on Number of Anchors\n\n\n\n![anchor](/content/papers/assets/4b5de352df230d4328d3c1c9da6f720be87d2e6a6f023de2e07ff06fce558993.jpg)\n\n\n\nMost experiments above were based on **RetinaNet (#A=1)**, but traditional RetinaNet places **9 anchors per location (3 scales × 3 aspect ratios)**.\n\n- With the traditional IoU-based assignment:\n\n  - RetinaNet (#A=9) → **36.3% AP**\n  - With general improvements (GroupNorm, GIoU loss, etc.) → **38.4% AP**\n  - For comparison, RetinaNet (#A=1) achieves **37.0% AP**.\n  - **Conclusion**: Under the traditional strategy, using more anchors does improve performance.\n\n- But after applying **ATSS**:\n\n  - RetinaNet (#A=9) rises from **38.4 to 39.2 AP**, a gain of **0.8 percentage points**.\n  - Results are nearly identical to RetinaNet (#A=1).\n  - Even if the number of scales or aspect ratios is reduced from 3 to 1, the performance hardly changes.\n\nIn this minival ablation, ATSS with one, three, or nine anchors per location all score **39.2–39.3 AP**. More anchors show no visible AP advantage within these tested settings, leading the authors to question whether tiling multiple anchors is necessary here.\n\n## Conclusion\n\nThe greatest contribution of ATSS is refocusing the core issue of object detection on **the definition of positives and negatives**. Through a simple statistical rule, each GT can automatically determine its own sample boundary, eliminating reliance on fixed IoU thresholds or scale ranges.\n\nATSS also sharpened the long anchor-based versus anchor-free debate: in the authors' controlled tests, assignment mattered more than whether regression started from a box or point. It improved these detectors without changing their inference networks, though training still performs assignment work.\n\nRelated later work kept asking how to choose useful training examples:\n\n- [**PAA**](https://arxiv.org/abs/2007.08103) and [**OTA / SimOTA**](https://arxiv.org/abs/2103.14259) explore probabilistic or optimization-based assignment; SimOTA appears in [YOLOX](https://arxiv.org/abs/2107.08430).\n- [**TOOD / TAL**](https://arxiv.org/abs/2108.07755) emphasize alignment between classification and localization during assignment.\n- [**VFL**](https://arxiv.org/abs/2008.13367) and [**GFLv2**](https://arxiv.org/abs/2011.12885) address how classification scores reflect localization quality. They are related scoring work, not direct ATSS assignment variants.\n\nBy 2025, many detector designs were exploring **global optimization (OTA)** and **task alignment (TAL)**. Transformer-based architectures such as [DETR](https://arxiv.org/abs/2005.12872) and DINO use Hungarian matching instead. These are related ways of asking:\n\n> **How can we ensure the model learns from the right samples?**\n\nWe identify the problem, then solve the problem.\n\nATSS is undoubtedly a classic work worth reading.\n","imageSizes":{"/content/papers/assets/be7fbc5cba45aa660b9b0fbe789713697ce0057fa620417970820e74b143685d.jpg":{"width":1048,"height":444},"/content/papers/assets/eb5c0893f72157017487005de8070c2d3c2ff90c1a7a263974a20c056a2385dd.jpg":{"width":1224,"height":552},"/content/papers/assets/117a7cdc51430c63fc5f3a01e95ed40de8aed866d4c72eb725ddf604a40cdc06.jpg":{"width":1224,"height":452},"/content/papers/assets/69916173ca687c362c237f151c593ebf474ba7de3602107f0b6777c94fb14904.jpg":{"width":1224,"height":336},"/content/papers/assets/002f13312ecd64c33dea0fdcfd683dfeecb263dfa9a48c74f1eb55cf72181e65.jpg":{"width":1660,"height":1588},"/content/papers/assets/4b5de352df230d4328d3c1c9da6f720be87d2e6a6f023de2e07ff06fce558993.jpg":{"width":1072,"height":340}}}
