4

I have a script that takes a label image, where each pixel represent the class of the original pixel in a given image. Using scipy.ndimage and skimage.measure I create a list of bounding boxes that contain each object.

I'd like to do the same operations online inside a tensorflow graph. Where the label image is an image tensor.

Here's an example of the original code:

labeled, nr_objects = ndimage.label(label_im)
properties = measure.regionprops(labeled)
# save bboxes as [xmin ymin xmax ymax]
label_bboxes = [(prop.bbox[1], prop.bbox[0], prop.bbox[3], prop.bbox[2]) for prop in properties]
Tal
  • 127
  • 1
  • 7

0 Answers0