title: How to find the xmin, xmax, ymin, ymax of a mask
body: <p>I have a mask drawn over an apple using segmentation. The mask layer has 1's where the pixel is part of the apple and 0's everywhere else. How do i find the extreme pixels in the mask to find the bounding box coordinates around this mask? I am using pytorch and yolact edge to perform the segmentation as shown in <a href="https://github.com/haotian-liu/yolact_edge" rel="nofollow noreferrer">Yolact</a></p>