Hi @migueLib, thanks again for all your help. The trick of using instance masks seems to have worked well, and the results are much closer to the expectation. However, I am trying to plot the results directly on the image/mask for validation before I run with it. I modified code as to get the center of the bounding boxes from the mask2bbox library, but the coordinates don't seem to align with any real cell on the image. Moreover, the coordinates don't even align with the bounded image when I download all of them.
This is all on the test data. I have attached screenshots of the modified code. I am wondering if you could explain why the discrepancy in the coordinates I am getting and the actual image/mask itself. Thank you!