A CNN model is based on a series of filters applied to an image. However, these filters can only "see" a small portion of the image and they have no information of the relative position of the pixels that they are analyzing with respect to the image coordinates. Likewise, deeper in the network, they have no information of the the position of the field of view that they are analyzing with respect to the coordinate-system of the image. In other words, if trained correctly, these modes are translation-invariant and they do not "know" the region of the image to which some features belong (ie, they have no information if some extracted features belong to the lower, upper, right or left part of the image).
I was wondering how a model like, for example, YOLO can infer the relative coordinates of the objects that it is detecting, without having this information. I understand that the image is divided in in a grid of cells and that gives some notion of region (ie, part of the image that is being analyzed). However, we still have to guess the width, height and relative x,y position with respect to the cell. Why don't we overlap the input image (or extracted features) with some kind of positional encoding (the x,y coordinates for example), so that the model has information of the region of the image to which some features belong?
This question also applies to other CNN models like, for example, U-Net architectures. I think that it may be useful to have some information of the position of the pixels/feature map with respect to the image's coordinates in some problems. For example, to segment the road in self-driving problems, it will be very useful to "know" if the region of the image that is being analyzed is in the bottom part of the image as, most-likely, the road will be found there.
How does these models infer this information? And, why is not common to add this "positional encoding" in deep learning projects applied to images?