Segmentation of small artifacts - Image Processing
If this is really what your input looks like then you should be able to handle this with the standard morphological image processing operations.

Assuming foreground as white and background as black, it basically comes down to a morphological open with a big enough structure element to elide the tails. The only trouble is that doing so will not work given that the input has holes so large the lines in the body of the shape itself would also get nuked by the open operation. One way to handle this is to perform the open on the figure without holes and then put the holes back in.

For example, in C++ using OpenCV:

void Test()
{

    Mat src_bw;
    cv::threshold(
        imread("some_file.png", CV_LOAD_IMAGE_GRAYSCALE), 
        src_bw, 0, 255, 
        CV_THRESH_BINARY | CV_THRESH_OTSU
    );

    imshow("src_bw", src_bw);

    // perform contour extraction using RETR_CCOMP i.e. we are assuming input doesn't have nested islands/holes just simple holes.
    std::vector&lt;std::vector&lt;Point&gt; &gt; contours;
    std::vector&lt;Vec4i&gt; hierarchy;
    findContours(src_bw.clone(), contours, hierarchy, RETR_CCOMP, CV_CHAIN_APPROX_SIMPLE, Point(0, 0));

    // iterate over the contours, draw the top-level contours into "blobs"
    Mat blobs = Mat::zeros(src_bw.size(), CV_8U);
    for (int i = 0; i &lt; contours.size(); i++)
        if (hierarchy[i][3] == -1) 
            drawContours(blobs, contours, i, 255, CV_FILLED, 8, hierarchy, 0, Point());

    imshow("blobs", blobs);

    // do an 'open' on blobs which will remove the artifacts.
    auto shape = MORPH_ELLIPSE;
    Mat strel = getStructuringElement(MORPH_ELLIPSE, Size(5,5));
    Mat blobs_opened;
    morphologyEx(blobs, blobs_opened, MORPH_OPEN, strel);
    imshow("blobs_opened", blobs_opened);

    // draw the holes back into the output
    Mat output = blobs_opened.clone();
    for (int i = 0; i &lt; contours.size(); i++)
        if (hierarchy[i][3] != -1) {
            drawContours(output, contours, i, 0, CV_FILLED, 8, hierarchy, 0, Point());
        }

    imshow("output", output);
}


yielding the following: