Skip to content

Best practices and limitations

Best practices

  • Try one strong model before an ensemble. On the 495-grid-point Songdo Vision OBB study, measured over 4,245 reference boxes, a single sam_l tied a five-model ensemble on mean IoU and beat it on the two scores that describe how a converted set fails, at 39% of the compute.
  • If you do ensemble, choose the vote threshold before the members. Masks are combined at len // 2 + 1, so an even-sized set must be unanimous and behaves as an intersection, which can only erode the extent the box is fitted to. A weak member in a pair holds a veto; in a triple it is outvoted and costs almost nothing.
  • Experiment with scale factors and inference resolutions based on your dataset.
  • Run hbb2obb-optimize to find the best settings for your data, and --save_provenance to record the ones you settled on.
  • Use class-agnostic evaluation when comparing against manually annotated ground truth with different class labels.
  • Visualize the conversion to understand how the model interprets your HBBs.

Limitations

  • Results depend on the quality of the input HBBs and the SAM models used; poor annotations or weak segmentation lead to inaccurate OBBs.
  • Highly occluded or complex objects, where the HBB gives insufficient context, may not convert well.
  • The error from a bad prompt is one-sided. The mask is clipped to the scaled prompt, so a prompt smaller than the object truncates it permanently, while one that is too large is trimmed back by the mask. On the same study, moving the scale factor from 0.02 to -0.01, which is 6% of prompt area, costs 0.033 mean IoU and drops the share of boxes above IoU 0.9 from 61.5% to 15.7% without producing a single gross failure. Note that the factor moves each edge by that fraction of its own side, so it changes each dimension by twice the factor. When in doubt, prompt loose.
  • Small objects convert poorly. Below about 20 px across the shorter side there are too few pixels of width to fit an axis to.

The numbers above come from the Songdo Vision OBB case study. How the conversion works explains the vote, the clip and the scale factor they refer to, and Tune hyperparameters runs the same kind of study on your data.