Wuziyi616 / SlotDiffusion

Code release for NeurIPS 2023 paper SlotDiffusion: Object-centric Learning with Diffusion Models
https://slotdiffusion.github.io/
MIT License
78 stars 7 forks source link

Getting segmented image #3

Closed titusadt closed 11 months ago

titusadt commented 11 months ago

Thank you for the reply on the last post! I was able to test the model with my own images.

However, I dont know how to get the output data. Like with my input image, I want a segmented image as the output (and maybe masking information) as in your examples but I am unsure of how to generate. I looked at the nerv directory and saw scripts on writing out the image data and was wondering if that was how to get the segmented image output.

Please let me know how I can go about generating the output, and suggestions would be appreciated, thank you

Wuziyi616 commented 11 months ago

I don't see the question here -- isn't this pred_masks what you want?

The easiest way to get a masked image is to use (you may need to adjust some dimension here) my provided function here. Then you can just save it using whatever library you want like matplotlib or PIL.Image.

Wuziyi616 commented 11 months ago

It's hard to give further information cause this is about basic python. I will close this issue for now.