0

Given an image and bounding boxes identified within this image, the objective is to group these bounding boxes in such as way that we can define a bigger bounding box of size NxN that will encompass as little bounding boxes as possible while reducing the overlap between these NxN bounding boxes.

Some background to understand why this is needed. The idea is that we have full Sun images, and we want to use them to train a predictive machine learning model. To do this, we classify each of these bounding boxes into one of two classes. Now, we have available sequences of 512x512 such images and in order to train we need to extract cutouts of these regions and label these with their class. The problem comes from the low resolution of the images, meaning that simply cutting the region itself will yield an image of not high enough resolution. So one possible solution would be to just upscale these cutouts, but that means we distort the size of features, and it may affect the performance of the model. Another possibility is to simply pad the cutouts to the required size. However, I'm trying to go with a fixed cutout size, but that means that ultimately each cutout will have more than one region in it given that the cutout size is ~ 1/4 of the full image. So, what we need is to define these cutouts in such a way that there's as few as possible regions in each and the overlap between them is minimal so that we can label each cutout based on the regions it contains and then use it for training.

enter image description here

This is an example of what one of these images look like. The red bounding boxes are the original region bounding boxes, and the blue bounding boxes are what a cutout centred on each region would look like.

Grouping together regions that overlap, such as 4412, 4399 and 4397 should be easy. However, the problem lies in defining the blue bounding boxes. Manually, I could define three different blue bounding boxes encompassing [4412, 4399, 4397] [4386, 43974414, 4390,4392] and [4379, 4383] but I'm at a lost as to how I could do this automatically. Any suggestions or ideas, even just a name, about what method could work for this are greatly appreciated!

0 Answers0