# Introducing Resizable Region Packing Problem in Image Generation, with a Heuristic Solution

arXiv: https://arxiv.org/abs/2509.16363 · HTML: https://mlsanity.com/paper/2509.16363/

## Key facts

- No citing papers in the map yet (data through 14 Oct 2026).
- Builds on 27 of its 79 references that are in the map.
- First posted on arXiv 19 Sep 2025.

## Builds on (most cited first, 27 of 27)

- [Segment Anything](https://mlsanity.com/paper/2304.02643/) (2023)
- [The Cityscapes Dataset for Semantic Urban Scene Understanding](https://mlsanity.com/paper/1604.01685/) (2016)
- [ImageNet-trained CNNs are biased towards texture; increasing shape bias improves accuracy and robustness](https://mlsanity.com/paper/1811.12231/) (2018)
- [Semantic Image Synthesis with Spatially-Adaptive Normalization](https://mlsanity.com/paper/1903.07291/) (2019)
- [A Unifying Review of Deep and Shallow Anomaly Detection](https://mlsanity.com/paper/2009.11732/) (2020)
- [SEAN: Image Synthesis with Semantic Region-Adaptive Normalization](https://mlsanity.com/paper/1911.12861/) (2019)
- [Reduce, Reuse, Recycle: Compositional Generation with Energy-Based Diffusion Models and MCMC](https://mlsanity.com/paper/2302.11552/) (2023)
- [Semantic Image Synthesis via Diffusion Models](https://mlsanity.com/paper/2207.00050/) (2022)
- [Delta-encoder: an effective sample synthesis method for few-shot object recognition](https://mlsanity.com/paper/1806.04734/) (2018)
- [FreeMask: Synthetic Images with Dense Annotations Make Stronger Segmentation Models](https://mlsanity.com/paper/2310.15160/) (2023)
- [TextureGAN: Controlling Deep Image Synthesis with Texture Patches](https://mlsanity.com/paper/1706.02823/) (2017)
- [DeltaGAN: Towards Diverse Few-shot Image Generation with Sample-Specific Delta](https://mlsanity.com/paper/2009.08753/) (2020)
- [Tactile-Based Insertion for Dense Box-Packing](https://mlsanity.com/paper/1909.05426/) (2019)
- [Edge Guided GANs with Contrastive Learning for Semantic Image Synthesis](https://mlsanity.com/paper/2003.13898/) (2020)
- [Shapes In A Box -- Disassembling 3D objects for efficient packing and fabrication](https://mlsanity.com/paper/2104.05281/) (2021)
- [Best Fit Bin Packing with Random Order Revisited](https://mlsanity.com/paper/2012.00511/) (2020)
- [One-Shot Synthesis of Images and Segmentation Masks](https://mlsanity.com/paper/2209.07547/) (2022)
- [Small Boxes Big Data: A Deep Learning Approach to Optimize Variable Sized Bin Packing](https://mlsanity.com/paper/1702.04415/) (2017)
- [Solving Logistic-Oriented Bin Packing Problems Through a Hybrid Quantum-Classical Approach](https://mlsanity.com/paper/2308.02787/) (2023)
- [Total stretch minimization on single and identical parallel machines](https://mlsanity.com/paper/1404.6502/) (2014)
- [Anchored Rectangle and Square Packings](https://mlsanity.com/paper/1603.00060/) (2016)
- [Online Strip Packing with Polynomial Migration](https://mlsanity.com/paper/1706.04939/) (2017)
- [Maximum Area Axis-Aligned Square Packings](https://mlsanity.com/paper/1806.09562/) (2018)
- [Packing Boundary-Anchored Rectangles and Squares](https://mlsanity.com/paper/1906.11948/) (2019)
- [A better lower bound for Lower-Left Anchored Rectangle Packing](https://mlsanity.com/paper/2102.05747/) (2021)
- [On Greedily Packing Anchored Rectangles](https://mlsanity.com/paper/2102.08181/) (2021)
- [Hardness and Tight Approximations of Demand Strip Packing](https://mlsanity.com/paper/2404.15917/) (2024)

## Abstract (arXiv)

The problem of image data generation in computer vision has traditionally been a harder problem to solve, than discriminative problems. Such data generation entails placing relevant objects of appropriate sizes each, at meaningful location in a scene canvas. There have been two classes of popular approaches to such generation: graphics based, and generative models-based. Optimization problems are known to lurk in the background for both these classes of approaches. In this paper, we introduce a novel, practically useful manifestation of the classical Bin Packing problem in the context of generation of synthetic image data. We conjecture that the newly introduced problem, Resizable Anchored Region Packing(RARP) Problem, is NP-hard, and provide detailed arguments about our conjecture. As a first solution, we present a novel heuristic algorithm that is generic enough and therefore scales and packs arbitrary number of arbitrary-shaped regions at arbitrary locations, into an image canvas. The algorithm follows greedy approach to iteratively pack region pairs in a careful way, while obeying the optimization constraints. The algorithm is validated by an implementation that was used to generate a large-scale synthetic anomaly detection dataset, with highly varying degree of bin packing parameters per image sample i.e. RARP instance. Visual inspection of such data and checking of the correctness of each solution proves the effectiveness of our algorithm. With generative modeling being on rise in deep learning, and synthetic data generation poised to become mainstream, we expect that the newly introduced problem will be valued in the imaging scientific community.
