Given a set of lines, is there a way to train to extract geometric shapes. For example, the picture on left has some blue lines (with red endpoints). How can I train to extract shapes like on the right side? The output must be different shapes with each having a set of points.
I searched for related research papers. I could not find any paper with this exact problem, though some of them came close to this with RNN.