You want to predict a probability for each pixel in the image (of whether it is corner of box) ? For that one would need to output a tensor that is of the same shape as the input (image) and that the last activation should be sigmoid (as it squishes the values to between 0 and 1). You can look up UNet 2 for that.
Also, if I have understood correctly, you want to detect objects (it’s location) in the image, for that there are many pre-trained models available in pytorch Object Detection Models in Pytorch 6