Hey @ErniW,

If I am not wrong, we are referring to the labels right? Assuming that, I guess the labels depend on what you want your model to do, and whether you can manually label your dataset, or you want to automatically create the labels.

For instance, if you are creating the images using the above technique, then, you will automatically get the coordinates which can serve as the labels.

Now, if you want your model to predict the number of edges, then, you will have to closely inspect the images that seem to be like triangles, cause as you said, many of them have very small angle between their edges, and even a minute angle can change the label. However, a better way of doing this is finding if any of the 3 coordinates among the 4 are collinear. If so, then 3 edges otherwise 4. Note that, in this case, your dataset will be severely imbalanced, since most of your shapes will have 4 edges (*due to the way they are created*).

Now, coming to the last scenario, in which we want the model to predict the shape. Once again, this scenario can be treated as 2 different ways. First, predicting among triangle and quadrilateral, second, predicting among, isoceles triangle, scalene triangle, equilateral triangle, square, rhombus, rectangle, parallelogram, etc (*basically all the possible forms with 3 and 4 edges*). For the first scenario, the labels would be created in the same way as we created for predicting the number of edges. For the second scenario, the label automation will be a bit more tedious, and you will have to make some calls on your own, depending on your needs. For instance, you can easily figure out the code for finding out whether a given shape is a square or not using the 4 coordinates, however, every square by definition is a rectangle, rhombus, and a parallelogram. So, do you want to create a hierarchy in your labels or do you want the model to be a multi-label classification model, depends on you.

Let me know if this helps.

Cheers,

Elemento