Beyond Bounding-Box: Convex-hull Feature Adaptation for Oriented and Densely Packed Object Detection
- Publication
- CVPR 2021Conference
Cite this paper · BibTeX
The citation identifies the linked source version. It cites the original paper and its authors.
@inproceedings{retailproductcfa2021,
title = {{Beyond Bounding-Box: Convex-hull Feature Adaptation for Oriented and Densely Packed Object Detection}},
author = {Zonghao Guo and Chang Liu and Xiaosong Zhang and Jianbin Jiao and Xiangyang Ji and Qixiang Ye},
year = {2021},
booktitle = {CVPR},
url = {https://doi.org/10.1109/CVPR46437.2021.00868},
doi = {10.1109/CVPR46437.2021.00868}
}
The year before, DRN relabeled SKU-110K with rotated boxes and also made the convolution's sampling grid rotate by an angle.
This paper, from the University of Chinese Academy of Sciences and Tsinghua University, looks at it from a different angle. The authors argue that the problem is not whether the box is rotated correctly but the shape of a "box" itself. Convolution features sit on a square grid, while objects come in all sorts of irregular shapes and are placed one right against the next. Whether the box is upright or tilted, the features of neighboring objects get mixed together.
Their answer is to stop describing objects with boxes and use instead the convex hull enclosed by a set of movable feature points.
Problem Definition

The authors call this problem feature aliasing. When two objects are close together, their receptive fields overlap, and the same patch of features belongs to both objects. The heat map at the far right of the top row shows exactly this. The two planes blur into one blob, and the detector has a hard time telling whether there is one plane here or two.
Products on shelves, cars in parking lots, ships in harbors: all of them are tilted and crowded. Rotated boxes can fit a bit more tightly, but a box is still a rectangle, and each position gets only one box; for crowded objects, the features in the overlap between boxes still get mixed together.
Solution

CFA is built on RepPoints. RepPoints is an anchor-free detector that does not regress the four sides of a box directly; instead, at each position it predicts offsets for 9 points, lets those points move onto the object by themselves, and then derives a box from how the points are distributed. These 9 points are also the sampling points of a deformable convolution, so wherever the points move, that is where the features are taken from.
CFA has two stages. The first encloses the points in convex hulls; the second decides which convex hulls count.
Stage One: Enclosing a Convex Hull
Each position on the feature map starts with 9 points arranged in a grid. The network predicts an offset for each point, and the points move to their new positions.
After the points move, they are not necessarily convex any more: some may drift into the middle, some may cross over. So after every iteration they are enclosed again with the Jarvis March algorithm (also called gift wrapping): start from the leftmost point and go counter-clockwise, each time picking the next point with the "largest turning angle", until you get back to the start. Points enclosed inside are not counted as vertices of the convex hull.
How do you measure the overlap between a convex hull and an annotated box? The authors use a convex-hull version of GIoU, which the paper calls CIoU:
is the convex hull, is the annotated rotated box, and is the smallest convex polygon enclosing both. The first term is the ordinary IoU; the second subtracts "the part of the smallest enclosing polygon covered by neither", so there is a gradient to push with even when the two don't intersect. The localization loss is .
Stage one is trained with this localization loss alone, so the points learn to move onto the objects.

This figure shows how the convex hulls grow. At first the points drift around; after a few epochs they gradually gather on each car, and in the end every convex hull hugs one car, with most of its points inside the car body. At inference, taking the minimum enclosing rectangle of the convex hull gives the output rotated box.
Stage Two: Deciding Which Convex Hulls Count
Stage two deals with feature aliasing. The key idea is that an object corresponds not to one convex hull but to a group of them; within the group, some convex hulls belong only to this object, while others straddle the neighboring object, and the latter should be down-weighted or even thrown out.
First, Pick a Group of Candidates for Each Object
For each annotated object, the convex hulls on each FPN level with the highest CIoU against it form the object's convex-hull set ; those not picked by any object go into the negative set . In the experiments, works best.
The loss of a positive convex hull is the classification loss (focal loss) plus the localization loss: . The loss of the whole set is a weighted average of the convex-hull losses:
The weight is a decreasing function: the smaller a convex hull's loss, the larger its weight.
Splitting the Set by Gradient Direction
Of these 6 candidates, which should stay? The authors' principle is called "gradient consistency": if a convex hull is a good positive sample, lowering its loss should also lower the loss of the whole set.
Seen as a function of , first rises and then falls, with a single peak. To the left of the peak, a lower loss lowers , in step with the set; to the right it is the opposite, and a lower loss makes this term larger. So with this peak as the boundary, convex hulls on the left stay in the positive set and those on the right go to the negative set.
Where is the peak? With the the paper gives, we solve and get . In other words, convex hulls whose combined classification and localization loss is below roughly 0.53 count as positives, and those above count as negatives.
Intuitively, the convex hulls with very high loss are mostly the ones sitting between two objects that classification can't make up its mind about either. Kicking them out of the positives means aliased features no longer get used to learn this object.
Shared Convex Hulls Get a Discount
One case remains: a convex hull whose loss is not high but which overlaps several objects at once. The authors add an anti-aliasing coefficient:
The numerator is this convex hull's overlap with object , and the denominator is the sum of its overlaps with all the objects it overlaps. Suppose a convex hull has a CIoU of 0.6 with object A and 0.3 with the neighboring object B, and . For A, ; for B it is 0.25. If this convex hull touched only A, would be the full 0.75.
The more objects share a convex hull, the smaller its weight in each object's loss. The final set loss becomes .
The sets, the split and the coefficient are all used only during training. At inference only stage one's convex-hull generation runs, the minimum enclosing rectangle is taken, and the output comes after NMS, at about the same cost as RepPoints.
Discussion
SKU110K-R
| Method | mAP | AP75 | AR300 |
|---|---|---|---|
| YOLOv3-Rotate | 49.1 | 51.1 | 58.2 |
| CenterNet-4point | 34.3 | 19.6 | 42.2 |
| CenterNet | 54.7 | 61.1 | 62.2 |
| DRN | 55.9 | 63.1 | 63.3 |
| CFA | 57.0 | 63.5 | 63.9 |
Source: Table 2 of the paper.
The gain on shelves is 1.1 points, and the numbers in the first four rows are copied straight from the DRN paper's table. AP75 rises by only 0.4, so the boxes fit about as tightly as DRN's; the main difference lies at the other IoU thresholds. The paper does not say which backbone this experiment uses; DRN used Hourglass-104.
DOTA
The paper's main battleground is again aerial DOTA. With single-scale testing, CFA scores 75.05 with ResNet-101 and 76.67 with ResNet-152; DRN scores 70.70 single-scale and 72.95 multi-scale. The authors point out that the biggest gains are in categories with irregular shapes that are often crowded together, such as small vehicles, large vehicles, roundabouts, harbors and swimming pools; swimming pools, for example, go from 68.60 to 80.76.
Watch the conditions when comparing with other methods. Several rows for CSL and Gliding Vertex in the table use multi-scale testing, with CSL at 76.17 multi-scale; CFA reports single-scale only.
Ablations
The ablations are run on the DOTA validation set with a ResNet-50 backbone; the baseline is RepPoints with an added angle branch:
| Component added | mAP | Gain |
|---|---|---|
| Baseline (SmoothL1 loc. loss) | 65.35 | |
| CIoU loss instead | 66.30 | +0.95 |
| Convex-hull generation | 68.18 | +1.88 |
| Convex-hull set split | 69.70 | +1.52 |
| Anti-aliasing coefficient | 70.13 | +0.43 |
Source: Table 3 of the paper.
The four components add 4.78 points in total, with the convex hull itself and the set split each contributing more than one and a half. The anti-aliasing coefficient contributes the least, 0.43. As for hyperparameters, a CIoU threshold of 0.2, 6 candidates per level and are the best values.

This heat map is the reciprocal of the positive convex-hull loss during training, so brighter means lower loss. Without feature adaptation, a whole row of cars merges into one bright band and the model can't tell where one car ends and the next begins; with it, each car gets its own bright spot.
As for speed, ResNet-50 takes 0.080 seconds for a 1024×1024 image on one V100, against 0.075 seconds for the baseline, a small difference.
Code
The GitHub link on the paper's first page returned a 404 in November 2026. The authors' code later appeared under another account (guozonghao96/BeyondBoundingBox), based on MMDetection v1.1.0 and shipping only the DOTA configuration.
Someone asked in the issues for the SKU110K-R training code. The authors replied "You can train the SKU110K-R according to paper to create config files", and for evaluation pointed them to DRN's code (issue #3). Someone else asked about the RepPoints baseline with the added angle branch used in the ablations; that one got no reply (issue #6).
Fortunately, MMRotate, OpenMMLab's rotated-detection toolbox, includes a reimplementation of CFA, which scores 73.45 on DOTA with ResNet-50 trained for 40 epochs. On the DOTA side, at least, there is a better-maintained version to use.
Conclusion
CFA steps outside the "how should the box rotate" line of thinking and describes objects directly with convex hulls enclosed by a set of movable points, so the feature sampling points follow the object's actual shape. The set split and anti-aliasing coefficient in stage two deal with crowded objects competing for features: convex hulls with too high a loss are kicked out of the positives, and convex hulls shared by several objects are down-weighted.
On SKU110K-R it pushes DRN's 55.9 to 57.0; on aerial data the gains are much larger. The size of the gain on shelves is about the same as DRN's improvement over its baseline the year before, around one point.
To reproduce this number on shelf data, you have to write the SKU110K-R configuration yourself, borrow DRN's evaluation tools, and pray that you guess the backbone the paper never names (a form of few-shot learning in its own right).