<p>I am not quite sure how the heatmap data of your project exactly looks like, but it seems to me that you can use something like <a href="http://www.huppelen.nl/publications/selectiveSearchDraft.pdf" rel="nofollow noreferrer">Selective Search</a>. You can also have a look on this <a href="https://arxiv.org/pdf/1602.08405.pdf" rel="nofollow noreferrer">interesting paper</a>. Maybe you can use this approach on your dataset.</p>
How to generate bounding box data from heatmap data of an image?
<p>I have a group of images and some separate heatmap data which (imperfectly) explains where subject of the image is. The heatmap data is in a numpy array with shape (224,224,3). I would like to generate bounding box data from this heatmap data.</p>

<p>The heatmaps are not always perfect, So I guess I'm wondering if anyone can think of an intelligent way to do this.</p>

<p>Here are some examples of what happens when I apply the heatmap data to the image:</p>

<p><a href="https://github.com/jacobgil/keras-grad-cam/raw/master/examples/persian_cat.jpg?raw=true" rel="nofollow noreferrer"><img src="https://github.com/jacobgil/keras-grad-cam/raw/master/examples/persian_cat.jpg?raw=true" alt="Image of a cat with a heatmap illuminating the subject of the image"></a></p>

<p><a href="https://i.stack.imgur.com/JZqJn.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JZqJn.jpg" alt="enter image description here"></a></p>

<p>I found a solution to this in matlab, but I have no idea how to read this code! I am a python programmer, unfortunately.
<a href="https://github.com/metalbubble/CAM/tree/master/bboxgenerator" rel="nofollow noreferrer">https://github.com/metalbubble/CAM/tree/master/bboxgenerator</a></p>

<p>Anyone have any ideas about how to approach something like this? </p>