Lesson 7: Question on cropping image based on heatmap

Could someone please point me to starter code or ideas as to how to crop images based on the heatmap overlay? Thanks

Just crop such that the center is at the brightest pixel of the heatmap? Gaussian blur the heatmap first if you want to smooth it out a bit?..

If you want to also dynamically choose the size, just seek in each direction until you find some threshold.

If anyone has tried these or other approaches, I’d love to hear how you go! :slight_smile:

Has anyone tried cropping based on the heatmap? How did you decide on the bounding box size for each image? Also once you have the heatmap you already have a predicted fish type. So in theory there should be no benefit in cropping…but what about in practice?