Initial image:
Target image:
My personal attempt was as follows, but I didn't completely clean it up. In the context, "image" refers to the initial image.
image = Import["https://i.sstatic.net/pBRwlXEf.png"];
grayImage = ColorConvert[image, "Grayscale"];
threshold = 0.5;
binaryImage = Binarize[grayImage, threshold];
smallObjectsRemoved = Opening[binaryImage, 2];
Show[image, Image[smallObjectsRemoved]]