In Photoshop, going into Select and Mask doing Refine Edge using a radius of 4 px gives me the right image in the below screenshot.
I want to recreate this process in Python. How would I go about converting my binary image on the left, to the non binary image on the right? Any help?