When attempting to log masks above size 100 x 100, the masks display a strange pattern. What is the cause of this and is there a way to ensure the pattern does not appear?
Here is a toy example comparing two random images of size (100,100) and (200,200), each with two masks of all 0s and all 1s. This is logged as:
Hi @rdorfman, happy to help with your question. The output of logging the images is expected behavior due to sampling. Our backend will sample in a non-deterministically sparse approach. Please let us know if you have any additional questions.
Hi @rdorfman , apologies my comment caused confusion, I was addressing the incorrect thread.
To clarify, segmentation masks and bounding boxes are not randomly sampled by W&B when logged to the workspace. The predictions are user generated and the input of the user to wandb is directly being logged. From the code example you provided, you are generating prediction masks and class labels for each of the pixels in the image. Your comment on " masks display a strange pattern", are you referring to the rendering of bounding boxes being represented in the workspace? Would appreciate any additional clarifying remarks about your issue. Thanks
No worries, thanks for you help. My comment on “masks display a strange pattern” does refer to the rendering of the masks in the workspace. To try and clarify the issue, if you look at the center two masks in the screenshot (the middle column), these are both generated by
where size = 200 for the top image and size = 100 for the bottom image. However, you can see for the size = 200 mask (the top one), this is not displayed as a solid mask (as it should be since it is an array of only 1s), whereas the size = 100 mask below it is rendered correctly.
Hi @rdorfman , I ran some tests on my end with various array size and was unable to reproduce that rendering glitch you ran into. Please see this project where I have image/masks side by side displaying solid masks. I will keep an eye out for other mentions of this behavior. At this time my recommendation is to delete the panels, clear your workspace ( From bottom left of screen, My Workspace > Clear Workspace), re-run your code and see if this behavior persists. If it does, please send me a link to your workspace.
Hi @mohammadbakir , thanks for taking the time to test this. When I view the project you shared, all examples that do not show the rendering issue appear to have dimensions smaller than (100,100). However, the rendering issue shows up for me for the (200,200) masks. Could you please let me know if you can see this issue in your project for the (200,200) size mask?