For the encoder-decoder example you’ve listed above, you are in fact training the model in a supervised approach. The key insight here is that you use the same image for the input and the label, and this is used to train both the encoder and decoder portion of the model; the loss is backpropogated through both modules. While the encoder may learn something similar to x y coordinates if the hidden state is of size two, there’s no guarantee of exactly what it is learning.
It doesn’t really seem that the information you’ve given is sufficient to provide you with the sort of solution you seem to be after. Is your dataset limited? If so, try doing some transforms on increase the size of your dataset and this may yield better results from your encoder-decoder approach.