Removing the jagedness from the image

i have images like this and i want to remove all the jageddness while keeping the shape.

that’s not your source data. that is the result of your processing. you did something that made it appear like this.

i get the data from an segmentation model upon which if i draw on a mask i see this jaagy esdges

well yes, the model probably has a native resolution that is smaller than your input image’s resolution.

you can accept this, or you can look for segmentation models that are fully convolutional.