{"notes":[{"id":"retail-product/sku-110k","category":"retail-product","legacyPath":"retail-product/1904-sku-110k","legacySlug":"1904-sku-110k","legacyPaths":[],"title":"SKU-110K","subtitle":"Densely Packed Shelves","author":"Z. Yuan","paperDate":"2019-04-01","publishedOn":"2025-07-20","paperTitle":"Precise Detection in Densely Packed Scenes","paperUrl":"https://arxiv.org/abs/1904.00853","bibliography":{"title":"Precise Detection in Densely Packed Scenes","authors":["Eran Goldman","Roei Herzig","Aviv Eisenschtat","Oria Ratzon","Itsik Levi","Jacob Goldberger","Tal Hassner"],"url":"https://arxiv.org/abs/1904.00853","pdfUrl":"https://arxiv.org/pdf/1904.00853","codeUrl":null,"preprint":{"id":"1904.00853","submittedOn":"2019-04-01","url":"https://arxiv.org/abs/1904.00853"},"publication":{"venue":"CVPR","year":2019,"kind":"conference","url":"https://arxiv.org/abs/1904.00853"},"citation":"@misc{retailproductsku110k2019,\n  title = {{Precise Detection in Densely Packed Scenes}},\n  author = {Eran Goldman and Roei Herzig and Aviv Eisenschtat and Oria Ratzon and Itsik Levi and Jacob Goldberger and Tal Hassner},\n  year = {2019},\n  eprint = {1904.00853},\n  archivePrefix = {arXiv},\n  url = {https://arxiv.org/abs/1904.00853}\n}\n","citationPath":"/content/papers/citations/retail-product/sku-110k.42c961604a3a.bib"},"thumbnail":{"src":"/content/papers/assets/b799b1c658e22c95de2d7d7d365328e7a70cd69db602d827ef82dae2490eee5e.jpg","width":1680,"height":448},"locale":"en","path":"/content/papers/en/retail-product/sku-110k.b38f51bb9d79.md","headings":[{"id":"problem-definition","text":"Problem Definition","depth":2},{"id":"solution","text":"Solution","depth":2},{"id":"basic-architecture","text":"Basic Architecture","depth":3},{"id":"soft-iou","text":"Soft-IoU","depth":3},{"id":"em-merger","text":"EM-Merger","depth":3},{"id":"sku-110k-dataset-and-benchmark-construction","text":"SKU-110K Dataset and Benchmark Construction","depth":2},{"id":"dataset-statistics-and-splits","text":"Dataset Statistics and Splits","depth":3},{"id":"evaluation-metrics-and-criteria","text":"Evaluation Metrics and Criteria","depth":3},{"id":"discussion","text":"Discussion","depth":2},{"id":"inference-speed-analysis","text":"Inference Speed Analysis","depth":3},{"id":"detection-and-counting-experiments","text":"Detection and Counting Experiments","depth":3},{"id":"generalization-experiments-on-carpk-and-pucpr","text":"Generalization Experiments on CARPK and PUCPR+","depth":3},{"id":"conclusion","text":"Conclusion","depth":2}],"anchorAliases":{},"guide":null,"relatedReading":[{"id":"object-detection/retinanet","relation":"comparison","topic":"Detecting densely packed retail products"}]},{"id":"object-detection/retinanet","category":"object-detection","legacyPath":"object-detection/1708-retinanet","legacySlug":"1708-retinanet","legacyPaths":[],"title":"RetinaNet","subtitle":"Focal Loss is the Key","author":"Z. Yuan","paperDate":"2017-08-07","publishedOn":"2024-08-08","paperTitle":"Focal Loss for Dense Object Detection","paperUrl":"https://arxiv.org/abs/1708.02002","bibliography":{"title":"Focal Loss for Dense Object Detection","authors":["Tsung-Yi Lin","Priya Goyal","Ross Girshick","Kaiming He","Piotr Dollár"],"url":"https://arxiv.org/abs/1708.02002","pdfUrl":"https://arxiv.org/pdf/1708.02002","codeUrl":null,"preprint":{"id":"1708.02002","submittedOn":"2017-08-07","url":"https://arxiv.org/abs/1708.02002"},"publication":{"venue":"ICCV","year":2017,"kind":"conference","url":"https://openaccess.thecvf.com/content_iccv_2017/html/Lin_Focal_Loss_for_ICCV_2017_paper.html"},"citation":"@misc{objectdetectionretinanet2017,\n  title = {{Focal Loss for Dense Object Detection}},\n  author = {Tsung-Yi Lin and Priya Goyal and Ross Girshick and Kaiming He and Piotr Dollár},\n  year = {2017},\n  eprint = {1708.02002},\n  archivePrefix = {arXiv},\n  url = {https://arxiv.org/abs/1708.02002}\n}\n","citationPath":"/content/papers/citations/object-detection/retinanet.7782ba4afe61.bib"},"thumbnail":{"src":"/content/papers/assets/72e05351a2bee439214afa9c111f8ec8ca466561a1fbd6be2b98cbd43305ad47.jpg","width":1746,"height":492},"locale":"en","path":"/content/papers/en/object-detection/retinanet.5feba1136b30.md","headings":[{"id":"problem-definition","text":"Problem Definition","depth":2},{"id":"solution","text":"Solution","depth":2},{"id":"focal-loss","text":"Focal Loss","depth":3},{"id":"model-architecture","text":"Model Architecture","depth":3},{"id":"training-parameters","text":"Training Parameters","depth":3},{"id":"discussion","text":"Discussion","depth":2},{"id":"experimental-results-on-the-coco-dataset","text":"Experimental Results on the COCO Dataset","depth":3},{"id":"ablation-studies","text":"Ablation Studies","depth":3},{"id":"conclusion","text":"Conclusion","depth":2}],"anchorAliases":{"make-cross-entropy-respond-to-difficulty":"focal-loss","putting-retinanet-together":"model-architecture","experimental-results-and-discussion":"discussion","compare-losses-on-the-same-model-first":"ablation-studies","read-accuracy-together-with-its-conditions":"experimental-results-on-the-coco-dataset"},"guide":null,"relatedReading":[{"id":"object-detection/fcos","relation":"next","topic":"Dense detection and sample assignment"},{"id":"retail-product/sku-110k","relation":"comparison","topic":"Detecting densely packed retail products"},{"id":"text-recognition/safl","relation":"next","topic":"Focal Loss from detection to text recognition"}]}],"text":"This is also an earlier piece of literature.\n\nHowever, the benchmark established in this paper has become a recurring benchmark in subsequent work on dense retail-product detection.\n\n## Problem Definition\n\nModern object detection techniques have demonstrated very high accuracy and speed in natural scenes. However, mainstream methods struggle when faced with densely arranged, visually similar, and closely adjacent objects.\n\nSuch \"high-density scenes\" are actually very common, for example: retail shelf displays, urban traffic surveillance footage, or indoor warehouse and stacking environments.\n\nThese scenes typically have several notable characteristics:\n\n1. **A very large number of objects, arranged tightly and often occluding each other.**\n2. **Highly similar appearances, making boundary distinction difficult.**\n\nTraditional object detection methods, such as Faster R-CNN, YOLO, RetinaNet, etc., perform well in natural scenes but mostly rely on post-processing steps like **Non-Maximum Suppression (NMS)** to eliminate overlapping boxes. This hard suppression strategy shows clear bottlenecks in dense scenes. For example, a single real object might be split into multiple small boxes, or several adjacent objects might be mistakenly detected as one.\n\nAlthough previous research has proposed various alternatives such as Mean-Shift, Agglomerative clustering, or learnable NMS layers (e.g., GossipNet), most methods are either computationally expensive or fail to truly replace traditional NMS, especially in high-density, visually similar object scenarios.\n\nFurthermore, current mainstream datasets (e.g., COCO, VOC, Open Images) mainly contain natural scenes and lack good standards for these \"dense, similar, overlapping\" special scenes. Even datasets emphasizing crowd or vehicle congestion, like CARPK and PUCPR+, fall far short in item density and classification difficulty compared to real retail environments.\n\nSo, when facing these \"crowded, look-alike, and numerous\" scenes, how can deep learning models accurately distinguish each individual object while maintaining efficiency and stability?\n\nCan we find a way to **let the model “know how precise its bounding boxes are”?**\n\nThe authors of this paper propose: Let’s start with Soft-IoU.\n\n## Solution\n\n![overview](/content/papers/assets/b799b1c658e22c95de2d7d7d365328e7a70cd69db602d827ef82dae2490eee5e.jpg)\n\nThe main baseline compared in this paper is RetinaNet, because it already performs quite well in dense scenes but still has room for improvement. The authors extend the standard detection architecture with two additions:\n\n1. **Introduce a Soft-IoU prediction head**: allowing the model to estimate “how much this box overlaps with the ground truth”;\n2. **Propose an EM-Merger inference unit**: converting multiple detection boxes into Gaussian distributions, then resolving overlaps via probabilistic clustering.\n\nTogether, these two designs reduce overlapping detections in dense scenes.\n\n### Basic Architecture\n\nThe authors use ResNet-50 as the backbone and build a Feature Pyramid Network (FPN) with three upsampling layers to generate multi-scale feature maps.\n\nAt each feature level, this RetinaNet-style single-stage detector has three convolutional output heads; these are not a separate two-stage RPN:\n\n- **Detection head**: regress bounding box center and size: $(x, y, h, w)$\n- **Classification head**: predict objectness confidence $c \\in [0, 1]$\n- **Soft-IoU head**: predict the overlap degree between the box and the true object $c_{\\text{iou}}$\n\nTo avoid introducing excessive noise when training Soft-IoU, candidate boxes with classification scores below 0.1 are filtered out.\n\n### Soft-IoU\n\nIn non-crowded scenes, objectness score + NMS is usually sufficient. But in dense scenes, multiple high-confidence boxes may correspond to different objects or be false detections caused by occlusion, so a more refined “overlap quality metric” is needed.\n\nSoft-IoU is designed for this purpose. It predicts the IoU score between each box and its ground truth box. For each detection box $b_i$, the closest ground truth box $\\hat{b}_i$ is found, then:\n\n$$\n\\text{IoU}_i = \\frac{\\text{Intersection}(\\hat{b}_i, b_i)}{\\text{Union}(\\hat{b}_i, b_i)}\n$$\n\nIf there is no intersection, IoU is set to 0.\n\nThis value serves as ground truth to train the Soft-IoU prediction head with a binary cross-entropy loss:\n\n$$\n\\mathcal{L}_{\\text{sIoU}} = -\\frac{1}{n} \\sum_{i=1}^n \\left[ \\text{IoU}_i \\log(c_{\\text{iou},i}) + (1 - \\text{IoU}_i) \\log(1 - c_{\\text{iou},i}) \\right]\n$$\n\nThe overall loss is the sum of three terms:\n\n$$\n\\mathcal{L} = \\mathcal{L}_{\\text{cls}} + \\mathcal{L}_{\\text{reg}} + \\mathcal{L}_{\\text{sIoU}}\n$$\n\nwhere the first two are standard classification and regression losses.\n\nA special point is that **objectness** predicts “whether there is an object,” while **Soft-IoU** predicts “how precise this box is.” Thus, a box partially covering an object may have a high objectness score but a lower Soft-IoU. These two signals complement each other.\n\n### EM-Merger\n\n\n\n![EM-Merger](/content/papers/assets/b7c54bd3cdbcf18cc20087f18a88de65a1bc5a0a639847d43646be6ad58b526c.jpg)\n\n\n\nThrough Soft-IoU, each detection box has two confidence values:\n\n- $c$: presence of an object\n- $c_{\\text{iou}}$: accuracy of the box\n\nThe problem is these boxes may overlap and cluster together.\n\nHow do we precisely find each object from these overlapping candidates?\n\nThe authors’ solution is to treat each detection box as a **2D Gaussian distribution**:\n\n$$\nf_i(p) = \\mathcal{N}(p; \\mu_i, \\Sigma_i)\n$$\n\nwhere:\n\n- Mean $\\mu_i = (x_i, y_i)$: box center;\n- Covariance $\\Sigma_i = \\text{diag}\\left[\\left(\\frac{w_i}{4}\\right)^2, \\left(\\frac{h_i}{4}\\right)^2\\right]$: reflecting box size.\n\nThese Gaussians form a mixture model (MoG):\n\n$$\nf(p) = \\sum_{i=1}^N \\alpha_i f_i(p), \\quad \\alpha_i = \\frac{c_{\\text{iou},i}}{\\sum_k c_{\\text{iou},k}}\n$$\n\nHere the covariance follows the coordinate order (x, y): width corresponds to x and height to y. The paper’s displayed height/width ordering uses a different convention; coordinate order must be kept consistent in implementation. The mixture is a spatial density constructed from boxes, not a calibrated probability that a given pixel is an object center.\n\nNext, the MoG is reduced to a smaller number $K \\ll N$ of high-confidence Gaussians $g_j$ representing the true object detections. The goal is to approximate the original distribution $f(p)$ with $g(p)$ by minimizing:\n\n$$\nd(f, g) = \\sum_{i=1}^N \\alpha_i \\min_{j=1,...,K} \\text{KL}(f_i \\| g_j)\n$$\n\nwhere KL is the Kullback–Leibler divergence.\n\nThe authors initialize the clusters with hierarchical agglomerative clustering, then approximately solve this minimization with EM-like steps:\n\n- **E-step**: assign each detection box to the nearest cluster (by KL divergence)\n\n  $$\n  \\pi(i) = \\arg\\min_j \\text{KL}(f_i \\| g_j)\n  $$\n\n- **M-step**: re-estimate each cluster’s parameters\n\n  $$\n  \\beta_j = \\sum_{i \\in \\pi^{-1}(j)} \\alpha_i\n  $$\n\n  $$\n  \\mu'_j = \\frac{1}{\\beta_j} \\sum_{i \\in \\pi^{-1}(j)} \\alpha_i \\mu_i\n  $$\n\n  $$\n  \\Sigma'_j = \\frac{1}{\\beta_j} \\sum_{i \\in \\pi^{-1}(j)} \\alpha_i \\left[\\Sigma_i + (\\mu_i - \\mu'_j)(\\mu_i - \\mu'_j)^T\\right]\n  $$\n\nThe iteration stops on convergence or at the configured cap of 10 iterations; convergence within 10 iterations is not guaranteed. The initial cluster count $K$ is bounded by the image area divided by the area of a mean-sized box. After clustering, lower-confidence Gaussians overlapping others beyond a threshold are suppressed, leaving $K' \\leq K$ detections.\n\nFinally, for each cluster center, an ellipse with twice the standard deviation is drawn. The original detection boxes inside this ellipse are collected, and the median width and height are taken as the final bounding box.\n\nThis is the overall inference pipeline: **Soft-IoU as quality prediction → MoG expressing a spatial distribution → EM clustering and overlap suppression → fewer neighboring objects discarded and fewer duplicate detections.**\n\n## SKU-110K Dataset and Benchmark Construction\n\nThe lack of breakthroughs in dense detection is partly due to the absence of high-quality datasets specifically designed for this task.\n\nTo address this, the authors created a brand-new dataset, **SKU-110K**, specifically targeting retail shelf environments. From design motivation to annotation quality, it was planned with the characteristics required for high-density scenes.\n\nThe dataset images were collected from thousands of physical stores across the United States, Europe, and East Asia, taken by dozens of photographers using personal smartphones to ensure the images reflect natural, unarranged real-world shelf displays.\n\n- Each original image has a resolution of at least **5MP**, later compressed to **1MP JPEG**;\n- No restrictions were placed on capture devices or angles, preserving natural lighting, blur, occlusions, and other real-world disturbances;\n- Annotation was performed by **skilled full-time personnel** rather than crowdsourcing, further improving annotation accuracy and consistency;\n- All images and annotations were manually reviewed to filter out obvious mislabels and incorrect boxes.\n\n### Dataset Statistics and Splits\n\nSKU-110K contains three subsets, ensuring that shelves from the same store do not appear in multiple subsets:\n\n\n\n| Dataset    | Images |     Boxes | Ratio |\n| ---------- | -----: | --------: | ----: |\n| Training   |  8,233 | 1,210,431 |   70% |\n| Validation |    588 |    90,968 |    5% |\n| Testing    |  2,941 |   432,312 |   25% |\n\n\n\nThe split counts imply about 148 annotated objects per image overall, illustrating the dataset’s density. A blanket claim of one to three orders of magnitude above other datasets is not justified by these counts alone.\n\n### Evaluation Metrics and Criteria\n\nThe main evaluation criteria follow COCO standards, including:\n\n- **AP@\\[.50:.95]**: primary challenge metric;\n- **AP\\@.75**: strict localization accuracy;\n- **AR\\@300**: average recall limited to 300 predictions;\n- **PR\\@0.5 (IoU=0.75)**: precision at 50% recall sample point.\n\nAdditionally, to balance detection and counting performance, the authors introduced error metrics:\n\n- **MAE (Mean Absolute Error)**\n\n  $$\n  \\text{MAE} = \\frac{1}{n} \\sum_{i=1}^n |K_i' - t_i|\n  $$\n\n- **RMSE (Root Mean Squared Error)**\n\n  $$\n  \\text{RMSE} = \\sqrt{ \\frac{1}{n} \\sum_{i=1}^n (K_i' - t_i)^2 }\n  $$\n\nwhere $K_i'$ is the model’s predicted object count per image, and $t_i$ is the ground truth count.\n\nThe photographs contain many product appearances, but the benchmark uses one foreground object class for localization and counting. It does not evaluate recognition of individual SKU identities or fine-grained product classification.\n\n## Discussion\n\n### Inference Speed Analysis\n\n\n\n![inference speed](/content/papers/assets/23632dca5cb529f639945e6e1446e1eb7e50f20be7b6425ca1c2185cefde464b.jpg)\n\n\n\nTo verify model deployability, the authors measured average inference performance on identical hardware (Intel i7-5930K + GTX Titan X), using metrics:\n\n- **FPS (Frames Per Second)**: number of images processed per second;\n- **DPS (Detections Per Second)**: number of objects detected per second.\n\nResults:\n\n- **Base Detector (RetinaNet isomorphic)**: baseline inference speed;\n- **Adding Soft-IoU Layer**: the same **0.5 FPS** as the base detector in this table;\n- **EM-Merger**: drops to **0.23 FPS**, largely because of frequent exchanges between GPU and CPU/RAM.\n\nAlthough EM-Merger is currently slower, its accuracy gain justifies deployment optimization. The authors note that implementing it on GPU could greatly improve speed.\n\n### Detection and Counting Experiments\n\nSeveral comparisons and ablations were designed:\n\n- **Monkey**: randomly throws boxes while given the object count and box-size statistics as a comparison;\n- **Base & NMS**: base architecture + traditional NMS;\n- **Soft-IoU & NMS**: NMS using Soft-IoU scores;\n- **Base & EM-Merger**: retaining original objectness, only EM clustering;\n- **Full System (this paper’s method)**: Soft-IoU + EM-Merger.\n\nDetection results:\n\n\n\n![detection results](/content/papers/assets/d55acc083eb07d7119c8f76d3701597038d9d1366cf6421a366f80c7bd0f7169.jpg)\n\n\n\n- **Monkey** is almost ineffective, proving density alone is insufficient;\n- **Faster R-CNN / YOLO9000opt** perform poorly under this dense benchmark configuration; 50 objects is not a hard architectural limit;\n- **RetinaNet** performs relatively stably and slightly better than the authors’ Base.\n\nThe **full method** exceeds the baselines on all the table's detection metrics (AP\\@.5–.95, AP\\@.75, AR\\@300, and P\\@R=.5). Merely adding Soft-IoU while keeping NMS offers only small gains; its AR\\@300 is even slightly below Base & NMS.\n\nFor counting, the predicted number $K'$ is compared with the true count $t$. RetinaNet records **16.584 MAE / 30.702 RMSE**, against **14.522 / 23.992** for the full method. The authors attribute part of the gap to greedy NMS. But **Base & EM-Merger has 283.971 RMSE** in Table 3, showing that EM clustering alone is not enough.\n\nThis indicates Soft-IoU provides a better candidate evaluation criterion, while EM-Merger effectively separates crowded areas. Together, they substantially improve counting stability.\n\nBelow are sample SKU-110K test images comparing the method with RetinaNet. In these examples, the method reduces overlapping and mislocalized boxes, producing more one-box-per-object results.\n\n\n\n![detection results](/content/papers/assets/d5e13d8a8d16182852c19adc5d2efc71a2215861f32a2c4bf289caae422929aa.jpg)\n\n\n\n### Generalization Experiments on CARPK and PUCPR+\n\n\n\n![car counting results](/content/papers/assets/69840dc240c2bdbd7a7d34c8976005a7ee919b27b91f6bd10c401a4072355e71.jpg)\n\n\n\nTo verify generalization, the authors applied their method to two vehicle counting datasets: CARPK and PUCPR+.\n\nResults show that although this method was not specifically designed for vehicle counting, it still achieves excellent performance on both datasets, outperforming other methods in MAE and RMSE.\n\n## Conclusion\n\nThis study proposes the Soft-IoU layer and EM-Merger module as concrete engineering solutions to overlapping box issues in dense scenes. The former complements the blind spot of objectness which cannot measure boundary precision, while the latter replaces traditional NMS with probabilistic clustering to enhance localization clarity and deduplication.\n\nOn SKU-110K, the method outperforms contemporaneous mainstream architectures on both detection and counting metrics, confirming its effectiveness. However, from today’s perspective, main limitations include:\n\n- **Single-foreground-class evaluation**: additional category supervision and evaluation would be needed for SKU recognition;\n- **EM-Merger is challenging to deploy in real-time systems**, inference speed still needs optimization;\n- **Lacks integration of semantic information**, still prone to confusion in fine-grained appearance variations.\n\nAlthough published years ago, this method’s contribution to dense object detection remains valuable. Especially SKU-110K’s extreme crowded scenes remain common in many domains today (e.g., self-checkout, smart warehousing, traffic monitoring), serving as a good benchmark for evaluating model generalization.\n","imageSizes":{"/content/papers/assets/b799b1c658e22c95de2d7d7d365328e7a70cd69db602d827ef82dae2490eee5e.jpg":{"width":1680,"height":448},"/content/papers/assets/b7c54bd3cdbcf18cc20087f18a88de65a1bc5a0a639847d43646be6ad58b526c.jpg":{"width":1036,"height":816},"/content/papers/assets/23632dca5cb529f639945e6e1446e1eb7e50f20be7b6425ca1c2185cefde464b.jpg":{"width":740,"height":364},"/content/papers/assets/d55acc083eb07d7119c8f76d3701597038d9d1366cf6421a366f80c7bd0f7169.jpg":{"width":996,"height":444},"/content/papers/assets/d5e13d8a8d16182852c19adc5d2efc71a2215861f32a2c4bf289caae422929aa.jpg":{"width":1084,"height":1080},"/content/papers/assets/69840dc240c2bdbd7a7d34c8976005a7ee919b27b91f6bd10c401a4072355e71.jpg":{"width":1000,"height":1036}}}
