I create a neural network, which should search the image for objects (faces away from the camera). In fact I need 4 coordinates, for the example I attach the image in which these coordinates are marked. There is a good set of transformers in pytorch, but the problem is that if the transformation is related to image distortion, you need to change the target respectively, otherwise the coordinates will not coincide with the desired points. What is the best way to do this? Maybe PyTorch already has tools implemented for such purposes?
This is what the target looks like for the image below - it is a set of coordinates
[[1253  368]
 [1251  589]
 [1386  579]
 [1368  800]]

Translated with www.DeepL.com/Translator (free version)

Снимок экрана 2021-12-09 080614720×408 321 KB