How to perform polynomial landmark detection with deep learning I am trying to build a system to segment vehicles using a deep convolutional neural network. I am familiar with predicting a set amount of points (i.e. ending a neural architecture with a Dense layer with 4 neurons to predict 2 points(x,y) coords for both). However, vehicles come in many different shapes and sizes and one vehicle may require more segmentation points than another. How can I create a neural network that can have different amounts of output values? I imagine I could use a RNN of some sort but would like a little guidance. Thank you

For example, in the following image the two vehicles have a different number of labeled keypoints.
Landmarks are nice when you have a fixed amount for every image but I don't think it is the right approach for your problem. Instead I think you should look into models that segment images by applying a mask. A place to start could be to look into Mask R-CNN.

Here is the paper: Mask R-CNN

Here is how to train a ready made Mask R-CNN implementation with your own dataset using Keras: Tutorial